SlideShare a Scribd company logo
Introduction to React
About Me
● Solutions integrator
at Jumping Bean
– Developer & Trainer
– Social Media
● Twitter @mxc4
● Twitter
@jumpingbeansa
● LinkedIn
Application Architecture
Which Front-End Technology to Use?
What Front-End Technology To
Use?
● Mobile?
– Native vs HTML5
● Desktop?
– Thin Client/Fat Client
● Swing
● Web?
– HTML5,
– ECMAScript 5,6,7
– Frameworks
● HTML5/JavaScript
– Pros:
● Largest coverage,
– Cons:
● Not as fast, slick or
integrated as native
apps
The State of JavaScript
Frameworks
What to use for JS Front-End?
● Needed to redo a front-end
– Angular – Seemed to be the
emerging winner,
● Angular 1 versus Angular 2
– Others
● BackBone,
● Ember
● Where to go?
● I am Morpheus - Had to go
find “The One”
Is React the One?
What is React?
● JavaScript library from
– FaceBook
– Instagram
● “A JavaScript library for building user
interfaces”
● Originally built for Single Page Apps,
● Only the View part of an MVC framework
How is React Different?
● Existing frameworks
– add complexity,
– Introduce JavaScript meta-languages,
– Can be slow when number of interactive
components increase
● One way data-binding
● Two way data-binding is expensive and slow
React – A New Approach
● Declarative not imperative,
● UI built out of JavaScript defined components,
● One way data binding,
– Immutable UI
● Build components not templates
● Major innovation
– Virtual DOM
– Generates
Virtual DOM
● Abstracts away browser DOM,
● Translates from abstract DOM to concrete browser
DOM,
● Power behind one-way binding and UI updates
● Write to Virtual DOM and then “compile” to JavaScript
● On state change generate entire html page and then
generate differences and update
Virtual DOM – Update Flow
1)Calculate old and new tree,
2)Diff them:
– Two components of the same class will generate similar trees
– two components of different classes will generate different
trees.
– It is possible to provide a unique key for elements that is
stable across different renders
3) Update changed part of browser DOM
Simplified Explanation of React
● Create Virtual DOM components in JavaScript,
● Everything with interactivity is a React
component,
● State, i.e. changes propagate down component
hierarchy,
● Basic approach – file per component
React Component Creation - ES6
● Create components extending
React.Component,
● Implement render function,
● Return UI virtual DOM
Creating a React Component
JSX
● Optional HTML-like mark-up
● Declarative description of the UI inlined in JS code
● Combines ease-of-use of templates with power of
JavaScript
● Preprocessor translates to plain JavaScript:
● On the fly (suitable during development)
● Offline using the React CLI
Component Composition
How is Data/Model Provided to
Components?
● One way data binding means data change in one place,
– i.e only a component responsible for the data can change it,
– All other sub-components can only read it,
– If data is shared between components it is maintained in the
common ancestor
● Props way to pass data from parent to child,→
● State never leaves its containing component→
Component Hierarchies
● Breaking your app
into components
hierarchies is key,
● Understanding data
needs of components
determine where
state is kept
Data Flow – Data is immutable
● Data passed down hierarchy via
– this.props, properties are immutable,→
– this.state state should be held at the appropriate level in→
component hierarchy
● Parent components maintain state,
● How do child component changes to state propagate to
parent?
– Data passed up the hierarchy via parent event handlers being
called by child components
Data Flows Down Hierarchy via
Properties
Data Flow From Child to Parent
Declare Handler in Parent
Data Flow From Child To Parent
Fire Handler in Child
API Methods
● render()
– Return single child element,
– Can return null or false,
– Should not do read or write to the DOM,
– Best for server side rendering
● getInitialState() -
– Used to set the state before component is mounted,
API Methods
● getDefaultProps()
– Invoked on class creation then cached,
– Sets default values on missing props
● propTypes
– Used to validate props passed to component,
● statics
– Defines static methods for component
Component Life Cycle Events
● componentWillMount
– Invoked on client and server,
– Can be used to set state before render is called,
– Invoked on client and server before rendering
● componentDidMount
– Invoked only on client after rendering,
– Can access refs
● componentWillReceiveProps
– Not called for initial render,
– Used to setState
Component Life Cycle Events
● shouldComponentUpdate
– Return false to prevent updating
● componentWillUpdate
● componentDidUpdate,
● componentWillUnmount
Challenges to React?
● HTML 5 Web Components
– Custom components in HTML 5,
– Tied to Web browser DOM Model,
– Lots of reusable components will be available?
– How to integrate with React components
● Possible but do you want this?
● If you don't do it will anyone use your framework?
Mark Clarke @mxc4
Jumping Bean @jumpingbeansa
WWW: www.JumpingBean.co.za

