SlideShare a Scribd company logo
Breaking the Server-Client
Divide with Node.js and React
Dejan Glozic, Full-Stack Architect, IBM Cloud Data Services
2015 Programming Layer
About Me
IBM Canada Toronto Lab
Full-Stack Architect
IBM Cloud Data Services
@dglozic
http://dejanglozic.com
What I Work On
Part 1
Brief history of the server-client wars
First there was only server
It sent pages with text, hyperlinks and images back to the browser.
Then we started running code
Great improvement, pages started coming back tailored to the user and request.
Then came Ajax
Microsoft (yes, Microsoft) added XMLHTTPRequest.

JJG called this Ajax (I don’t even).
Then came the frameworks
Because spaghetti is great with meatballs, less great with jQuery.
It’s not done until it’s overdone
‘Extreme Ajax’

desktop != server != client
2012, Twitter: Server is good!
Pendulum swings back, because ‘time to the first tweet’ is less when server helps.
2013: Node.js extends UI tier
Nicholas Zakas says: UI is now client + Node.js server
2013: airbnb coins ‘Isomorphic’
Then it creates rendr (Keynote spell checkr throws a hissy fit)
2014: React takes off
Yes, it was released in 2013 but you could not shut up about Angular then.
2015: React is Hot
Also, a bunch of nerds get together at a Toronto conference to talk about all this.
Part 2
Just enough React to make you dangerous.
Don’t compare React to
Angular.
React is just for views. You need router, model and event layers.
It assumes life is short
You (and others) should know what your code does 6 months from now.
It does not make you feel stupid
<todo-cmp [model]="todo" (complete)="onCompletingTodo(todo)"></todo-cmp>
When the state changes, render
That’s it. Seriously.
Virtual DOM is the key
React diffs virtual and real DOM, applies delta only.
Virtual DOM in other contexts
Server rendering, React Native.
Flux+React
Dispatcher
Data Store
ViewServer ActionAction
Part 3
In which we meet react-router and react-engine
JS
Flip the fake pages
Because we are really just showing and hiding divs
Boxes inside other boxes
A
B
C
Route: /A/B/C
React Express views
Virtual DOM can render into a buffer - or an Express response.
react-router is JavaScript
And Node.js can run JavaScript on the server. Hmm…
Breaking the Server-Client Divide with Node.js and React
Meet react-engine
Blend server and client using React, Express, react-router and web pack
View
All together now
react-
router
View react-engine
server.js
react-engine
client.js
react-
router View
View
Server Client
Part 4
Demo + code review, first attempt
How To Follow
• Source code on GitHub: http://github.com/
dglozic/react-engine-demo
• Hosted on Bluemix: http://react-engine-
demo.mybluemix.net
Part 5
Once again, this time for the real world
Remember this page?
Not everybody uses React
Need a compromise UI composition solution for the uber-system.
Dust.js to the rescue
Header (HTML/CSS/JS)
Page content (React)
Nav
(ditto)
Microservice 1
Microservice 2 Microservice 3
Let’s try again
• Source code on GitHub: https://github.com/dglozic/
fsto2015-demo
• Hosted on Bluemix: http://fsto-2015-
demo.mybluemix.net/
Conclusion
Isomorphic apps FTW
Server or client rendering? Yes!
There is no need to choose sides any more.
Initial server rendering
Instant browser content, automatic SEO
Client mount
Server-rendered state is not lost
Client takes over
All the virtues of client side JS, guilt-free
Breaking the Server-Client Divide with Node.js and React
Yes, I know about Meteor
We prefer flexibility of React ecosystem to ‘full framework’ lock-in of Meteor
React community hedge
Our full stack consists of multiple libraries, reducing single vendor risk
Q/A
?
Thank you!
Follow me on Twitter: @dglozic

Read my blog: dejanglozic.com
2015 Programming Layer

More Related Content

What's hot (20)

PPT
React js
Jai Santhosh
 
PDF
React Fundamentals - Jakarta JS, Apr 2016
Simon Sturmer
 
PPTX
React js Online Training
Learntek1
 
