SlideShare a Scribd company logo
HIGH TECH
HIGH CODE QUALITY
HIGH PERFORMANCE
HIGH SCALABILITY
HIGH MAINTAINABILITY
Single
Page
App
S E X Y R E A C T S TA C K
C U R I O U S C A S E S
b y @ c u o n g t r u o n g
SSE at #KMS Technology
Hello!
I am Cuong Truong
I am here because I love to share knowledge
You can contact me at
cuongtruong@kms-technology.com
Sexy React Stack
React
Redux
ES6+
Flow
Linter
UI kit
Unit Test
Webpack
VS Code
Take away + Demo
Agenda
#library for building UI
Uni-directional data flow
Server-side rendering
**VIRTUAL DOM**
#Cheat Sheet
REACT.JS
Do events
Repaint the
DOMDo layout
Recalculate
the CSS
Every time DOM changes, browser needs to
REAL DOM
TAKES TIME
Modifies DOM when something changed
VIRTUAL DOM
1
CREATE
a lightweight description
of component UI
BATCH
execute all changes
COMPUTE
minimal set of changes
to apply to the DOM
DIFF
with the old version
2
34
BETTER PERFORMANCE
PROPS
STATE
{/* data */}
Changes trigger a render()
state
Stateful
Stateless
#Thinking in React
No controllers
No models
No directives
No global event listeners
Everything is <Component/>
THINKING IN
REACT
- App
- HomePage
- Header
- SearchBar
- EmployeeList
- EmployeeListItem
- EmployeePage
- Header
- EmployeeDetails
A solution for concurrent
data modification by
multiple actors
A client container for
temporary UI state. e.g.
wizard, shopping cart, …
A client cache for avoiding
excessive HTTP requests
If you need
HOW TO MANAGE
FRONTEND LOGIC
or
APPLICATION STATE
EFFECTIVELY?
#Redux
application state manager
for javascript applications
UNIDIRECTIONAL DATA FLOW
IMMUTABLE
MIDDLEWARES
Async API, Logging, Dev Tools, …
ReduxThunk, ReduxApiMiddleware,
ReduxObservable, ReduxSaga, …
Let + Const
const myObject = {propA, propB}
Arrow function, Default
const myFunction = (arg = ‘value’) => {}
Class
export class MyClass {constructor(){}}
Module
import {MyClass} from ‘my/path’
Template String
const tps = `Template string with ${…}`
#ES6 #Mozilla #ES-Next
ECMAScript 6+
Destructuring
const {propA, propB} = myObject
Rest, Spread …
Promise
myPromise.then().then().catch()
Async/Await
const myFunction = async () => {await…}
Decorator
@myDecorator
class MyClass {…}
Static type checker for Javascript
strong/statically typed advantages
Strong tool for LARGE app
covers 100% of code
catches incorrect assumptions
e.g. numbers represented as strings
Provides advanced
autocompletion / intellisense
navigation
safe refactoring
FLOW
#WhyFlow
My Recommendation
project does not live for long
people enter or leave your team frequently
project is really simple
there is a chance you will need to refactor the thing
system is very important or even crucial for the success of
company
discovers problems
with js/jsx code
without executing it
Coding conventions
Readability
Maintainability
Functionality errors
ESLint
#eslint-plugin-flowtype#ESLint
KARMA
Spectacular #test runner
for JavaScript
CHAI
BBD/TDD
#assertion library
MOCHA
Feature-rich JavaScript
#test framework
ENZYME
JavaScript #testing
utility for React
SINON
Test #spies, stubs &
mocks for JavaScript
ISTABUL
JS #code coverage tool
Front-end Unit Test
React Bootstrap Material UI
Build yourself ?!
#BEM #SMACSS #MVCSS
Bundles your
Scripts
Styles
Assets
Images
WEBPACK
Configuration object
Resolves dependencies
Hot reloading
Tree-shaking
Cache busting/hashing system
WEBPACK
ENTRY POINTS
single entry
multiple page app
separate app & vendor
MORE INFORMATION
WEBPACK
LOADERS
style | css | sass | scss | …
babel | typescript | flow | …
html | template | pug | …
url | file | raw | …
module | bundle-loader
MORE INFORMATION
WEBPACK
PLUGINS
minimize
deduplication
HtmlWebpackPlugin
CircularDependencyPlugin
CommonsChunk
MORE INFORMATION
// bar.js
export default const bar () => {
/* Your code here */
}
<!--index.html-->
<html>
<head>
<!--Your head—>
</head>
<body>
<!--Your body-->
<script src="bundle.js"></script>
</body>
</html>// webpack.config.js
module.exports = {
entry: './app.js',
output: {
filename: 'bundle.js'
}
}
// app.js
import bar from './bar';
bar();
folder structure?
FOLDER
STRUCTURE
take away
Pros
Full control/easy to manage coding flow
Building reusable code/components
Testable
Readable
Maintainable
Performance
Developer experience/community
Redux ecosystem
Extension points such as #middleware
Server-side rendering => SEO
React + Redux is small
Cons
Learning curve
Need to keep conventions/boilerplate
Need to care about performance
Not easy to create large app without
using bunch of libraries
React does not provide
An events system (other than vanilla DOM events)
AJAX
Promise
My Recommendation
People are a part of solution
Keep conventions / commitments
Strategies for managing dependencies
Take care about architecture and configurations
Write small & pure functions as much as possible
Write meaningful unit test as much as possible
Don’t USE if you don’t NEED or UNDERSTAND it
References
#DemoSourceCode
#JSCodingStandards
#StandardReduxAction
#ReactRouter
#Redux
#ReduxDevTools
#Reselect
#ES6+ #Flow
#SASS
#BEM & SMACSS #MVCSS
#Babel
#ESLint
#Karma #Mocha #Chai #Sinon
#Webpack
Q&A
@CuongTruong
facebook/cuongtruong.official
cuongtruong@kms-technology.com
THANK YOU
@CuongTruong
Ad