More Related Content

What's hot

Apache Any23 - Anything to Triples
Apache Any23 - Anything to TriplesApache Any23 - Anything to Triples
Apache Any23 - Anything to Triples
Michele Mostarda
 
AngularJS
AngularJSAngularJS
AngularJS
Yogesh L
 
Javascripts. pptt
Javascripts. ppttJavascripts. pptt
Javascripts. pptt
RaviShankarSinghal
 
Experiences with Evangelizing Java Within the Database
Experiences with Evangelizing Java Within the DatabaseExperiences with Evangelizing Java Within the Database
Experiences with Evangelizing Java Within the Database
Marcelo Ochoa
 
Javascript
JavascriptJavascript
Javascript
Mozxai
 
GraphQL is actually rest
GraphQL is actually restGraphQL is actually rest
GraphQL is actually rest
Jakub Riedl
 
Lokijs
LokijsLokijs
Writing Scalable React Applications: Introduction
Writing Scalable React Applications: IntroductionWriting Scalable React Applications: Introduction
Writing Scalable React Applications: Introduction
Klika Tech, Inc
 
Asynchronous Processing in Java/JEE/Spring
Asynchronous Processing in Java/JEE/SpringAsynchronous Processing in Java/JEE/Spring
Asynchronous Processing in Java/JEE/Spring
Naresh Chintalcheru
 
How to add Fixtures into your Django app with Mixer
How to add Fixtures into your Django app with MixerHow to add Fixtures into your Django app with Mixer
How to add Fixtures into your Django app with Mixer
Guinsly Mondesir
 
Robust web apps with React.js
Robust web apps with React.jsRobust web apps with React.js
Robust web apps with React.js
Max Klymyshyn
 
Web development basics (Part-5)
Web development basics (Part-5)Web development basics (Part-5)
Web development basics (Part-5)
Rajat Pratap Singh
 
Using NoSQL MongoDB with ColdFusion
Using NoSQL MongoDB with ColdFusionUsing NoSQL MongoDB with ColdFusion
Using NoSQL MongoDB with ColdFusion
indiver
 
3rd Generation Web Application Platforms
3rd Generation Web Application Platforms3rd Generation Web Application Platforms
3rd Generation Web Application Platforms
Naresh Chintalcheru
 
Java Web services
Java Web servicesJava Web services
Java Web servicesSujit Kumar
 
Postgrtesql as a NoSQL Document Store - The JSON/JSONB data type
Postgrtesql as a NoSQL Document Store - The JSON/JSONB data typePostgrtesql as a NoSQL Document Store - The JSON/JSONB data type
Postgrtesql as a NoSQL Document Store - The JSON/JSONB data type
Jumping Bean
 
Akka - young fighter course
Akka - young fighter courseAkka - young fighter course
Akka - young fighter course
Dmitriy Gutman
 

What's hot (19)

Apache Any23 - Anything to Triples
Apache Any23 - Anything to TriplesApache Any23 - Anything to Triples
Apache Any23 - Anything to Triples
 
Performance (browser)
Performance (browser)Performance (browser)
Performance (browser)
 
AngularJS
AngularJSAngularJS
AngularJS
 
Javascripts. pptt
Javascripts. ppttJavascripts. pptt
Javascripts. pptt
 
Experiences with Evangelizing Java Within the Database
Experiences with Evangelizing Java Within the DatabaseExperiences with Evangelizing Java Within the Database
Experiences with Evangelizing Java Within the Database
 
Websocket,JSON in JEE7
Websocket,JSON in JEE7Websocket,JSON in JEE7
Websocket,JSON in JEE7
 
