SlideShare a Scribd company logo
ISOMORPHIC
JAVASCRIPT
APPLICATIONS
(*yawn*…… wut?)
ABOUT ME
Scandinavia Online
JavaScript / node.js <3
github @eiriklv
twitter @eiriklv
+ =
ISOMORPHIC
JAVASCRIPT
Yes, fancy words
- but why should I care..?
ISOMORPHIC
wtf do you
even mean bro?
JAVASCRIPT
days since last framework?
JAVASCRIPT
0
JAVASCRIPT
embularactymerbone.js
(credits to @ryanflorence)
WEB DEVELOPMENT
HTML5
CSS3
Isomorphic
Async
CDNAJAX JSON
Minification
WebSockets
TranspilingSEO
ES6
kamelåså.js
ISOMORPHIC JS
Turns out:
Not that scary
after all
ISOMORPHIC JS
server
(node.js)
client
(browser)
other
(e.g iOS)
JavaScript
ISOMORPHIC JS
An abstraction on top of
your environments
THE GOOD OL’
DAYS
When everything was easy(?)
SERVER-SIDE
Just ship it all from
scratch every time
SERVER-SIDE
So easy!
SERVER-SIDE
But poor user experience
if you interact a lot
NOT GOOD ENOUGH
Gimme some dynamic web
pages already!
CLIENT-SIDE (SPA)
Look ma’
I can do all the things
without reloading now!
CLIENT-SIDE (SPA)
CLIENT-SIDE (SPA)
Don’t you dare press the
back button
CLIENT-SIDE (SPA)
SEO..?
SERVER-SIDE
•Easy to reason about
•SEO out of the box
SERVER-SIDE
•Every action is a refresh
•Poor user experience for
dynamic apps
CLIENT-SIDE (SPA)
•Actions without refresh
•Less redundancy
•Better user experience
CLIENT-SIDE (SPA)
•No content before the js loads
•SEO can be a PITA
BUT I WANT IT ALL!
SERVER + CLIENT
•Gets your stuff done
•Two separate codebases
for the same application
SERVER + CLIENT
Well that turned into a
mess pretty quickly..
anecdotal -
YMMV
BOLD STATEMENTS
Approaching..
ISOMORPHIC
•All the above!
•None of the above!