More Related Content

What's hot (20)

Windows Store Apps: Tips & Tricks
Windows Store Apps: Tips & TricksWindows Store Apps: Tips & Tricks
Windows Store Apps: Tips & Tricks
Robert MacLean
 
The state of testing @ Microsoft
The state of testing @ MicrosoftThe state of testing @ Microsoft
The state of testing @ Microsoft
Robert MacLean
 
Bdd with Cucumber and Mocha
Bdd with Cucumber and MochaBdd with Cucumber and Mocha
Bdd with Cucumber and Mocha
Atish Narlawar
 
Learning Single page Application chapter 1
Learning Single page Application chapter 1Learning Single page Application chapter 1
Learning Single page Application chapter 1
Puguh Rismadi
 
Test Automation With Cucumber JVM, Selenium, and Mocha
Test Automation With Cucumber JVM, Selenium, and MochaTest Automation With Cucumber JVM, Selenium, and Mocha
Test Automation With Cucumber JVM, Selenium, and Mocha
Salesforce Developers
 
Visual Studio ❤ JavaScript
Visual Studio ❤ JavaScriptVisual Studio ❤ JavaScript
Visual Studio ❤ JavaScript
Robert MacLean
 
Single page applications
Single page applicationsSingle page applications
Single page applications
Prafful Garg
 
Cucumber ppt
Cucumber pptCucumber ppt
Cucumber ppt
Qwinix Technologies
 
Making Single Page Applications (SPA) faster
Making Single Page Applications (SPA) faster Making Single Page Applications (SPA) faster
Making Single Page Applications (SPA) faster
Boris Livshutz
 
What’s new in Visual Studio 2012 & .NET 4.5
What’s new in Visual Studio 2012 & .NET 4.5What’s new in Visual Studio 2012 & .NET 4.5
What’s new in Visual Studio 2012 & .NET 4.5
Robert MacLean
 
ASP.NET 5 & Unit Testing
ASP.NET 5 & Unit TestingASP.NET 5 & Unit Testing
ASP.NET 5 & Unit Testing
Shahed Chowdhuri
 
BDD testing with cucumber
BDD testing with cucumberBDD testing with cucumber
BDD testing with cucumber
Daniel Kummer
 
Lean Quality & Engineering
Lean Quality & EngineeringLean Quality & Engineering
Lean Quality & Engineering
Mek Srunyu Stittri
 
Visual Automation Framework via Screenshot Comparison
Visual Automation Framework via Screenshot ComparisonVisual Automation Framework via Screenshot Comparison
Visual Automation Framework via Screenshot Comparison
Mek Srunyu Stittri
 