Javascript
JavascriptJavascript
Javascript
 
GraphQL is actually rest
GraphQL is actually restGraphQL is actually rest
GraphQL is actually rest
 
Lokijs
LokijsLokijs
Lokijs
 
Writing Scalable React Applications: Introduction
Writing Scalable React Applications: IntroductionWriting Scalable React Applications: Introduction
Writing Scalable React Applications: Introduction
 
Asynchronous Processing in Java/JEE/Spring
Asynchronous Processing in Java/JEE/SpringAsynchronous Processing in Java/JEE/Spring
Asynchronous Processing in Java/JEE/Spring
 
How to add Fixtures into your Django app with Mixer
How to add Fixtures into your Django app with MixerHow to add Fixtures into your Django app with Mixer
How to add Fixtures into your Django app with Mixer
 
Robust web apps with React.js
Robust web apps with React.jsRobust web apps with React.js
Robust web apps with React.js
 
Web development basics (Part-5)
Web development basics (Part-5)Web development basics (Part-5)
Web development basics (Part-5)
 
Using NoSQL MongoDB with ColdFusion
Using NoSQL MongoDB with ColdFusionUsing NoSQL MongoDB with ColdFusion
Using NoSQL MongoDB with ColdFusion
 
3rd Generation Web Application Platforms
3rd Generation Web Application Platforms3rd Generation Web Application Platforms
3rd Generation Web Application Platforms
 
Java Web services
Java Web servicesJava Web services
Java Web services
 
Postgrtesql as a NoSQL Document Store - The JSON/JSONB data type
Postgrtesql as a NoSQL Document Store - The JSON/JSONB data typePostgrtesql as a NoSQL Document Store - The JSON/JSONB data type
Postgrtesql as a NoSQL Document Store - The JSON/JSONB data type
 
Akka - young fighter course
Akka - young fighter courseAkka - young fighter course
Akka - young fighter course
 

Viewers also liked

The Creative Economy
The Creative EconomyThe Creative Economy
The Creative Economy
The_IPA
 
Syd Uni professional learning
Syd Uni professional learningSyd Uni professional learning
Syd Uni professional learning
Cameron Paterson
 
Blogging and podcasting
Blogging and podcastingBlogging and podcasting
Blogging and podcasting
Alek Davis
 
How it works under the hood with visual cobol
How it works under the hood with visual cobolHow it works under the hood with visual cobol
How it works under the hood with visual cobol
Micro Focus
 
Building intranet applications with ASP.NET AJAX and jQuery
Building intranet applications with ASP.NET AJAX and jQueryBuilding intranet applications with ASP.NET AJAX and jQuery
Building intranet applications with ASP.NET AJAX and jQuery
Alek Davis
 
Creative Economy
Creative EconomyCreative Economy
Creative Economy
Phil McKinney
 
Visual COBOL Development for Unix and Java
Visual COBOL Development for Unix and JavaVisual COBOL Development for Unix and Java
Visual COBOL Development for Unix and Java
Micro Focus
 
Menú Comedor Escolar
Menú Comedor EscolarMenú Comedor Escolar
Menú Comedor Escolarcpramonlaza
 
Treatment 1 Naomi
Treatment 1 NaomiTreatment 1 Naomi
Treatment 1 Naomi
Oliver Christensen
 
Lip Reconstruction Following Traumatic Lip Injuries | Dr. Alfred Khallouf
Lip Reconstruction Following Traumatic Lip Injuries | Dr. Alfred KhalloufLip Reconstruction Following Traumatic Lip Injuries | Dr. Alfred Khallouf
Lip Reconstruction Following Traumatic Lip Injuries | Dr. Alfred Khallouf
Alfred Khallouf
 
Comprehensive Care Treatment Plan Presentation, Part II | Dr. Alfred Khallouf
Comprehensive Care Treatment Plan Presentation, Part II | Dr. Alfred KhalloufComprehensive Care Treatment Plan Presentation, Part II | Dr. Alfred Khallouf
Comprehensive Care Treatment Plan Presentation, Part II | Dr. Alfred Khallouf
Alfred Khallouf
 