PPTX
Reactjs
Neha Sharma
 
PDF
Introduction to react
kiranabburi
 
PDF
React js
Rajesh Kolla
 
PPTX
Introduction to react_js
MicroPyramid .
 
PDF
Introduction to ReactJS
Jarosław Jaryszew
 
PPTX
Introduction to ReactJs & fundamentals
websyndicate
 
PPTX
ReactJS.NET - Fast and Scalable Single Page Applications
Rick Beerendonk
 
PPTX
Its time to React.js
Ritesh Mehrotra
 
PDF
An introduction to React.js
Emanuele DelBono
 
PPTX
Reactjs workshop
Ahmed rebai
 
PDF
React.js
Łukasz Kużyński
 
PDF
Understanding Facebook's React.js
Federico Torre
 
PDF
Introduction to React JS
Bethmi Gunasekara
 
PDF
React Lifecycle and Reconciliation
Zhihao Li
 
PPTX
React JS: A Secret Preview
valuebound
 
PPTX
React js Rahil Memon
RahilMemon5
 
PDF
Workshop React.js
Commit University
 
React js
Jai Santhosh
 
React Fundamentals - Jakarta JS, Apr 2016
Simon Sturmer
 
React js Online Training
Learntek1
 
Reactjs
Neha Sharma
 
Introduction to react
kiranabburi
 
React js
Rajesh Kolla
 
Introduction to react_js
MicroPyramid .
 
Introduction to ReactJS
Jarosław Jaryszew
 
Introduction to ReactJs & fundamentals
websyndicate
 
ReactJS.NET - Fast and Scalable Single Page Applications
Rick Beerendonk
 
Its time to React.js
Ritesh Mehrotra
 
An introduction to React.js
Emanuele DelBono
 
Reactjs workshop
Ahmed rebai
 
Understanding Facebook's React.js
Federico Torre
 
Introduction to React JS
Bethmi Gunasekara
 
React Lifecycle and Reconciliation
Zhihao Li
 
React JS: A Secret Preview
valuebound
 
React js Rahil Memon
RahilMemon5
 
Workshop React.js
Commit University
 

Viewers also liked (20)

PPTX
Cam Chat Roulette
Carl Miller
 
PDF
Lars thorup-react-and-redux-2016-09
BestBrains
 
PDF
React 튜토리얼 2차시
태현 김
 
PDF
TDC São Paulo - React presentation
Danillo Corvalan
 
PDF
Nodifying the Enterprise - Prince Soni, TO THE NEW
NodejsFoundation
 
PDF
Continuous Deployment with Kubernetes, Docker and GitLab CI
alexanderkiel
 
PPTX
Grokking TechTalk #16: F**k bad CSS
Grokking VN
 
PDF
React 튜토리얼 1차시
태현 김
 
PPTX
Grokking TechTalk #16: Maybe functor in javascript
Grokking VN
 
PDF
Introduction to React Native & Redux
Barak Cohen
 
PPT
Get MEAN! Node.js and the MEAN stack
Nicholas McClay
 
PPTX
Grokking TechTalk #16: React stack at lozi
Grokking VN
 
PPTX
TDC2016SP - Trilha Frameworks JavaScript
tdc-globalcode
 
PDF
Using ReactJS in AngularJS
Boris Dinkevich
 
PPTX
Building Next-Generation Web APIs with JSON-LD and Hydra
Markus Lanthaler
 
PDF
Architecting large Node.js applications
Sergi Mansilla
 
PDF
React Native를 사용한
 초간단 커뮤니티 앱 제작
Taegon Kim
 
PDF
Facebook은 React를 왜 만들었을까?
Kim Hunmin
 
PDF
Modern UI Development With Node.js
Ryan Anklam
 
PDF
Anatomy of a Modern Node.js Application Architecture
AppDynamics
 
Cam Chat Roulette
Carl Miller
 
Lars thorup-react-and-redux-2016-09
BestBrains
 
React 튜토리얼 2차시
태현 김
 
TDC São Paulo - React presentation
Danillo Corvalan
 