Iseltech17 - Single Page Applications
Iseltech17 - Single Page ApplicationsIseltech17 - Single Page Applications
Iseltech17 - Single Page Applications
Monica Rodrigues
 
Using The Page Object Pattern
Using The Page Object PatternUsing The Page Object Pattern
Using The Page Object Pattern
Dante Briones
 
How Ninefold Tests for User Happiness
How Ninefold Tests for User HappinessHow Ninefold Tests for User Happiness
How Ninefold Tests for User Happiness
Ryan Clark
 
SenchaCon 2016: Cross-Platform Mobile App Development with Cordova and Visual...
SenchaCon 2016: Cross-Platform Mobile App Development with Cordova and Visual...SenchaCon 2016: Cross-Platform Mobile App Development with Cordova and Visual...
SenchaCon 2016: Cross-Platform Mobile App Development with Cordova and Visual...
Sencha
 
Automated Testing With Jasmine, PhantomJS and Jenkins
Automated Testing With Jasmine, PhantomJS and JenkinsAutomated Testing With Jasmine, PhantomJS and Jenkins
Automated Testing With Jasmine, PhantomJS and Jenkins
Work at Play
 
Patterns and practices for building enterprise-scale HTML5 apps
Patterns and practices for building enterprise-scale HTML5 appsPatterns and practices for building enterprise-scale HTML5 apps
Patterns and practices for building enterprise-scale HTML5 apps
Phil Leggetter
 
Windows Store Apps: Tips & Tricks
Windows Store Apps: Tips & TricksWindows Store Apps: Tips & Tricks
Windows Store Apps: Tips & Tricks
Robert MacLean
 
The state of testing @ Microsoft
The state of testing @ MicrosoftThe state of testing @ Microsoft
The state of testing @ Microsoft
Robert MacLean
 
Bdd with Cucumber and Mocha
Bdd with Cucumber and MochaBdd with Cucumber and Mocha
Bdd with Cucumber and Mocha
Atish Narlawar
 
Learning Single page Application chapter 1
Learning Single page Application chapter 1Learning Single page Application chapter 1
Learning Single page Application chapter 1
Puguh Rismadi
 
Test Automation With Cucumber JVM, Selenium, and Mocha
Test Automation With Cucumber JVM, Selenium, and MochaTest Automation With Cucumber JVM, Selenium, and Mocha
Test Automation With Cucumber JVM, Selenium, and Mocha
Salesforce Developers
 
Visual Studio ❤ JavaScript
Visual Studio ❤ JavaScriptVisual Studio ❤ JavaScript
Visual Studio ❤ JavaScript
Robert MacLean
 
Single page applications
Single page applicationsSingle page applications
Single page applications
Prafful Garg
 
Making Single Page Applications (SPA) faster
Making Single Page Applications (SPA) faster Making Single Page Applications (SPA) faster
Making Single Page Applications (SPA) faster
Boris Livshutz
 
What’s new in Visual Studio 2012 & .NET 4.5
What’s new in Visual Studio 2012 & .NET 4.5What’s new in Visual Studio 2012 & .NET 4.5
What’s new in Visual Studio 2012 & .NET 4.5
Robert MacLean
 
BDD testing with cucumber
BDD testing with cucumberBDD testing with cucumber
BDD testing with cucumber
Daniel Kummer
 
Visual Automation Framework via Screenshot Comparison
Visual Automation Framework via Screenshot ComparisonVisual Automation Framework via Screenshot Comparison
Visual Automation Framework via Screenshot Comparison
Mek Srunyu Stittri
 
Iseltech17 - Single Page Applications
Iseltech17 - Single Page ApplicationsIseltech17 - Single Page Applications
Iseltech17 - Single Page Applications
Monica Rodrigues
 
Using The Page Object Pattern
Using The Page Object PatternUsing The Page Object Pattern
Using The Page Object Pattern
Dante Briones
 
How Ninefold Tests for User Happiness
How Ninefold Tests for User HappinessHow Ninefold Tests for User Happiness
How Ninefold Tests for User Happiness
Ryan Clark
 