BIOETHICS INVOLVED IN CLONING
 BIOETHICS INVOLVED IN CLONING BIOETHICS INVOLVED IN CLONING
BIOETHICS INVOLVED IN CLONING
Mohsin Shad
 
Medtech (bmls) laws & bioethics intro
Medtech (bmls) laws & bioethics introMedtech (bmls) laws & bioethics intro
Medtech (bmls) laws & bioethics intro
MEI MEI
 
'Documents.tips panduan penulisan-laporan-akhir-ptss.pdf'
'Documents.tips panduan penulisan-laporan-akhir-ptss.pdf''Documents.tips panduan penulisan-laporan-akhir-ptss.pdf'
'Documents.tips panduan penulisan-laporan-akhir-ptss.pdf'
Afina Karim
 
Velocity 2015 linux perf tools
Velocity 2015 linux perf toolsVelocity 2015 linux perf tools
Velocity 2015 linux perf tools
Brendan Gregg
 
La ciudad un escenario para el desarrollo de com petencias cientificas y ciud...
La ciudad un escenario para el desarrollo de com petencias cientificas y ciud...La ciudad un escenario para el desarrollo de com petencias cientificas y ciud...
La ciudad un escenario para el desarrollo de com petencias cientificas y ciud...
Bibiana Villa Vargas
 

Viewers also liked (19)

The Creative Economy
The Creative EconomyThe Creative Economy
The Creative Economy
 
Updated CV 012116
Updated CV 012116Updated CV 012116
Updated CV 012116
 
Syd Uni professional learning
Syd Uni professional learningSyd Uni professional learning
Syd Uni professional learning
 
Blogging and podcasting
Blogging and podcastingBlogging and podcasting
Blogging and podcasting
 
t30.10
t30.10t30.10
t30.10
 
Snapshot
SnapshotSnapshot
Snapshot
 
How it works under the hood with visual cobol
How it works under the hood with visual cobolHow it works under the hood with visual cobol
How it works under the hood with visual cobol
 
Building intranet applications with ASP.NET AJAX and jQuery
Building intranet applications with ASP.NET AJAX and jQueryBuilding intranet applications with ASP.NET AJAX and jQuery
Building intranet applications with ASP.NET AJAX and jQuery
 
Creative Economy
Creative EconomyCreative Economy
Creative Economy
 
Visual COBOL Development for Unix and Java
Visual COBOL Development for Unix and JavaVisual COBOL Development for Unix and Java
Visual COBOL Development for Unix and Java
 
Menú Comedor Escolar
Menú Comedor EscolarMenú Comedor Escolar
Menú Comedor Escolar
 
Treatment 1 Naomi
Treatment 1 NaomiTreatment 1 Naomi
Treatment 1 Naomi
 
Lip Reconstruction Following Traumatic Lip Injuries | Dr. Alfred Khallouf
Lip Reconstruction Following Traumatic Lip Injuries | Dr. Alfred KhalloufLip Reconstruction Following Traumatic Lip Injuries | Dr. Alfred Khallouf
Lip Reconstruction Following Traumatic Lip Injuries | Dr. Alfred Khallouf
 
Comprehensive Care Treatment Plan Presentation, Part II | Dr. Alfred Khallouf
Comprehensive Care Treatment Plan Presentation, Part II | Dr. Alfred KhalloufComprehensive Care Treatment Plan Presentation, Part II | Dr. Alfred Khallouf
Comprehensive Care Treatment Plan Presentation, Part II | Dr. Alfred Khallouf
 
BIOETHICS INVOLVED IN CLONING
 BIOETHICS INVOLVED IN CLONING BIOETHICS INVOLVED IN CLONING
BIOETHICS INVOLVED IN CLONING
 
Medtech (bmls) laws & bioethics intro
Medtech (bmls) laws & bioethics introMedtech (bmls) laws & bioethics intro
Medtech (bmls) laws & bioethics intro
 
'Documents.tips panduan penulisan-laporan-akhir-ptss.pdf'
'Documents.tips panduan penulisan-laporan-akhir-ptss.pdf''Documents.tips panduan penulisan-laporan-akhir-ptss.pdf'
'Documents.tips panduan penulisan-laporan-akhir-ptss.pdf'
 