Nodifying the Enterprise - Prince Soni, TO THE NEW
NodejsFoundation
 
Continuous Deployment with Kubernetes, Docker and GitLab CI
alexanderkiel
 
Grokking TechTalk #16: F**k bad CSS
Grokking VN
 
React 튜토리얼 1차시
태현 김
 
Grokking TechTalk #16: Maybe functor in javascript
Grokking VN
 
Introduction to React Native & Redux
Barak Cohen
 
Get MEAN! Node.js and the MEAN stack
Nicholas McClay
 
Grokking TechTalk #16: React stack at lozi
Grokking VN
 
TDC2016SP - Trilha Frameworks JavaScript
tdc-globalcode
 
Using ReactJS in AngularJS
Boris Dinkevich
 
Building Next-Generation Web APIs with JSON-LD and Hydra
Markus Lanthaler
 
Architecting large Node.js applications
Sergi Mansilla
 
React Native를 사용한
 초간단 커뮤니티 앱 제작
Taegon Kim
 
Facebook은 React를 왜 만들었을까?
Kim Hunmin
 
Modern UI Development With Node.js
Ryan Anklam
 
Anatomy of a Modern Node.js Application Architecture
AppDynamics
 
Ad

Similar to Breaking the Server-Client Divide with Node.js and React (20)

PDF
React server side rendering performance
Nick Dreckshage
 
PDF
Reacting to the Isomorphic Buzz
Bruce Coddington
 
PPTX
Seminar report based on Mern stack web technology
Mm071
 
PPTX
Isomorphic JavaScript – future of the web
Sigma Software
 
PDF
MidwestJS 2014 Reconciling ReactJS as a View Layer Replacement
Zach Lendon
 
PDF
Reconciling ReactJS as a View Layer Replacement (MidwestJS 2014)
Zach Lendon
 
PPTX
React js
Nikhil Karkra
 
PPTX
mern _stack _power _point_ presentation(1)
susmithalanka2
 
PDF
What is Node.js? (ICON UK)
Tim Davis
 
PDF
Nodejs vs react js converted
Sovereign software solution
 
PPTX
Server side rendering review
Vladyslav Morzhanov
 
PDF
TPSE Thailand 2015 - Rethinking Web with React and Flux
Jirat Kijlerdpornpailoj
 
PDF
Review on React JS
ijtsrd
 
PPTX
Client vs Server Components in Next.js.pptx
UdithaKasun3
 
PDF
React Js vs Node Js_ Which Framework to Choose for Your Next Web Application
adityakumar2080
 
PPTX
prag ati.pptx
vikashyadav23235277
 
PPTX
recenttrendtechnology-2112N18132657.pptx
AMITKUMAR938671
 
PPTX
Introduction to MERN Stack
Surya937648
 
PPTX
web development with mern stack in power point
RAMKUMARRIT20
 
PPTX
Final year presentation topicssssss in 1
RAMKUMARRIT20
 
React server side rendering performance
Nick Dreckshage
 
Reacting to the Isomorphic Buzz
Bruce Coddington
 
Seminar report based on Mern stack web technology
Mm071
 
Isomorphic JavaScript – future of the web
Sigma Software
 
MidwestJS 2014 Reconciling ReactJS as a View Layer Replacement
Zach Lendon
 
Reconciling ReactJS as a View Layer Replacement (MidwestJS 2014)
Zach Lendon
 
React js
Nikhil Karkra
 
mern _stack _power _point_ presentation(1)
susmithalanka2
 
What is Node.js? (ICON UK)
Tim Davis
 
Nodejs vs react js converted
Sovereign software solution
 
Server side rendering review
Vladyslav Morzhanov
 
TPSE Thailand 2015 - Rethinking Web with React and Flux
Jirat Kijlerdpornpailoj
 
Review on React JS
ijtsrd
 
Client vs Server Components in Next.js.pptx
UdithaKasun3
 
React Js vs Node Js_ Which Framework to Choose for Your Next Web Application
adityakumar2080
 
prag ati.pptx
vikashyadav23235277
 