SenchaCon 2016: Cross-Platform Mobile App Development with Cordova and Visual...
SenchaCon 2016: Cross-Platform Mobile App Development with Cordova and Visual...SenchaCon 2016: Cross-Platform Mobile App Development with Cordova and Visual...
SenchaCon 2016: Cross-Platform Mobile App Development with Cordova and Visual...
Sencha
 
Automated Testing With Jasmine, PhantomJS and Jenkins
Automated Testing With Jasmine, PhantomJS and JenkinsAutomated Testing With Jasmine, PhantomJS and Jenkins
Automated Testing With Jasmine, PhantomJS and Jenkins
Work at Play
 
Patterns and practices for building enterprise-scale HTML5 apps
Patterns and practices for building enterprise-scale HTML5 appsPatterns and practices for building enterprise-scale HTML5 apps
Patterns and practices for building enterprise-scale HTML5 apps
Phil Leggetter
 

Similar to Sexy React Stack (20)

B4UConference_Sexy Angular Stack
B4UConference_Sexy Angular StackB4UConference_Sexy Angular Stack
B4UConference_Sexy Angular Stack
Hoa Le
 
IBM Think Session 8598 Domino and JavaScript Development MasterClass
IBM Think Session 8598 Domino and JavaScript Development MasterClassIBM Think Session 8598 Domino and JavaScript Development MasterClass
IBM Think Session 8598 Domino and JavaScript Development MasterClass
Paul Withers
 
Coding Ui
Coding UiCoding Ui
Coding Ui
rajivmordani
 
Coding the UI
Coding the UICoding the UI
Coding the UI
Mark Meeker
 
Challenges of angular in production (Tasos Bekos) - GreeceJS #17
Challenges of angular in production (Tasos Bekos) - GreeceJS #17Challenges of angular in production (Tasos Bekos) - GreeceJS #17
Challenges of angular in production (Tasos Bekos) - GreeceJS #17
GreeceJS
 
Dot NET Solution Architect Roadmap By Scholarhat PDF
Dot NET Solution Architect Roadmap By Scholarhat PDFDot NET Solution Architect Roadmap By Scholarhat PDF
Dot NET Solution Architect Roadmap By Scholarhat PDF
Scholarhat
 
7 Redux challenges
7 Redux challenges7 Redux challenges
7 Redux challenges
reactima
 
React Session 1.pptx
React Session 1.pptxReact Session 1.pptx
React Session 1.pptx
AyaBenkabbour1
 
Daniel Steigerwald - Este.js - konec velkého Schizma
Daniel Steigerwald - Este.js - konec velkého SchizmaDaniel Steigerwald - Este.js - konec velkého Schizma
Daniel Steigerwald - Este.js - konec velkého Schizma
Develcz
 
JavaFX Enterprise (JavaOne 2014)
JavaFX Enterprise (JavaOne 2014)JavaFX Enterprise (JavaOne 2014)
JavaFX Enterprise (JavaOne 2014)
Hendrik Ebbers
 
ReactJS vs AngularJS - Head to Head comparison
ReactJS vs AngularJS - Head to Head comparisonReactJS vs AngularJS - Head to Head comparison
ReactJS vs AngularJS - Head to Head comparison
500Tech
 
Evolving Mobile Architectures
Evolving Mobile ArchitecturesEvolving Mobile Architectures
Evolving Mobile Architectures
sgleadow
 
Full Stack React Workshop [CSSC x GDSC]
Full Stack React Workshop [CSSC x GDSC]Full Stack React Workshop [CSSC x GDSC]
Full Stack React Workshop [CSSC x GDSC]
GDSC UofT Mississauga
 
Vue3: nuove funzionalità, differenze e come migrare
Vue3: nuove funzionalità, differenze e come migrareVue3: nuove funzionalità, differenze e come migrare
Vue3: nuove funzionalità, differenze e come migrare
Andrea Campaci
 
Best of Microsoft Dev Camp 2015
Best of Microsoft Dev Camp 2015Best of Microsoft Dev Camp 2015
Best of Microsoft Dev Camp 2015
Bluegrass Digital
 
Transforming Front-End Disaster Code™ Into A Maintainable Masterpiece
Transforming Front-End Disaster Code™ Into A Maintainable MasterpieceTransforming Front-End Disaster Code™ Into A Maintainable Masterpiece
Transforming Front-End Disaster Code™ Into A Maintainable Masterpiece
Dan Gribbin
 