Velocity 2015 linux perf tools
Velocity 2015 linux perf toolsVelocity 2015 linux perf tools
Velocity 2015 linux perf tools
 
La ciudad un escenario para el desarrollo de com petencias cientificas y ciud...
La ciudad un escenario para el desarrollo de com petencias cientificas y ciud...La ciudad un escenario para el desarrollo de com petencias cientificas y ciud...
La ciudad un escenario para el desarrollo de com petencias cientificas y ciud...
 

Similar to React - The JavaScript Library for User Interfaces

JSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontendJSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontend
Vlad Fedosov
 
Professionalizing the Front-end
Professionalizing the Front-endProfessionalizing the Front-end
Professionalizing the Front-end
Jordi Anguela
 
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
JSFestUA
 
Joomla!Day Poland 2013 - Joomla Architecture (Ofer Cohen)
Joomla!Day Poland 2013 - Joomla Architecture  (Ofer Cohen)Joomla!Day Poland 2013 - Joomla Architecture  (Ofer Cohen)
Joomla!Day Poland 2013 - Joomla Architecture (Ofer Cohen)
Ofer Cohen
 
Jab12 - Joomla! architecture revealed
Jab12 - Joomla! architecture revealedJab12 - Joomla! architecture revealed
Jab12 - Joomla! architecture revealed
Ofer Cohen
 
React learning in the hard way
React   learning in the hard wayReact   learning in the hard way
React learning in the hard way
Chen Feldman
 
Reactjs
Reactjs Reactjs
Reactjs
Neha Sharma
 
20180518 QNAP Seminar - Introduction to React Native
20180518 QNAP Seminar - Introduction to React Native20180518 QNAP Seminar - Introduction to React Native
20180518 QNAP Seminar - Introduction to React Native
Eric Deng
 
FRU Kathmandu: Adopting with Change Frontend Architecture and Patterns
FRU Kathmandu: Adopting with Change Frontend Architecture and PatternsFRU Kathmandu: Adopting with Change Frontend Architecture and Patterns
FRU Kathmandu: Adopting with Change Frontend Architecture and Patterns
Leapfrog Technology Inc.
 
Advanced web application architecture - Talk
Advanced web application architecture - TalkAdvanced web application architecture - Talk
Advanced web application architecture - Talk
Matthias Noback
 
React JS: A Secret Preview
React JS: A Secret PreviewReact JS: A Secret Preview
React JS: A Secret Preview
valuebound
 
"Crafting a Third-Party Banking Library with Web Components and React", Germa...
"Crafting a Third-Party Banking Library with Web Components and React", Germa..."Crafting a Third-Party Banking Library with Web Components and React", Germa...
"Crafting a Third-Party Banking Library with Web Components and React", Germa...
Fwdays
 
Introduction to react native with redux
Introduction to react native with reduxIntroduction to react native with redux
Introduction to react native with redux
Mike Melusky
 
Next.js with drupal, the good parts
Next.js with drupal, the good partsNext.js with drupal, the good parts
Next.js with drupal, the good parts
Taller Negócio Digitais
 
Introduction to ReactJS UI Web Dev .pptx
Introduction to ReactJS UI Web Dev .pptxIntroduction to ReactJS UI Web Dev .pptx
Introduction to ReactJS UI Web Dev .pptx
SHAIKIRFAN715544
 
Fundamental concepts of react js
Fundamental concepts of react jsFundamental concepts of react js
Fundamental concepts of react js
StephieJohn
 
Introduction to React JS.pptx
Introduction to React JS.pptxIntroduction to React JS.pptx
Introduction to React JS.pptx
SHAIKIRFAN715544
 
O365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - MaterialO365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - Material
Thomas Daly
 
Building RESTtful services in MEAN
Building RESTtful services in MEANBuilding RESTtful services in MEAN
Building RESTtful services in MEAN
Madhukara Phatak
 
Introduction to react native
Introduction to react nativeIntroduction to react native
Introduction to react native
Dani Akash
 

Similar to React - The JavaScript Library for User Interfaces (20)

JSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontendJSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontend
 
