ISOMORPHIC
JAVASCRIPT
RENDERING ON THE SERVER IS FUN AGAIN
Reacting to the Isomorphic Buzz
Reacting to the Isomorphic Buzz
UNIVERSAL
JAVASCRIPT
HURRY UP AND DO THE TALK BEFORE IT CHANGES
AGAIN
I’m totally not missing the
point of server-side
rendered Javascript
Reacting to the Isomorphic Buzz
Reacting to the Isomorphic Buzz
If I wanted to
drink the
Universal
Kool-Aid, is
there
something
that can
make it as
easy as CSS?
React
• Javascript library for building user interfaces
• Simple components using JSX
• Can be rendered on the server (more to come)
Reacting to the Isomorphic Buzz
CONGRATULATIONS,
YOU MADE A VIEW.
You should see Nick’s
.vimrc file on Github.
FLUX
• Unidirectional Data Flow
• Stores - ActionCreators - Dispatcher -Components
• Event Based Architecture
–Alex G. H. Reed
“So it’s basically a pub-sub system?”
Reacting to the Isomorphic Buzz
Reacting to the Isomorphic Buzz
Reacting to the Isomorphic Buzz
Reacting to the Isomorphic Buzz
2 Entry Points into
Application
• Server: Index Route handler
• Browser: app.js
Major Challenge
• Browser application is asynchronous
• Server needs to be synchronous
But I don’t want
my Javascript to be
synchronous!!!
Differences
• Browser components communicate with
Stores via Actions. (asynchronous)
• Server components call the Store directly
within a static method. (synchronous)
Server
• Render the “route” or view
• Pre-Fetch the data
• Create the HTML as a String
• Store the data where it can be accessed by the
client application.
• Return the response
Reacting to the Isomorphic Buzz
Server Side Render
• Determine what routes/components are active
• Determine what data is needed
• Get the data
• Render the HTML
Have you
tried Vim
yet?
you should
try vim.
I use vim.
Hapi Index Route
Respond with index.html
for every request.
• The router’s run() method is called with a routes
configuration and the current location.
• Routes configuration matches a path to a
component in your application.
• When a path is active, the router stores a reference
to all of the active components in its state.
• Notice we fetch the data (resolve all promises) and
THEN call the callback with:
• Null (no error)
• The rendered HTML as a String
• The merged data object from the fetches
Reacting to the Isomorphic Buzz
Static Blocks
• The statics object allows you to define static
methods that can be called on the component
class.
• Can be run before any component instances are
created.
My beard
game is
never
static.
Static Fetch Method
Reacting to the Isomorphic Buzz
• Notice we fetch the data (resolve all promises) and
THEN call the callback with:
• Null (no error)
• The rendered html as a String
• The merged data object from the fetches
Now the app has been
rendered and the initial
state data has been
fetched.
Hapi Index Route
Jade is as
AWESOME
as
KETCHUP!
Reacting to the Isomorphic Buzz
Reacting to the Isomorphic Buzz
Reacting to the Isomorphic Buzz
Reacting to the Isomorphic Buzz
It would have
been readable
on vim
… Just Sayin
Reacting to the Isomorphic Buzz
TSHIRTS!!!
TSHIRTS!!!
Browser
• Bootstrap the application normally.
• Determine which routes/components are active
• Use the ‘seeded’ data instead of making API
calls during bootstrap process.
• When bootstrap is complete, app behaves as a
normal SPA.
Browser entry
I like
turtles.
Initialize the
Rehydrator
Somewhere in your app that runs before anything else:
Inside the TimesheetStore constructor
Rehydrator instance method
In our Stores’
methods that
retrieve data, we
need to check for
staged data.
Reacting to the Isomorphic Buzz
Seriously,
VIM is so Cool.
jjjjjjjjjjkkkkkkkllkkjjjjjjjjklll
Me
• @brucecoddington
• https://github.com/brucecoddington
• blue moon ghetto on Spotify
Project
Code
You’re Missing the Point of Server-Side Rendered JS - Tom Dale
react-router-mega-demo
Universal Javascript - Michael Jackson
check these out
Ryan Florence’s React Conf Talk
Axios - Matt Zabriske
Congrats Zach and Traci

More Related Content

PDF
An Overview of the React Ecosystem
PDF
Webcomponents are your frameworks best friend
PDF
Introduce flux & react in practice
PDF
Ryan Christiani I Heard React Was Good
PDF
Modern Functional Fluent ColdFusion REST Apis
PDF
Frameworks and webcomponents
PDF
Reactive Thinking in Java with RxJava2
PDF
Akka and AngularJS – Reactive Applications in Practice
An Overview of the React Ecosystem
Webcomponents are your frameworks best friend
Introduce flux & react in practice
Ryan Christiani I Heard React Was Good
Modern Functional Fluent ColdFusion REST Apis
Frameworks and webcomponents
Reactive Thinking in Java with RxJava2
Akka and AngularJS – Reactive Applications in Practice

What's hot (20)

PPTX
Flux architecture
PPTX
C# Async/Await Explained
KEY
PPTX
Valentine with Angular js - Introduction
PPTX
Azkaban and Pig at LinkedIn
PPT
Angular js
PDF
Marrying angular rails
PDF
PDF
Wire once, rewire twice! (Haskell exchange-2018)
PDF
About Flux
PDF
Introduction to React, Flux, and Isomorphic Apps
PDF
Serverless Architecture Patterns - Manoj Ganapathi
PDF
Refactoring @ Mindvalley: Smells, Techniques and Patterns
PPTX
Life Beyond Rails: Creating Cross Platform Ruby Apps
PDF
SpringMVC
PDF
Railsconf 2017 - React & React Native a common codebase across native and web
PPT
Building Reactive webapp with React/Flux
PPT
Angular js
PPTX
Introduce cucumber
Flux architecture
C# Async/Await Explained
Valentine with Angular js - Introduction
Azkaban and Pig at LinkedIn
Angular js
Marrying angular rails
Wire once, rewire twice! (Haskell exchange-2018)
About Flux
Introduction to React, Flux, and Isomorphic Apps
Serverless Architecture Patterns - Manoj Ganapathi
Refactoring @ Mindvalley: Smells, Techniques and Patterns
Life Beyond Rails: Creating Cross Platform Ruby Apps
SpringMVC
Railsconf 2017 - React & React Native a common codebase across native and web
Building Reactive webapp with React/Flux
Angular js
Introduce cucumber
Ad