JSS build and deployment
JSS build and deploymentJSS build and deployment
JSS build and deployment
David Szöke
 
Normalizing x pages web development
Normalizing x pages web development Normalizing x pages web development
Normalizing x pages web development
Shean McManus
 
Experiences using CouchDB inside Microsoft's Azure team
Experiences using CouchDB inside Microsoft's Azure teamExperiences using CouchDB inside Microsoft's Azure team
Experiences using CouchDB inside Microsoft's Azure team
Brian Benz
 
Implementing Infrastructure as Code ConfigMgtCamp 2017
Implementing Infrastructure as Code ConfigMgtCamp 2017Implementing Infrastructure as Code ConfigMgtCamp 2017
Implementing Infrastructure as Code ConfigMgtCamp 2017
Kief Morris
 
B4UConference_Sexy Angular Stack
B4UConference_Sexy Angular StackB4UConference_Sexy Angular Stack
B4UConference_Sexy Angular Stack
Hoa Le
 
IBM Think Session 8598 Domino and JavaScript Development MasterClass
IBM Think Session 8598 Domino and JavaScript Development MasterClassIBM Think Session 8598 Domino and JavaScript Development MasterClass
IBM Think Session 8598 Domino and JavaScript Development MasterClass
Paul Withers
 
Challenges of angular in production (Tasos Bekos) - GreeceJS #17
Challenges of angular in production (Tasos Bekos) - GreeceJS #17Challenges of angular in production (Tasos Bekos) - GreeceJS #17
Challenges of angular in production (Tasos Bekos) - GreeceJS #17
GreeceJS
 
Dot NET Solution Architect Roadmap By Scholarhat PDF
Dot NET Solution Architect Roadmap By Scholarhat PDFDot NET Solution Architect Roadmap By Scholarhat PDF
Dot NET Solution Architect Roadmap By Scholarhat PDF
Scholarhat
 
7 Redux challenges
7 Redux challenges7 Redux challenges
7 Redux challenges
reactima
 
Daniel Steigerwald - Este.js - konec velkého Schizma
Daniel Steigerwald - Este.js - konec velkého SchizmaDaniel Steigerwald - Este.js - konec velkého Schizma
Daniel Steigerwald - Este.js - konec velkého Schizma
Develcz
 
JavaFX Enterprise (JavaOne 2014)
JavaFX Enterprise (JavaOne 2014)JavaFX Enterprise (JavaOne 2014)
JavaFX Enterprise (JavaOne 2014)
Hendrik Ebbers
 
ReactJS vs AngularJS - Head to Head comparison
ReactJS vs AngularJS - Head to Head comparisonReactJS vs AngularJS - Head to Head comparison
ReactJS vs AngularJS - Head to Head comparison
500Tech
 
Evolving Mobile Architectures
Evolving Mobile ArchitecturesEvolving Mobile Architectures
Evolving Mobile Architectures
sgleadow
 
Full Stack React Workshop [CSSC x GDSC]
Full Stack React Workshop [CSSC x GDSC]Full Stack React Workshop [CSSC x GDSC]
Full Stack React Workshop [CSSC x GDSC]
GDSC UofT Mississauga
 
Vue3: nuove funzionalità, differenze e come migrare
Vue3: nuove funzionalità, differenze e come migrareVue3: nuove funzionalità, differenze e come migrare
Vue3: nuove funzionalità, differenze e come migrare
Andrea Campaci
 
Best of Microsoft Dev Camp 2015
Best of Microsoft Dev Camp 2015Best of Microsoft Dev Camp 2015
Best of Microsoft Dev Camp 2015
Bluegrass Digital
 
Transforming Front-End Disaster Code™ Into A Maintainable Masterpiece
Transforming Front-End Disaster Code™ Into A Maintainable MasterpieceTransforming Front-End Disaster Code™ Into A Maintainable Masterpiece
Transforming Front-End Disaster Code™ Into A Maintainable Masterpiece
Dan Gribbin
 
JSS build and deployment
JSS build and deploymentJSS build and deployment
JSS build and deployment
David Szöke
 
Normalizing x pages web development
Normalizing x pages web development Normalizing x pages web development
Normalizing x pages web development
Shean McManus
 