Professionalizing the Front-end
Professionalizing the Front-endProfessionalizing the Front-end
Professionalizing the Front-end
 
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
 
Joomla!Day Poland 2013 - Joomla Architecture (Ofer Cohen)
Joomla!Day Poland 2013 - Joomla Architecture  (Ofer Cohen)Joomla!Day Poland 2013 - Joomla Architecture  (Ofer Cohen)
Joomla!Day Poland 2013 - Joomla Architecture (Ofer Cohen)
 
Jab12 - Joomla! architecture revealed
Jab12 - Joomla! architecture revealedJab12 - Joomla! architecture revealed
Jab12 - Joomla! architecture revealed
 
React learning in the hard way
React   learning in the hard wayReact   learning in the hard way
React learning in the hard way
 
Reactjs
Reactjs Reactjs
Reactjs
 
20180518 QNAP Seminar - Introduction to React Native
20180518 QNAP Seminar - Introduction to React Native20180518 QNAP Seminar - Introduction to React Native
20180518 QNAP Seminar - Introduction to React Native
 
FRU Kathmandu: Adopting with Change Frontend Architecture and Patterns
FRU Kathmandu: Adopting with Change Frontend Architecture and PatternsFRU Kathmandu: Adopting with Change Frontend Architecture and Patterns
FRU Kathmandu: Adopting with Change Frontend Architecture and Patterns
 
Advanced web application architecture - Talk
Advanced web application architecture - TalkAdvanced web application architecture - Talk
Advanced web application architecture - Talk
 
React JS: A Secret Preview
React JS: A Secret PreviewReact JS: A Secret Preview
React JS: A Secret Preview
 
"Crafting a Third-Party Banking Library with Web Components and React", Germa...
"Crafting a Third-Party Banking Library with Web Components and React", Germa..."Crafting a Third-Party Banking Library with Web Components and React", Germa...
"Crafting a Third-Party Banking Library with Web Components and React", Germa...
 
Introduction to react native with redux
Introduction to react native with reduxIntroduction to react native with redux
Introduction to react native with redux
 
Next.js with drupal, the good parts
Next.js with drupal, the good partsNext.js with drupal, the good parts
Next.js with drupal, the good parts
 
Introduction to ReactJS UI Web Dev .pptx
Introduction to ReactJS UI Web Dev .pptxIntroduction to ReactJS UI Web Dev .pptx
Introduction to ReactJS UI Web Dev .pptx
 
Fundamental concepts of react js
Fundamental concepts of react jsFundamental concepts of react js
Fundamental concepts of react js
 
Introduction to React JS.pptx
Introduction to React JS.pptxIntroduction to React JS.pptx
Introduction to React JS.pptx
 
O365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - MaterialO365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - Material
 
Building RESTtful services in MEAN
Building RESTtful services in MEANBuilding RESTtful services in MEAN
Building RESTtful services in MEAN
 
Introduction to react native
Introduction to react nativeIntroduction to react native
Introduction to react native
 

More from Jumping Bean

DevOpsDaysCPT Ansible Infrastrucutre as Code 2017
DevOpsDaysCPT Ansible Infrastrucutre as Code 2017DevOpsDaysCPT Ansible Infrastrucutre as Code 2017
DevOpsDaysCPT Ansible Infrastrucutre as Code 2017
Jumping Bean
 
IPv6 How To Set Up a Linux IPv6 Lan
IPv6 How To Set Up  a Linux IPv6 LanIPv6 How To Set Up  a Linux IPv6 Lan
IPv6 How To Set Up a Linux IPv6 Lan
Jumping Bean
 
HTML 5 & The Modern Web
HTML 5 & The Modern WebHTML 5 & The Modern Web
HTML 5 & The Modern Web
Jumping Bean
 
Building games-with-libgdx
Building games-with-libgdxBuilding games-with-libgdx
Building games-with-libgdx
Jumping Bean
 
Linux Containers & Docker
Linux Containers & DockerLinux Containers & Docker
Linux Containers & Docker
Jumping Bean
 
Introduction to Web Sockets
Introduction to Web SocketsIntroduction to Web Sockets
Introduction to Web Sockets
Jumping Bean
 