(yeah,right…)
ISOMORPHIC
ISOMORPHISM
Demystified
No more conceptual
divide between the
server and the client
ISOMORPHISM
ISOMORPHISM
server
(node.js)
client
(browser)
JavaScript (your app)
ISOMORPHISM
Request
from user
(HTTP)
Load
the same
JavaScript
on client
«Hook»
into the
rendered
app
Respond
with
HTML
Render
on server
with
JavaScript
ISOMORPHISM
Request
from user
(HTTP)
Load
the same
JavaScript
on client
«Hook»
into the
rendered
app
Respond
with
HTML
Render
on server
with
JavaScript
ISOMORPHISM
Request
from user
(HTTP)
Load
the same
JavaScript
on client
«Hook»
into the
rendered
app
Respond
with
HTML
Render
on server
with
JavaScript
Request
from user
(HTTP)
Load
the same
JavaScript
on client
«Hook»
into the
rendered
app
Respond
with
HTML
Render
on server
with
JavaScript
ISOMORPHISM
Request
from user
(HTTP)
Load
the same
JavaScript
on client
«Hook»
into the
rendered
app
Respond
with
HTML
Render
on server
with
JavaScript
ISOMORPHISM
Request
from user
(HTTP)
Load
the same
JavaScript
on client
«Hook»
into the
rendered
app
Respond
with
HTML
Render
on server
with
JavaScript
We need to use
abstractions that are
environment agnostic
ISOMORPHISM
HOW CAN I DO THIS?
So many options..
Building Isomorphic JavaScript Apps - NDC 2015
Building Isomorphic JavaScript Apps - NDC 2015
Building Isomorphic JavaScript Apps - NDC 2015
REACT
server
(node.js)
String
(HTML)
React.renderToString()
server
(node.js)
String
client
(browser)
DOM
(nodes)
REACT
React.render()
LETS BUILD ONE
The simplest isomorphic
JavaScript app?
+
Building Isomorphic JavaScript Apps - NDC 2015
Building Isomorphic JavaScript Apps - NDC 2015
Building Isomorphic JavaScript Apps - NDC 2015
Building Isomorphic JavaScript Apps - NDC 2015
|——/components
| |—— App.jsx
| |—— Video.jsx
|——/render
| |—— server.js
| |—— client.js
|——/services
| |—— get-ndc-videos.js
|
|——app.js
|——webpack.config.js
|——/components
| |—— App.jsx
| |—— Video.jsx
|——/render
| |—— server.js
| |—— client.js
|——/services
| |—— get-ndc-videos.js
|
|——app.js
|——webpack.config.js
Building Isomorphic JavaScript Apps - NDC 2015
|——/components
| |—— App.jsx
| |—— Video.jsx
|——/render
| |—— server.js
| |—— client.js
|——/services
| |—— get-ndc-videos.js
|
|——app.js
|——webpack.config.js
Building Isomorphic JavaScript Apps - NDC 2015
|——/components
| |—— App.jsx
| |—— Video.jsx
|——/render
| |—— server.js
| |—— client.js
|——/services
| |—— get-ndc-videos.js
|
|——app.js
|——webpack.config.js
Building Isomorphic JavaScript Apps - NDC 2015
|——/components
| |—— App.jsx
| |—— Video.jsx
|——/render
| |—— server.js
| |—— client.js
|——/services
| |—— get-ndc-videos.js
|
|——app.js
|——webpack.config.js
Building Isomorphic JavaScript Apps - NDC 2015
Building Isomorphic JavaScript Apps - NDC 2015
Building Isomorphic JavaScript Apps - NDC 2015
Building Isomorphic JavaScript Apps - NDC 2015
Building Isomorphic JavaScript Apps - NDC 2015
Building Isomorphic JavaScript Apps - NDC 2015
Building Isomorphic JavaScript Apps - NDC 2015
|——/components
| |—— App.jsx
| |—— Video.jsx
|——/render
| |—— server.js
| |—— client.js
|——/services
| |—— get-ndc-videos.js
|
|——app.js
|——webpack.config.js
Building Isomorphic JavaScript Apps - NDC 2015
Building Isomorphic JavaScript Apps - NDC 2015
Building Isomorphic JavaScript Apps - NDC 2015
|——/components
| |—— App.jsx
| |—— Video.jsx
|——/render
| |—— server.js
| |—— client.js
|——/services
| |—— get-ndc-videos.js
|
|——app.js
|——webpack.config.js
Building Isomorphic JavaScript Apps - NDC 2015
Building Isomorphic JavaScript Apps - NDC 2015
Building Isomorphic JavaScript Apps - NDC 2015
Building Isomorphic JavaScript Apps - NDC 2015
|——/components
| |—— App.jsx
| |—— Video.jsx
|——/render
| |—— server.js
| |—— client.js
|——/services
| |—— get-ndc-videos.js
|
|——app.js
|——webpack.config.js
Building Isomorphic JavaScript Apps - NDC 2015
Building Isomorphic JavaScript Apps - NDC 2015
Building Isomorphic JavaScript Apps - NDC 2015
Building Isomorphic JavaScript Apps - NDC 2015
|——/components
| |—— App.jsx
| |—— Video.jsx
|——/render
| |—— server.js
| |—— client.js
|——/services
| |—— get-ndc-videos.js
|——/public
| |—— bundle.js
|
|——app.js
|——webpack.config.js
Building Isomorphic JavaScript Apps - NDC 2015
|——/components
| |—— App.jsx
| |—— Video.jsx
|——/render
| |—— server.js
| |—— client.js
|——/services
| |—— get-ndc-videos.js
|
|——app.js
|——webpack.config.js
> webpack
> node app.js
> open http://localhost:3000
Building Isomorphic JavaScript Apps - NDC 2015
Building Isomorphic JavaScript Apps - NDC 2015
Building Isomorphic JavaScript Apps - NDC 2015
Building Isomorphic JavaScript Apps - NDC 2015
Building Isomorphic JavaScript Apps - NDC 2015
Building Isomorphic JavaScript Apps - NDC 2015
Building Isomorphic JavaScript Apps - NDC 2015
Building Isomorphic JavaScript Apps - NDC 2015
Building Isomorphic JavaScript Apps - NDC 2015
Building Isomorphic JavaScript Apps - NDC 2015
We have an isomorphic
JavaScript app!
THE POINT OF IT ALL
To be fancy?
(yes, but no)
Maintainability
(single codebase)
THE POINT OF IT ALL
SEO
THE POINT OF IT ALL
•Progressive Enhancement
•Graceful degradation
THE POINT OF IT ALL
Abstracting away the gap
betweet server and client
THE POINT OF IT ALL
ISOMORPHISM
There’s more to it
RENDERING
RENDERING
render()
vs.
renderToString()
ROUTING
- router
ROUTING
req.url
vs.
window.location
ROUTING
Different inputs
- same API
- router
DATA FETCHING
superagent
DATA FETCHING
XMLHttpRequest
vs.
http.request
DATA FETCHING
superagent.get(‘/videos/12’)
DATA FETCHING
Different implementations
- same API
MODULES
All abstractions must be
isomorphic
(i.e - work on both the client and server)
MODULES
If a module does not depend
on the environment it is
isomorphic by default
DEMO
Let’s look at fully
isomorphic application in
action
DEMO
•rendering
•routing
•data fetching
Isomorphic:
RECAP
Why should we use this did
you say..?
WHY YOU SHOULD BE EXITED
•Less context switching
•Maintainability
•Best of both worlds
WHY YOU SHOULD BE EXITED
•We push features faster(*)
(*) anecdotal
- YMMV
CODE
github.com/eiriklv/ndc-isomorphic
github.com/eiriklv/ndc-isomorphic-flux
QUESTIONS?
github.com/eiriklv/ndc-isomorphic
github.com/eiriklv/ndc-isomorphic-flux
THANKS!
Scandinavia Online
JavaScript / node.js <3
github @eiriklv
twitter @eiriklv

