SlideShare a Scribd company logo
Speeding Up uPortal With
ReactJS
Aaron Goodfellow, Brandon Powell, KaJuan Johnson -
Oakland University
● React is a JavaScript library for building user interfaces
● No longer need page refresh to manipulate data and user interaction
● Reusable components
What Is ReactJS?
The Old Way
Logic inside JSP
Multiple page reloads (e.g form submissions, view change, etc)
Unfamiliar syntax (Java / Spring in jsps)
CSS leaking and bootstrap being overpowering
JSTL is garbage
The Old Way
Low barrier to entry
Familiar syntax
No CSS leaking
Automatic and fast re-rendering
Good documentation / community
React-Native potential
Why ReactJS is better
● Node
● Yarn
● Create-React-App
Creating a
React Project
Virtual DOM
Components
State
Props
Using React
● A collection of
elements (e.g. html
tags) that share a
relation to a data
set
Components
● Data that, if
changed, triggers a
re-render
● Inner-workings all
handled by
Facebook
State
● The way in which
data is passed
from parent to
child components
Props
Fetch
CSS
● No more leaking
CSS
● Ejecting
Integrate with
a portlet
● Remove hashes in
webpack build
Integrate with
a portlet
● Build react code
during a maven
build.
Integrate with
a portlet
react-i18next (https://github.com/i18next/react-i18next)
Create translations for en, en-us, en-gb, fr, de, etc and place in your portlet
i18next will load the translations based on browser
Example code: https://github.com/bpowell/i18n-react-portlet
i18n With React
Many, many, many
thanks to Christian
Cousquer :)
Choosing Frontend Libraries
Bad backend
ADA Compliance
Deciding when to make a piece of code its own Component
JavaScript weirdness
Our Mistakes
React Developer Tools ⟹ Browser extension
Prettier ⟹ Code formatting
vim-jsx or vim-javascript-syntax ⟹ VIM plugins for syntax highlighting
Create-react-app ⟹ Tool to create react applications
Yarn ⟹ npm replacement made by Facebook
Tools For ReactJS
http://localhost:3000
Live Demo!
Aaron Goodfellow amgoodfellow@oakland.edu
Brandon Powell bjpowel2@oakland.edu
KaJuan Johnson kdjohnson23@oakland.edu
Contact Us
Questions?

More Related Content

PPT
4005-713 ` XML Architecture, Tools & Technique ` Presentation
PDF
Backbone + React
PPT
TSSJS2010 Presenatation on: Performance Anti Patterns In Ajax Applications
PPT
Performance anti patterns in ajax applications
PPT
PPTX
003. ReactJS basic
PDF
Ajax basics
PPTX
Ajax technology
4005-713 ` XML Architecture, Tools & Technique ` Presentation
Backbone + React
TSSJS2010 Presenatation on: Performance Anti Patterns In Ajax Applications
Performance anti patterns in ajax applications
003. ReactJS basic
Ajax basics
Ajax technology

What's hot (20)

PPT
Full stack JavaScript - the folly of choice
PPT
Ajax Using JSP with prototype.js
PPTX
001. Introduction about React
PPTX
Caching in Backbone Application
PPT
Ajax presentation
PPTX
Overview of AJAX
PPT
PPTX
Writing Scalable React Applications: Introduction
DOCX
Web 10mca556 syllabs
PDF
How to easily identify and resolve front-end performance bottlenecks
PDF
Web 2.0 & Ajax Basics
PPT
Grails Controllers
PPTX
Ajax Technology
PPT
Ajax workshop
PPT
Google Web Toolkit (JUG Latvia)
PDF
Om & React.js
PDF
JavaScript Roadmap - DOM Manipulation
Full stack JavaScript - the folly of choice
Ajax Using JSP with prototype.js
001. Introduction about React
Caching in Backbone Application
Ajax presentation
Overview of AJAX
Writing Scalable React Applications: Introduction
Web 10mca556 syllabs
How to easily identify and resolve front-end performance bottlenecks
Web 2.0 & Ajax Basics
Grails Controllers
Ajax Technology
Ajax workshop
Google Web Toolkit (JUG Latvia)
Om & React.js
JavaScript Roadmap - DOM Manipulation
Ad