Secrets of a linux ninja Software Freedom Day 2013 Johannesburg, South Africa
Secrets of a linux ninja  Software Freedom Day 2013 Johannesburg, South AfricaSecrets of a linux ninja  Software Freedom Day 2013 Johannesburg, South Africa
Secrets of a linux ninja Software Freedom Day 2013 Johannesburg, South Africa
Jumping Bean
 
M-Learning application development with open source
M-Learning application development with open sourceM-Learning application development with open source
M-Learning application development with open source
Jumping Bean
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
Jumping Bean
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android Development
Jumping Bean
 
Glassfish An Introduction
Glassfish An IntroductionGlassfish An Introduction
Glassfish An Introduction
Jumping Bean
 
Java logging
Java loggingJava logging
Java logging
Jumping Bean
 
IPv6 - Jozi Linux User Group Presentation
IPv6  - Jozi Linux User Group PresentationIPv6  - Jozi Linux User Group Presentation
IPv6 - Jozi Linux User Group PresentationJumping Bean
 
SELinux Johannesburg Linux User Group (JoziJUg)
SELinux Johannesburg Linux User Group (JoziJUg)SELinux Johannesburg Linux User Group (JoziJUg)
SELinux Johannesburg Linux User Group (JoziJUg)
Jumping Bean
 

More from Jumping Bean (14)

DevOpsDaysCPT Ansible Infrastrucutre as Code 2017
DevOpsDaysCPT Ansible Infrastrucutre as Code 2017DevOpsDaysCPT Ansible Infrastrucutre as Code 2017
DevOpsDaysCPT Ansible Infrastrucutre as Code 2017
 
IPv6 How To Set Up a Linux IPv6 Lan
IPv6 How To Set Up  a Linux IPv6 LanIPv6 How To Set Up  a Linux IPv6 Lan
IPv6 How To Set Up a Linux IPv6 Lan
 
HTML 5 & The Modern Web
HTML 5 & The Modern WebHTML 5 & The Modern Web
HTML 5 & The Modern Web
 
Building games-with-libgdx
Building games-with-libgdxBuilding games-with-libgdx
Building games-with-libgdx
 
Linux Containers & Docker
Linux Containers & DockerLinux Containers & Docker
Linux Containers & Docker
 
Introduction to Web Sockets
Introduction to Web SocketsIntroduction to Web Sockets
Introduction to Web Sockets
 
Secrets of a linux ninja Software Freedom Day 2013 Johannesburg, South Africa
Secrets of a linux ninja  Software Freedom Day 2013 Johannesburg, South AfricaSecrets of a linux ninja  Software Freedom Day 2013 Johannesburg, South Africa
Secrets of a linux ninja Software Freedom Day 2013 Johannesburg, South Africa
 
M-Learning application development with open source
M-Learning application development with open sourceM-Learning application development with open source
M-Learning application development with open source
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android Development
 
Glassfish An Introduction
Glassfish An IntroductionGlassfish An Introduction
Glassfish An Introduction
 
Java logging
Java loggingJava logging
Java logging
 
IPv6 - Jozi Linux User Group Presentation
IPv6  - Jozi Linux User Group PresentationIPv6  - Jozi Linux User Group Presentation
IPv6 - Jozi Linux User Group Presentation
 
SELinux Johannesburg Linux User Group (JoziJUg)
SELinux Johannesburg Linux User Group (JoziJUg)SELinux Johannesburg Linux User Group (JoziJUg)
SELinux Johannesburg Linux User Group (JoziJUg)
 

Recently uploaded

LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 

Recently uploaded (20)

LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 