More Related Content

What's hot (20)

PDF
Isomorphic web application
Oliver N
 
PDF
JavaScript Engine and WebAssembly
Changhwan Yi
 
PDF
WebAssembly vs JavaScript: What is faster?
Alexandr Skachkov
 
PDF
Node, express & sails
Brian Shannon
 
PDF
WebAssembly Overview
Alexandr Skachkov
 
PPTX
JavaScript Performance (at SFJS)
Steve Souders
 
PDF
Refactoring to a Single Page Application
Codemotion
 
PPTX
WebAssembly WASM Introduction Presentation
Brad Beiermann
 
PDF
Node.js with Express
Gergely Németh
 
PPTX
MEAN stack
Iryney Baran
 
PPTX
AngularJS vs React JS vs Node JS: Which is Best For Web Development ?
MarkupBox
 
PPT
Server-side JavaScript for the rest of us
Kyle Simpson
 
PDF
WebAssembly in Houdini CSS, is it possible?
Alexandr Skachkov
 
PPTX
Single Page Application (SPA) using AngularJS
M R Rony
 
ODP
WordPress as a Platform - talk to Bristol Open Source Meetup, 2014-12-08
Tim Stephenson
 
PPT
Web assembly overview by Mikhail Sorokovsky
Valeriia Maliarenko
 
PDF
SxSW 2015
Mike McNeil
 
ODP
An Introduction to WebAssembly
Daniel Budden
 
PDF
Back to the future: Isomorphic javascript applications
Luciano Colosio
 
PPTX
Single Page WebApp Architecture
Morgan Cheng
 
Isomorphic web application
Oliver N
 
JavaScript Engine and WebAssembly
Changhwan Yi
 
WebAssembly vs JavaScript: What is faster?
Alexandr Skachkov
 
Node, express & sails
Brian Shannon
 
WebAssembly Overview
Alexandr Skachkov
 
JavaScript Performance (at SFJS)
Steve Souders
 
Refactoring to a Single Page Application
Codemotion
 
WebAssembly WASM Introduction Presentation
Brad Beiermann
 
Node.js with Express
Gergely Németh
 
MEAN stack
Iryney Baran
 
AngularJS vs React JS vs Node JS: Which is Best For Web Development ?
MarkupBox
 
Server-side JavaScript for the rest of us
Kyle Simpson
 