Experiences using CouchDB inside Microsoft's Azure team
Experiences using CouchDB inside Microsoft's Azure teamExperiences using CouchDB inside Microsoft's Azure team
Experiences using CouchDB inside Microsoft's Azure team
Brian Benz
 
Implementing Infrastructure as Code ConfigMgtCamp 2017
Implementing Infrastructure as Code ConfigMgtCamp 2017Implementing Infrastructure as Code ConfigMgtCamp 2017
Implementing Infrastructure as Code ConfigMgtCamp 2017
Kief Morris
 
Ad

More from KMS Technology (20)

A journey to a Full Stack Tester
A journey to a Full Stack Tester A journey to a Full Stack Tester
A journey to a Full Stack Tester
KMS Technology
 
KMSNext Roadmap
KMSNext RoadmapKMSNext Roadmap
KMSNext Roadmap
KMS Technology
 
KMS Introduction
KMS IntroductionKMS Introduction
KMS Introduction
KMS Technology
 
What's new in the Front-end development nowadays?
What's new in the Front-end development nowadays?What's new in the Front-end development nowadays?
What's new in the Front-end development nowadays?
KMS Technology
 
JavaScript - No Longer A Toy Language
JavaScript - No Longer A Toy LanguageJavaScript - No Longer A Toy Language
JavaScript - No Longer A Toy Language
KMS Technology
 
JavaScript No longer A “toy” Language
JavaScript No longer A “toy” LanguageJavaScript No longer A “toy” Language
JavaScript No longer A “toy” Language
KMS Technology
 
Preparations For A Successful Interview
Preparations For A Successful InterviewPreparations For A Successful Interview
Preparations For A Successful Interview
KMS Technology
 
AWS: Scaling With Elastic Beanstalk
AWS: Scaling With Elastic BeanstalkAWS: Scaling With Elastic Beanstalk
AWS: Scaling With Elastic Beanstalk
KMS Technology
 
Behavior-Driven Development and Automation Testing Using Cucumber Framework W...
Behavior-Driven Development and Automation Testing Using Cucumber Framework W...Behavior-Driven Development and Automation Testing Using Cucumber Framework W...
Behavior-Driven Development and Automation Testing Using Cucumber Framework W...
KMS Technology
 
KMS Introduction
KMS IntroductionKMS Introduction
KMS Introduction
KMS Technology
 
Technology Application Development Trends For IT Students
Technology Application Development Trends For IT StudentsTechnology Application Development Trends For IT Students
Technology Application Development Trends For IT Students
KMS Technology
 
Contributors for Delivering a Successful Testing Project Seminar
Contributors for Delivering a Successful Testing Project SeminarContributors for Delivering a Successful Testing Project Seminar
Contributors for Delivering a Successful Testing Project Seminar
KMS Technology
 
Increase Chances to Be Hired as Software Developers - 2014
Increase Chances to Be Hired as Software Developers - 2014Increase Chances to Be Hired as Software Developers - 2014
Increase Chances to Be Hired as Software Developers - 2014
KMS Technology
 
Behavior Driven Development and Automation Testing Using Cucumber
Behavior Driven Development and Automation Testing Using CucumberBehavior Driven Development and Automation Testing Using Cucumber
Behavior Driven Development and Automation Testing Using Cucumber
KMS Technology
 
Software Technology Trends in 2013-2014
Software Technology Trends in 2013-2014Software Technology Trends in 2013-2014
Software Technology Trends in 2013-2014
KMS Technology
 
Cross-platform Mobile Development with C# and Xamarin Webinar
Cross-platform Mobile Development with C# and Xamarin WebinarCross-platform Mobile Development with C# and Xamarin Webinar
Cross-platform Mobile Development with C# and Xamarin Webinar
KMS Technology
 
Software Testing Process & Trend
Software Testing Process & TrendSoftware Testing Process & Trend
Software Testing Process & Trend
KMS Technology
 
Mobile Development Career
Mobile Development CareerMobile Development Career
Mobile Development Career
KMS Technology
 
Become Software Tester or Developer
Become Software Tester or DeveloperBecome Software Tester or Developer
Become Software Tester or Developer
KMS Technology
 