Similar to Reacting to the Isomorphic Buzz (20)

PDF
React - The JavaScript Library for User Interfaces
PDF
Intro to react_v2
PDF
react hook and wesite making structure ppt
PPTX
001. Introduction about React
PDF
TPSE Thailand 2015 - Rethinking Web with React and Flux
PDF
Workshop 27: Isomorphic web apps with ReactJS
PDF
Content-Driven Apps with React
PDF
FRONTEND DEVELOPMENT WITH REACT.JS
PDF
Mastering JavaScript and DOM: A Gateway to Web Development
PDF
ReactJS - frontend web developing reactjs
PDF
Breaking the Server-Client Divide with Node.js and React
PPTX
Server side rendering review
PDF
MidwestJS 2014 Reconciling ReactJS as a View Layer Replacement
PDF
Reconciling ReactJS as a View Layer Replacement (MidwestJS 2014)
PPTX
vishal presefffffffffffffffffffffffffffffffntations.pptx
PPTX
React js
PDF
Review on React JS
PDF
Back to the future: Isomorphic javascript applications
PDF
Javascript leverage: Isomorphic Applications by Luciano Colosio at Codemotion...
PPTX
ReactJS Code Impact
React - The JavaScript Library for User Interfaces
Intro to react_v2
react hook and wesite making structure ppt
001. Introduction about React
TPSE Thailand 2015 - Rethinking Web with React and Flux
Workshop 27: Isomorphic web apps with ReactJS
Content-Driven Apps with React
FRONTEND DEVELOPMENT WITH REACT.JS
Mastering JavaScript and DOM: A Gateway to Web Development
ReactJS - frontend web developing reactjs
Breaking the Server-Client Divide with Node.js and React
Server side rendering review
MidwestJS 2014 Reconciling ReactJS as a View Layer Replacement
Reconciling ReactJS as a View Layer Replacement (MidwestJS 2014)
vishal presefffffffffffffffffffffffffffffffntations.pptx
React js
Review on React JS
Back to the future: Isomorphic javascript applications
Javascript leverage: Isomorphic Applications by Luciano Colosio at Codemotion...
ReactJS Code Impact
Ad

Recently uploaded (20)

PPTX
Introduction: Living in the IT ERA.pptx
PPTX
IT-Human Computer Interaction Report.pptx
PPTX
Slides World Games Great Redesign Eco Economic Epochs.pptx
PPTX
WEEK 15.pptx WEEK 15.pptx WEEK 15.pptx WEEK 15.pptx
PDF
Testing & QA Checklist for Magento to Shopify Migration Success.pdf
PPTX
IoT Lecture IoT Lecture IoT Lecture IoT Lecture
DOCX
MLS 113 Medical Parasitology (LECTURE).docx
PDF
The_Decisive_Battle_of_Yarmuk,battle of yarmuk
PPTX
Digital Project Mastery using Autodesk Docs Workshops
PPT
chapter 5: system unit computing essentials
PPSX
AI AppSec Threats and Defenses 20250822.ppsx
PPTX
Introduction to networking local area networking
PDF
Virtual Guard Technology Provider_ Remote Security Service Solutions.pdf
PDF
How Technology Shapes Our Information Age
PPTX
COPD_Management_Exacerbation_Detailed_Placeholders.pptx
PPTX
PORTFOLIO SAMPLE…….………………………………. …pptx
PPTX
在线订购名古屋艺术大学毕业证, buy NUA diploma学历认证失败怎么办
PPTX
Going_to_Greece presentation Greek mythology
PPTX
Concepts of Object Oriented Programming.
PDF
AGENT SLOT TERPERCAYA INDONESIA – MAIN MUDAH, WD CEPAT, HANYA DI KANCA4D
Introduction: Living in the IT ERA.pptx
IT-Human Computer Interaction Report.pptx
Slides World Games Great Redesign Eco Economic Epochs.pptx
WEEK 15.pptx WEEK 15.pptx WEEK 15.pptx WEEK 15.pptx
Testing & QA Checklist for Magento to Shopify Migration Success.pdf
IoT Lecture IoT Lecture IoT Lecture IoT Lecture
MLS 113 Medical Parasitology (LECTURE).docx
The_Decisive_Battle_of_Yarmuk,battle of yarmuk
Digital Project Mastery using Autodesk Docs Workshops
chapter 5: system unit computing essentials
AI AppSec Threats and Defenses 20250822.ppsx
Introduction to networking local area networking
Virtual Guard Technology Provider_ Remote Security Service Solutions.pdf
How Technology Shapes Our Information Age
COPD_Management_Exacerbation_Detailed_Placeholders.pptx
PORTFOLIO SAMPLE…….………………………………. …pptx
在线订购名古屋艺术大学毕业证, buy NUA diploma学历认证失败怎么办
Going_to_Greece presentation Greek mythology
Concepts of Object Oriented Programming.
AGENT SLOT TERPERCAYA INDONESIA – MAIN MUDAH, WD CEPAT, HANYA DI KANCA4D

Reacting to the Isomorphic Buzz