WebAssembly in Houdini CSS, is it possible?
Alexandr Skachkov
 
Single Page Application (SPA) using AngularJS
M R Rony
 
WordPress as a Platform - talk to Bristol Open Source Meetup, 2014-12-08
Tim Stephenson
 
Web assembly overview by Mikhail Sorokovsky
Valeriia Maliarenko
 
SxSW 2015
Mike McNeil
 
An Introduction to WebAssembly
Daniel Budden
 
Back to the future: Isomorphic javascript applications
Luciano Colosio
 
Single Page WebApp Architecture
Morgan Cheng
 

Viewers also liked (11)

PDF
Isomorphic javascript - Uppsala.js #8
Alexander Aivars
 
PPT
Isomorphic Javascript - nodebr
David Lojudice Sobrinho
 
PPTX
Isomorphic react in real life
Jonas Ohlsson Aden
 
PDF
Kharkiv JS 2015 - Creating isomorphic applications in React (en)
Viktor Turskyi
 
PDF
Performance and Scalability Art of Isomorphic React Applications
Denis Izmaylov
 
PDF
Isomorphic Aplication with Javascript
Hengki Sihombing
 
PDF
Isomorphic React Applications: Performance And Scalability
Denis Izmaylov
 
PDF
React Native GUIDE
dcubeio
 
PPTX
[114]angularvs react 김훈민손찬욱
NAVER D2
 
PDF
Isolated React Js components
Abe García
 
PDF
Ways to measure & boost performance of your React app
Kateryna Porshnieva
 
Isomorphic javascript - Uppsala.js #8
Alexander Aivars
 
Isomorphic Javascript - nodebr
David Lojudice Sobrinho
 
Isomorphic react in real life
Jonas Ohlsson Aden
 
Kharkiv JS 2015 - Creating isomorphic applications in React (en)
Viktor Turskyi
 
Performance and Scalability Art of Isomorphic React Applications
Denis Izmaylov
 
Isomorphic Aplication with Javascript
Hengki Sihombing
 
Isomorphic React Applications: Performance And Scalability
Denis Izmaylov
 
React Native GUIDE
dcubeio
 
[114]angularvs react 김훈민손찬욱
NAVER D2
 
Isolated React Js components
Abe García
 
Ways to measure & boost performance of your React app
Kateryna Porshnieva
 
Ad

Similar to Building Isomorphic JavaScript Apps - NDC 2015 (20)

KEY
20120306 dublin js
Richard Rodger
 
PDF
JavaScript is the new black - Why Node.js is going to rock your world - Web 2...
Tom Croucher
 
KEY
20120802 timisoara
Richard Rodger
 
PPTX
Introduction to Node.js
Vikash Singh
 
KEY
Practical Use of MongoDB for Node.js
async_io
 
PPTX
Node.JS| Coffeescript Presentation
Sam Frons
 
PDF
Javascript leverage: Isomorphic Applications by Luciano Colosio at Codemotion...
Codemotion Dubai
 
KEY
20120514 nodejsdublin
Richard Rodger
 
PDF
Node.js and How JavaScript is Changing Server Programming
Tom Croucher
 
PDF
Go Pro, Inc. Case Study: Dive into the details of our node.js applications
Andrew Maxwell
 
PPTX
Isomorphic JavaScript – future of the web
Sigma Software
 
KEY
Let's run JavaScript Everywhere
Tom Croucher
 
PDF
Workflow driven development
DmitryDemyankov
 
ODP
Introduce about Nodejs - duyetdev.com
Van-Duyet Le
 
PDF
2013 04-02-server-side-backbone
SC5.io
 
PPTX
VisualWeb - Building a NodeJS Server Meshwork and Full-Javascript Stack Frame...
itsatony
 
PPT
Node js
Chirag Parmar
 
PDF
Server Side JavaScript - You ain't seen nothing yet
Tom Croucher
 
PPTX
Isomorphic apps
aditya rohilla
 
PDF
Transitioning Groupon to Node.js - EmpireJS 2014
Sean McCullough
 
20120306 dublin js
Richard Rodger
 
JavaScript is the new black - Why Node.js is going to rock your world - Web 2...
Tom Croucher
 
20120802 timisoara
Richard Rodger
 