Software Technology Trends
Software Technology TrendsSoftware Technology Trends
Software Technology Trends
KMS Technology
 
A journey to a Full Stack Tester
A journey to a Full Stack Tester A journey to a Full Stack Tester
A journey to a Full Stack Tester
KMS Technology
 
What's new in the Front-end development nowadays?
What's new in the Front-end development nowadays?What's new in the Front-end development nowadays?
What's new in the Front-end development nowadays?
KMS Technology
 
JavaScript - No Longer A Toy Language
JavaScript - No Longer A Toy LanguageJavaScript - No Longer A Toy Language
JavaScript - No Longer A Toy Language
KMS Technology
 
JavaScript No longer A “toy” Language
JavaScript No longer A “toy” LanguageJavaScript No longer A “toy” Language
JavaScript No longer A “toy” Language
KMS Technology
 
Preparations For A Successful Interview
Preparations For A Successful InterviewPreparations For A Successful Interview
Preparations For A Successful Interview
KMS Technology
 
AWS: Scaling With Elastic Beanstalk
AWS: Scaling With Elastic BeanstalkAWS: Scaling With Elastic Beanstalk
AWS: Scaling With Elastic Beanstalk
KMS Technology
 
Behavior-Driven Development and Automation Testing Using Cucumber Framework W...
Behavior-Driven Development and Automation Testing Using Cucumber Framework W...Behavior-Driven Development and Automation Testing Using Cucumber Framework W...
Behavior-Driven Development and Automation Testing Using Cucumber Framework W...
KMS Technology
 
Technology Application Development Trends For IT Students
Technology Application Development Trends For IT StudentsTechnology Application Development Trends For IT Students
Technology Application Development Trends For IT Students
KMS Technology
 
Contributors for Delivering a Successful Testing Project Seminar
Contributors for Delivering a Successful Testing Project SeminarContributors for Delivering a Successful Testing Project Seminar
Contributors for Delivering a Successful Testing Project Seminar
KMS Technology
 
Increase Chances to Be Hired as Software Developers - 2014
Increase Chances to Be Hired as Software Developers - 2014Increase Chances to Be Hired as Software Developers - 2014
Increase Chances to Be Hired as Software Developers - 2014
KMS Technology
 
Behavior Driven Development and Automation Testing Using Cucumber
Behavior Driven Development and Automation Testing Using CucumberBehavior Driven Development and Automation Testing Using Cucumber
Behavior Driven Development and Automation Testing Using Cucumber
KMS Technology
 
Software Technology Trends in 2013-2014
Software Technology Trends in 2013-2014Software Technology Trends in 2013-2014
Software Technology Trends in 2013-2014
KMS Technology
 
Cross-platform Mobile Development with C# and Xamarin Webinar
Cross-platform Mobile Development with C# and Xamarin WebinarCross-platform Mobile Development with C# and Xamarin Webinar
Cross-platform Mobile Development with C# and Xamarin Webinar
KMS Technology
 
Software Testing Process & Trend
Software Testing Process & TrendSoftware Testing Process & Trend
Software Testing Process & Trend
KMS Technology
 
Mobile Development Career
Mobile Development CareerMobile Development Career
Mobile Development Career
KMS Technology
 
Become Software Tester or Developer
Become Software Tester or DeveloperBecome Software Tester or Developer
Become Software Tester or Developer
KMS Technology
 
Software Technology Trends
Software Technology TrendsSoftware Technology Trends
Software Technology Trends
KMS Technology
 
Ad

Recently uploaded (20)

Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 