Similar to Speeding Up uPortal with ReactJS (20)

PPTX
React JS part 1
PPTX
React Conf, Dhaka 2018 - Understanding React: The React Way of Doing Things b...
PDF
Review on React JS
PPTX
Comprehensive Analysis of React concept.pptx
PPTX
Reactjs notes.pptx for web development- tutorial and theory
PPTX
O365 Developer Bootcamp NJ 2018 - Material
PPTX
unit 2 React js.pptxdgdgdgdgdgdgdgdgdsgdgdg
PDF
Learn react by Etietop Demas
PDF
Learning React js Learn React JS From Scratch with Hands On Projects 2nd Edit...
PDF
Mastering-Reactjs-Your-Path-to-Web-Development.pdf
PDF
React in Action ( PDFDrive ).pdf
PDF
React.js: Building Dynamic User Interfaces
PPTX
React js for beginners
PPTX
thinking in react slides for students.pptx
PPTX
Introduction to React Language (1).pptx
PDF
ReactJS Tutorial For Beginners | ReactJS Redux Training For Beginners | React...
PPTX
React_Complete.pptx
PPTX
reactJS
PPTX
theory-slides-for react for beginners.pptx
React JS part 1
React Conf, Dhaka 2018 - Understanding React: The React Way of Doing Things b...
Review on React JS
Comprehensive Analysis of React concept.pptx
Reactjs notes.pptx for web development- tutorial and theory
O365 Developer Bootcamp NJ 2018 - Material
unit 2 React js.pptxdgdgdgdgdgdgdgdgdsgdgdg
Learn react by Etietop Demas
Learning React js Learn React JS From Scratch with Hands On Projects 2nd Edit...
Mastering-Reactjs-Your-Path-to-Web-Development.pdf
React in Action ( PDFDrive ).pdf
React.js: Building Dynamic User Interfaces
React js for beginners
thinking in react slides for students.pptx
Introduction to React Language (1).pptx
ReactJS Tutorial For Beginners | ReactJS Redux Training For Beginners | React...
React_Complete.pptx
reactJS
theory-slides-for react for beginners.pptx
Ad

Recently uploaded (20)

PPTX
history of c programming in notes for students .pptx
PDF
medical staffing services at VALiNTRY
PPT
Introduction Database Management System for Course Database
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PPTX
Introduction to Artificial Intelligence
PDF
System and Network Administration Chapter 2
PDF
Designing Intelligence for the Shop Floor.pdf
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PDF
Digital Strategies for Manufacturing Companies
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
history of c programming in notes for students .pptx
medical staffing services at VALiNTRY
Introduction Database Management System for Course Database
Odoo Companies in India – Driving Business Transformation.pdf
Introduction to Artificial Intelligence
System and Network Administration Chapter 2
Designing Intelligence for the Shop Floor.pdf
Which alternative to Crystal Reports is best for small or large businesses.pdf
Operating system designcfffgfgggggggvggggggggg
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
How to Migrate SBCGlobal Email to Yahoo Easily
Navsoft: AI-Powered Business Solutions & Custom Software Development
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
wealthsignaloriginal-com-DS-text-... (1).pdf
Digital Strategies for Manufacturing Companies
How to Choose the Right IT Partner for Your Business in Malaysia
2025 Textile ERP Trends: SAP, Odoo & Oracle
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free

Speeding Up uPortal with ReactJS