React - The JavaScript Library for User Interfaces

  • 2. About Me ● Solutions integrator at Jumping Bean – Developer & Trainer – Social Media ● Twitter @mxc4 ● Twitter @jumpingbeansa ● LinkedIn
  • 5. What Front-End Technology To Use? ● Mobile? – Native vs HTML5 ● Desktop? – Thin Client/Fat Client ● Swing ● Web? – HTML5, – ECMAScript 5,6,7 – Frameworks ● HTML5/JavaScript – Pros: ● Largest coverage, – Cons: ● Not as fast, slick or integrated as native apps
  • 6. The State of JavaScript Frameworks
  • 7. What to use for JS Front-End? ● Needed to redo a front-end – Angular – Seemed to be the emerging winner, ● Angular 1 versus Angular 2 – Others ● BackBone, ● Ember ● Where to go? ● I am Morpheus - Had to go find “The One”
  • 9. What is React? ● JavaScript library from – FaceBook – Instagram ● “A JavaScript library for building user interfaces” ● Originally built for Single Page Apps, ● Only the View part of an MVC framework
  • 10. How is React Different? ● Existing frameworks – add complexity, – Introduce JavaScript meta-languages, – Can be slow when number of interactive components increase ● One way data-binding ● Two way data-binding is expensive and slow
  • 11. React – A New Approach ● Declarative not imperative, ● UI built out of JavaScript defined components, ● One way data binding, – Immutable UI ● Build components not templates ● Major innovation – Virtual DOM – Generates
  • 12. Virtual DOM ● Abstracts away browser DOM, ● Translates from abstract DOM to concrete browser DOM, ● Power behind one-way binding and UI updates ● Write to Virtual DOM and then “compile” to JavaScript ● On state change generate entire html page and then generate differences and update
  • 13. Virtual DOM – Update Flow 1)Calculate old and new tree, 2)Diff them: – Two components of the same class will generate similar trees – two components of different classes will generate different trees. – It is possible to provide a unique key for elements that is stable across different renders 3) Update changed part of browser DOM
  • 14. Simplified Explanation of React ● Create Virtual DOM components in JavaScript, ● Everything with interactivity is a React component, ● State, i.e. changes propagate down component hierarchy, ● Basic approach – file per component
  • 15. React Component Creation - ES6 ● Create components extending React.Component, ● Implement render function, ● Return UI virtual DOM
  • 16. Creating a React Component
  • 17. JSX ● Optional HTML-like mark-up ● Declarative description of the UI inlined in JS code ● Combines ease-of-use of templates with power of JavaScript ● Preprocessor translates to plain JavaScript: ● On the fly (suitable during development) ● Offline using the React CLI
  • 19. How is Data/Model Provided to Components? ● One way data binding means data change in one place, – i.e only a component responsible for the data can change it, – All other sub-components can only read it, – If data is shared between components it is maintained in the common ancestor ● Props way to pass data from parent to child,→ ● State never leaves its containing component→
  • 20. Component Hierarchies ● Breaking your app into components hierarchies is key, ● Understanding data needs of components determine where state is kept
  • 21. Data Flow – Data is immutable ● Data passed down hierarchy via – this.props, properties are immutable,→ – this.state state should be held at the appropriate level in→ component hierarchy ● Parent components maintain state, ● How do child component changes to state propagate to parent? – Data passed up the hierarchy via parent event handlers being called by child components
  • 22. Data Flows Down Hierarchy via Properties
  • 23. Data Flow From Child to Parent Declare Handler in Parent
  • 24. Data Flow From Child To Parent Fire Handler in Child
  • 25. API Methods ● render() – Return single child element, – Can return null or false, – Should not do read or write to the DOM, – Best for server side rendering ● getInitialState() - – Used to set the state before component is mounted,
  • 26. API Methods ● getDefaultProps() – Invoked on class creation then cached, – Sets default values on missing props ● propTypes – Used to validate props passed to component, ● statics – Defines static methods for component
  • 27. Component Life Cycle Events ● componentWillMount – Invoked on client and server, – Can be used to set state before render is called, – Invoked on client and server before rendering ● componentDidMount – Invoked only on client after rendering, – Can access refs ● componentWillReceiveProps – Not called for initial render, – Used to setState
  • 28. Component Life Cycle Events ● shouldComponentUpdate – Return false to prevent updating ● componentWillUpdate ● componentDidUpdate, ● componentWillUnmount
  • 29. Challenges to React? ● HTML 5 Web Components – Custom components in HTML 5, – Tied to Web browser DOM Model, – Lots of reusable components will be available? – How to integrate with React components ● Possible but do you want this? ● If you don't do it will anyone use your framework?
  • 30. Mark Clarke @mxc4 Jumping Bean @jumpingbeansa WWW: www.JumpingBean.co.za