Sexy React Stack

  • 1. HIGH TECH HIGH CODE QUALITY HIGH PERFORMANCE HIGH SCALABILITY HIGH MAINTAINABILITY Single Page App
  • 2. S E X Y R E A C T S TA C K C U R I O U S C A S E S b y @ c u o n g t r u o n g
  • 3. SSE at #KMS Technology Hello! I am Cuong Truong I am here because I love to share knowledge You can contact me at [email protected]
  • 6. #library for building UI Uni-directional data flow Server-side rendering **VIRTUAL DOM** #Cheat Sheet REACT.JS
  • 7. Do events Repaint the DOMDo layout Recalculate the CSS Every time DOM changes, browser needs to REAL DOM TAKES TIME
  • 8. Modifies DOM when something changed VIRTUAL DOM 1 CREATE a lightweight description of component UI BATCH execute all changes COMPUTE minimal set of changes to apply to the DOM DIFF with the old version 2 34 BETTER PERFORMANCE
  • 9. PROPS STATE {/* data */} Changes trigger a render() state Stateful Stateless
  • 10. #Thinking in React No controllers No models No directives No global event listeners Everything is <Component/>
  • 11. THINKING IN REACT - App - HomePage - Header - SearchBar - EmployeeList - EmployeeListItem - EmployeePage - Header - EmployeeDetails
  • 12. A solution for concurrent data modification by multiple actors A client container for temporary UI state. e.g. wizard, shopping cart, … A client cache for avoiding excessive HTTP requests If you need HOW TO MANAGE FRONTEND LOGIC or APPLICATION STATE EFFECTIVELY?
  • 13. #Redux application state manager for javascript applications UNIDIRECTIONAL DATA FLOW IMMUTABLE
  • 14. MIDDLEWARES Async API, Logging, Dev Tools, … ReduxThunk, ReduxApiMiddleware, ReduxObservable, ReduxSaga, …
  • 15. Let + Const const myObject = {propA, propB} Arrow function, Default const myFunction = (arg = ‘value’) => {} Class export class MyClass {constructor(){}} Module import {MyClass} from ‘my/path’ Template String const tps = `Template string with ${…}` #ES6 #Mozilla #ES-Next ECMAScript 6+ Destructuring const {propA, propB} = myObject Rest, Spread … Promise myPromise.then().then().catch() Async/Await const myFunction = async () => {await…} Decorator @myDecorator class MyClass {…}
  • 16. Static type checker for Javascript strong/statically typed advantages Strong tool for LARGE app covers 100% of code catches incorrect assumptions e.g. numbers represented as strings Provides advanced autocompletion / intellisense navigation safe refactoring FLOW #WhyFlow
  • 17. My Recommendation project does not live for long people enter or leave your team frequently project is really simple there is a chance you will need to refactor the thing system is very important or even crucial for the success of company
  • 18. discovers problems with js/jsx code without executing it Coding conventions Readability Maintainability Functionality errors ESLint #eslint-plugin-flowtype#ESLint
  • 19. KARMA Spectacular #test runner for JavaScript CHAI BBD/TDD #assertion library MOCHA Feature-rich JavaScript #test framework ENZYME JavaScript #testing utility for React SINON Test #spies, stubs & mocks for JavaScript ISTABUL JS #code coverage tool Front-end Unit Test
  • 20. React Bootstrap Material UI Build yourself ?! #BEM #SMACSS #MVCSS
  • 21. Bundles your Scripts Styles Assets Images WEBPACK Configuration object Resolves dependencies Hot reloading Tree-shaking Cache busting/hashing system
  • 22. WEBPACK ENTRY POINTS single entry multiple page app separate app & vendor MORE INFORMATION WEBPACK LOADERS style | css | sass | scss | … babel | typescript | flow | … html | template | pug | … url | file | raw | … module | bundle-loader MORE INFORMATION WEBPACK PLUGINS minimize deduplication HtmlWebpackPlugin CircularDependencyPlugin CommonsChunk MORE INFORMATION
  • 23. // bar.js export default const bar () => { /* Your code here */ } <!--index.html--> <html> <head> <!--Your head—> </head> <body> <!--Your body--> <script src="bundle.js"></script> </body> </html>// webpack.config.js module.exports = { entry: './app.js', output: { filename: 'bundle.js' } } // app.js import bar from './bar'; bar();
  • 27. Pros Full control/easy to manage coding flow Building reusable code/components Testable Readable Maintainable Performance Developer experience/community Redux ecosystem Extension points such as #middleware Server-side rendering => SEO React + Redux is small
  • 28. Cons Learning curve Need to keep conventions/boilerplate Need to care about performance Not easy to create large app without using bunch of libraries React does not provide An events system (other than vanilla DOM events) AJAX Promise
  • 29. My Recommendation People are a part of solution Keep conventions / commitments Strategies for managing dependencies Take care about architecture and configurations Write small & pure functions as much as possible Write meaningful unit test as much as possible Don’t USE if you don’t NEED or UNDERSTAND it
  • 31. Q&A