Editor's Notes

  • #2: b
  • #3: b
  • #4: b
  • #5: b
  • #6: A Low barrier - Similar concepts to the current frontend stack of html, css, and No CSS Leaking - We still can have a separate CSS file for readability, but when we transpile the code, all CSS is inlined, so there is no leakage ‘Automatic’ - talk about state changes and just basically how that works Good documentation - the project is maintained by Facebook and they have great documentation and tutorials. It’s also a ‘hip’ language so there is a large, growing community making libraries and support for it. Notable users: Facebook, Instagram, Netflix, Twitch, NHL, Lyft, Kroger React Native: Because apps are nice and app development is hard
  • #7: k Node - Executing javascript server-side. If you don’t know what this is, greetings from the 21st century. Maybe you should find a new job Yarn - A new package manager for nodeJS stuff. It’s like npm but faster! You can install it via npm or through their website. Built by Facebook. Yarn caches every package it downloads so it never needs to download it again. Create-React-App - A facebook created node package allowing for easy set-up of React projects. Before this, you had to manually set up all of webpack yourself, which is a very daunting task. Now everything comes preconfigured with helpful scripts to build and test your project
  • #8: k Virtual DOM - The virtual DOM is a easily mutable copy of the traditional DOM. This is used to compare against the traditional DOM and and rerender based on changes. For a more in detail look at this topic please reference the presentation , Portals? uPortal!? What is this Béchamel? By Christian Cousquer Props -
  • #9: K Components - There are two types of components, one is class based (which would be easy for developers familiar with Java) and the other type is called “functional stateless” where they are more like traditional javascript functions. The class based ones are more commonly used, since they have lifecycle methods associated with them, can manage their own state, and can have as many user added attributes and methods as a user desires. Talk about how just how lifecycle methods are built-in things that facebook provides.
  • #10: A State is what makes React so magical. Everyone here is familiar with the concept of variables (I hope) - state is basically a collection of javascript variables that React keeps track of. You can reference state by saying this.state.(variableName), and set state with a special setState method. When this method is called, it changes the virtual DOM. Then, when the React diffing algorithm is run, a rerender of everything affected by the changed state variable occurs.
  • #11: A Props and state are closely related. Props are basically how React passes data from a parent component, down to its children. When passing them down, they look similar to HTML attributes, and they could be hardcoded values, state variables, or even methods. This whole idea can be kind of confusing, and it seems to be what trips people up the most when coming to React for the first time, so for the sake of time, we’ll just keep a high level approach and say this is how data are passed to child components. If you have any questions, please feel free to ask anytime after our presentation
  • #12: All 3 If you remember from an earlier example, we connected to a database using the method getData. Here is that method. At Oakland University, we’ve been trying to remove JQuery from all of our portlets and soffits, since it is a large dependency that’s not really needed anymore. And that brings us into the topic of some best practices. Since React will transpile down to a level of javascript that all the browsers can use, we are free to use all the latest ES6 javascript functions (though they occasionally need a pollyfill). Fetch replaces JQuery’s AJAX request function. As you can see in our above example, the syntax is very simple, and uses Javascript’s new promise feature (fetch is asynchronous). Speaking of new ES6 ways of doing things, for those used to traditional javascript, this function syntax will look pretty unfamiliar. The first strange syntax would probably be ‘const’. ES6 js introduces two new variable keywords, const and let. Let is for those variables that will eventually change. Const is for ones that won’t change. Next you’ll see the actual function declaration (it’s called an arrow function for obvious reasons). getData is the name of the function, url is what is being passed (there can be multiple parameters) and the arrow syntax means that it’s going to be a function (and if it’s in a class, it’ll autobind that function to the class it’s in) *I think* Finally, we can talk about styles.
  • #13: A/K Boom. Styles. All inline without the possibility of ever leaking
  • #14: B
  • #15: B
  • #16: B Link to pom example: https://github.com/Oakland-University/react-portlet/blob/master/pom.xml#L333
  • #17: B
  • #18: A/K React-MDL - Check out your libraries before you use them Bad backend - We worked for months with a bad backend then had to redo everything because reasons ADA Compliance - Make sure you do this. We’re currently reworking some stuff to be more compliant
  • #19: All three https://github.com/facebook/react/wiki/Complementary-Tools https://github.com/prettier/prettier https://github.com/mxw/vim-jsx https://github.com/jelera/vim-javascript-syntax https://github.com/facebookincubator/create-react-app https://yarnpkg.com/ https://flow.org/ https://facebook.github.io/jest/