Introduction to Node.js
Vikash Singh
 
Practical Use of MongoDB for Node.js
async_io
 
Node.JS| Coffeescript Presentation
Sam Frons
 
Javascript leverage: Isomorphic Applications by Luciano Colosio at Codemotion...
Codemotion Dubai
 
20120514 nodejsdublin
Richard Rodger
 
Node.js and How JavaScript is Changing Server Programming
Tom Croucher
 
Go Pro, Inc. Case Study: Dive into the details of our node.js applications
Andrew Maxwell
 
Isomorphic JavaScript – future of the web
Sigma Software
 
Let's run JavaScript Everywhere
Tom Croucher
 
Workflow driven development
DmitryDemyankov
 
Introduce about Nodejs - duyetdev.com
Van-Duyet Le
 
2013 04-02-server-side-backbone
SC5.io
 
VisualWeb - Building a NodeJS Server Meshwork and Full-Javascript Stack Frame...
itsatony
 
Node js
Chirag Parmar
 
Server Side JavaScript - You ain't seen nothing yet
Tom Croucher
 
Isomorphic apps
aditya rohilla
 
Transitioning Groupon to Node.js - EmpireJS 2014
Sean McCullough
 
Ad

Recently uploaded (20)

PDF
HiHelloHR – Simplify HR Operations for Modern Workplaces
HiHelloHR
 
PDF
Empower Your Tech Vision- Why Businesses Prefer to Hire Remote Developers fro...
logixshapers59
 
PPTX
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PPTX
Agentic Automation Journey Series Day 2 – Prompt Engineering for UiPath Agents
klpathrudu
 
PDF
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 
PDF
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
PDF
4K Video Downloader Plus Pro Crack for MacOS New Download 2025
bashirkhan333g
 
PPTX
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pptx
Varsha Nayak
 
PDF
SAP Firmaya İade ABAB Kodları - ABAB ile yazılmıl hazır kod örneği
Salih Küçük
 
PDF
Driver Easy Pro 6.1.1 Crack Licensce key 2025 FREE
utfefguu
 
PDF
Alexander Marshalov - How to use AI Assistants with your Monitoring system Q2...
VictoriaMetrics
 
PDF
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
PDF
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
PPTX
In From the Cold: Open Source as Part of Mainstream Software Asset Management
Shane Coughlan
 
PPTX
Tally software_Introduction_Presentation
AditiBansal54083
 
PPTX
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
PPTX
Milwaukee Marketo User Group - Summer Road Trip: Mapping and Personalizing Yo...
bbedford2
 
PDF
How to Hire AI Developers_ Step-by-Step Guide in 2025.pdf
DianApps Technologies
 
PPTX
AEM User Group: India Chapter Kickoff Meeting
jennaf3
 
PPTX
Home Care Tools: Benefits, features and more
Third Rock Techkno
 
HiHelloHR – Simplify HR Operations for Modern Workplaces
HiHelloHR
 
Empower Your Tech Vision- Why Businesses Prefer to Hire Remote Developers fro...
logixshapers59
 
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Agentic Automation Journey Series Day 2 – Prompt Engineering for UiPath Agents
klpathrudu
 
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
4K Video Downloader Plus Pro Crack for MacOS New Download 2025
bashirkhan333g
 
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pptx
Varsha Nayak
 
SAP Firmaya İade ABAB Kodları - ABAB ile yazılmıl hazır kod örneği
Salih Küçük
 
Driver Easy Pro 6.1.1 Crack Licensce key 2025 FREE
utfefguu
 
Alexander Marshalov - How to use AI Assistants with your Monitoring system Q2...
VictoriaMetrics
 
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
In From the Cold: Open Source as Part of Mainstream Software Asset Management
Shane Coughlan
 
Tally software_Introduction_Presentation
AditiBansal54083
 
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
Milwaukee Marketo User Group - Summer Road Trip: Mapping and Personalizing Yo...
bbedford2
 
How to Hire AI Developers_ Step-by-Step Guide in 2025.pdf
DianApps Technologies
 
AEM User Group: India Chapter Kickoff Meeting
jennaf3
 
Home Care Tools: Benefits, features and more
Third Rock Techkno
 

Building Isomorphic JavaScript Apps - NDC 2015