recenttrendtechnology-2112N18132657.pptx
AMITKUMAR938671
 
Introduction to MERN Stack
Surya937648
 
web development with mern stack in power point
RAMKUMARRIT20
 
Final year presentation topicssssss in 1
RAMKUMARRIT20
 
Ad

Recently uploaded (20)

PDF
Streamline Contractor Lifecycle- TECH EHS Solution
TECH EHS Solution
 
PPTX
An Introduction to ZAP by Checkmarx - Official Version
Simon Bennetts
 
PDF
Capcut Pro Crack For PC Latest Version {Fully Unlocked} 2025
hashhshs786
 
PPTX
The Role of a PHP Development Company in Modern Web Development
SEO Company for School in Delhi NCR
 
PPTX
Java Native Memory Leaks: The Hidden Villain Behind JVM Performance Issues
Tier1 app
 
PDF
Executive Business Intelligence Dashboards
vandeslie24
 
PPTX
Platform for Enterprise Solution - Java EE5
abhishekoza1981
 
PPTX
Migrating Millions of Users with Debezium, Apache Kafka, and an Acyclic Synch...
MD Sayem Ahmed
 
PDF
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
PDF
Linux Certificate of Completion - LabEx Certificate
VICTOR MAESTRE RAMIREZ
 
PDF
Revenue streams of the Wazirx clone script.pdf
aaronjeffray
 
PDF
Thread In Android-Mastering Concurrency for Responsive Apps.pdf
Nabin Dhakal
 
PPTX
Feb 2021 Cohesity first pitch presentation.pptx
enginsayin1
 
PPTX
Engineering the Java Web Application (MVC)
abhishekoza1981
 
PPTX
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pptx
Varsha Nayak
 
PPTX
A Complete Guide to Salesforce SMS Integrations Build Scalable Messaging With...
360 SMS APP
 
PDF
Efficient, Automated Claims Processing Software for Insurers
Insurance Tech Services
 
PDF
GetOnCRM Speeds Up Agentforce 3 Deployment for Enterprise AI Wins.pdf
GetOnCRM Solutions
 
PDF
HiHelloHR – Simplify HR Operations for Modern Workplaces
HiHelloHR
 
PPTX
Tally software_Introduction_Presentation
AditiBansal54083
 
Streamline Contractor Lifecycle- TECH EHS Solution
TECH EHS Solution
 
An Introduction to ZAP by Checkmarx - Official Version
Simon Bennetts
 
Capcut Pro Crack For PC Latest Version {Fully Unlocked} 2025
hashhshs786
 
The Role of a PHP Development Company in Modern Web Development
SEO Company for School in Delhi NCR
 
Java Native Memory Leaks: The Hidden Villain Behind JVM Performance Issues
Tier1 app
 
Executive Business Intelligence Dashboards
vandeslie24
 
Platform for Enterprise Solution - Java EE5
abhishekoza1981
 
Migrating Millions of Users with Debezium, Apache Kafka, and an Acyclic Synch...
MD Sayem Ahmed
 
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
Linux Certificate of Completion - LabEx Certificate
VICTOR MAESTRE RAMIREZ
 
Revenue streams of the Wazirx clone script.pdf
aaronjeffray
 
Thread In Android-Mastering Concurrency for Responsive Apps.pdf
Nabin Dhakal
 
Feb 2021 Cohesity first pitch presentation.pptx
enginsayin1
 
Engineering the Java Web Application (MVC)
abhishekoza1981
 
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pptx
Varsha Nayak
 
A Complete Guide to Salesforce SMS Integrations Build Scalable Messaging With...
360 SMS APP
 
Efficient, Automated Claims Processing Software for Insurers
Insurance Tech Services
 
GetOnCRM Speeds Up Agentforce 3 Deployment for Enterprise AI Wins.pdf
GetOnCRM Solutions
 
HiHelloHR – Simplify HR Operations for Modern Workplaces
HiHelloHR
 
Tally software_Introduction_Presentation
AditiBansal54083
 

Breaking the Server-Client Divide with Node.js and React