SlideShare a Scribd company logo
ISOMORPHIC
JAVASCRIPT
Tyler Peterson
@managerJS
October 2015
AKA • Isomorphic
• Universal
– Not to be confused with a
Universal Module
• Portable
Isomorphic
JavaScript
• Narrowly: Same Code
Renders Markup on
Server and Client
– React, Rendr, Meteor
• Broadly: CodeThat Is At
Home on the Server and
the Browser.
– Superagent, lo-dash, Q
Presented by FamilySearch
Significant
Common
Ground
• JavaScript language:
prototypes, expressions,
functions as objects.
• JavaScript libs such as Math,
Date, Error, JSON, RegExp.
• Can solve a lot of problems
without running into
inconsistencies.
Libraries
Built on
Common
Ground
• The community already
has interest in creating
libs built on common
ground and easily loaded
in the browser or node.
– Ex: Q, underscore/lodash,
moment.js, Chai
Inconsistencies
In the Browser
• XMLHttpRequest()
• DOM
• Local storage et al.
In Node
• http.request()
• None/Replacement (React)
• Files and databases
Presented by FamilySearch
Fighting
Inconsistency?
• Push it up
• Push it down
• Detect and differentiate
Pushing
Inconsistency
Up
• Make your caller deal with
it
• Accept the fruits
– Example: use a hierarchy of
React components. Only at the
top do you differentiate
between React.render() and
ReactDomServer.renderToString().
Pushing
Inconsistency
Down
• Make a dependency deal
with it
• Interact with a façade
– Example: Have a service that fetches
data. Consumers act like data is
fetched uniformly. Under the covers
it uses different URLs inside the data-
center versus outside the firewall.
Lots
Already
Pushed
Down
• The community is already
attracted to pushing
inconsistency down into
universal libraries.
– Ex: superagent
Detect and
Differentiate
• if (typeof window ===
‘undefined’) you’re on the
server, bub.
• Can add sentinels,
depending on your
control
Packaging • Pick something that lets
you transparently use
modules in node or in
Browser.
– WebPack is gaining popularity
– Browserify does the job, too
Trending:
Browserify
vs.
WebPack
https://www.google.com/trends/explore#q=browserify%2C%20webpack&cmpt=q&tz=Etc%2FGMT%2B6
October 14, 2015
Setting up
WebPack
(with React)
• Check out Radu Brehar’s
instructions at
http://jslog.com/2014/10/
02/react-with-webpack-
part-1/
– Some updates in the code at
https://github.com/tylerpeterso
n/isojs
How Useful
Is This
Anyway?
• Perspective of a Library
Author
• Perspective of an App
Author
As a Lib
Author
• If meant for common use,
you should make your code
into a universal module at a
the minimum. Be kind to
your users.
• Your library might target
one environment at first
and be useful enough to
shim to work in both.
As App
Author
• Let’s you write logic once
and run in both places
– Caution: Different concerns on
client and server.
• Many new ideas haven’t
been fully explored
React
Changes
Applicability
• I’m using react in my demos
because portable UI
increases the possibilities of
universal JS.
• Now you can push
inconsistency above, below,
or into the UI and still have a
large amount of Universal
JavaScript.
Demo:
Rendering
Portability
• Example of rendering
your page entirely on
server or entirely in client.
– https://github.com/DavidWells/i
somorphic-react-example
Demo:
Request
Hand-off
• Start all the work on the
server, stream above-the-
fold content, respond to
bandwidth in a beacon
feedback loop, let client
finish up the work.
– https://github.com/tylerpeterso
n/isojs
Thank You! • Tyler Peterson
– ty@managerjs.com
– @ManagerJS

More Related Content

PDF
ITT Flisol 2013
PDF
javerosmx-2015-marzo-groovy-java8-comparison
PPTX
Node.js Getting Started &amd Best Practices
PDF
Modern Static Site with GatsbyJS
PDF
The State of Rust Web Frameworks
PDF
Zero downtime deployments for Sling application using Docker
PDF
Why use Go for web development?
PDF
Do you really want to go fully micro?
ITT Flisol 2013
javerosmx-2015-marzo-groovy-java8-comparison
Node.js Getting Started &amd Best Practices
Modern Static Site with GatsbyJS
The State of Rust Web Frameworks
Zero downtime deployments for Sling application using Docker
Why use Go for web development?
Do you really want to go fully micro?

What's hot (20)

PPT
Hacking the way you work
PDF
Scaling up development of a modular code base
PDF
Drupal, git and sanity
PDF
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
PPTX
Introduction to JS frameworks
PDF
VJUG 24 - Building microservices with Vert.x
PPTX
Javascript Frameworks Comparison
PPTX
Reusability is the goal
PDF
Supporting large scale React applications
PDF
Malmberg meetup June 2018 - Building microservices with Vert.x
PDF
Rapidly Building and Deploying Scalable Web Architectures
PPTX
Building large scalable mission critical business applications on the web
PPTX
Microfrontends Monoreops & Trunkbased based
PPT
Front-End Tools and Workflows
PDF
Creating Hyper Performant Web Apps with React
PPTX
Introduction to Web Technology Stacks
PDF
Dublin JUG February 2018 - Building microservices with Vert.x
PDF
Vert.x NL meetup October 2017 - Building microservices with Vert.x
PPTX
Don't worry with bower
PPTX
An evening with React Native
Hacking the way you work
Scaling up development of a modular code base
Drupal, git and sanity
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
Introduction to JS frameworks
VJUG 24 - Building microservices with Vert.x
Javascript Frameworks Comparison
Reusability is the goal
Supporting large scale React applications
Malmberg meetup June 2018 - Building microservices with Vert.x
Rapidly Building and Deploying Scalable Web Architectures
Building large scalable mission critical business applications on the web
Microfrontends Monoreops & Trunkbased based
Front-End Tools and Workflows
Creating Hyper Performant Web Apps with React
Introduction to Web Technology Stacks
Dublin JUG February 2018 - Building microservices with Vert.x
Vert.x NL meetup October 2017 - Building microservices with Vert.x
Don't worry with bower
An evening with React Native
Ad

Similar to Isomorphic JavaScript with Node, WebPack, and React (20)

PDF
Meetup. Technologies Intro for Non-Tech People
PPTX
GDG Workshop on React (By Aakanksha Rai)
PPTX
Introduction to react native with redux
PPTX
Full stack development using javascript what and why - ajay chandravadiya
PPTX
Frontend War: Angular vs React vs Vue
PPTX
Isomorphic JavaScript – future of the web
PDF
About javascript libraries
PDF
An introduction to Node.js
PDF
Building Enterprise Grade Front-End Applications with JavaScript Frameworks
PDF
Stop making, start composing - Using Composer for Drupal development
PDF
The Characteristics of a Successful SPA
PPTX
All about that reactive ui
PPTX
Welcome to React.pptx
PPTX
After the LAMP, it's time to get MEAN
PDF
Frontend as a first class citizen
PDF
Choosing the best JavaScript framework/library/toolkit
PPTX
Learn from my Mistakes - Building Better Solutions in SPFx
PDF
Selecting the Best Javascript Web Framework
PDF
Angular 2 vs React. What to chose in 2017?
PDF
Lessons learned from building Eclipse-based add-ons for commercial modeling t...
Meetup. Technologies Intro for Non-Tech People
GDG Workshop on React (By Aakanksha Rai)
Introduction to react native with redux
Full stack development using javascript what and why - ajay chandravadiya
Frontend War: Angular vs React vs Vue
Isomorphic JavaScript – future of the web
About javascript libraries
An introduction to Node.js
Building Enterprise Grade Front-End Applications with JavaScript Frameworks
Stop making, start composing - Using Composer for Drupal development
The Characteristics of a Successful SPA
All about that reactive ui
Welcome to React.pptx
After the LAMP, it's time to get MEAN
Frontend as a first class citizen
Choosing the best JavaScript framework/library/toolkit
Learn from my Mistakes - Building Better Solutions in SPFx
Selecting the Best Javascript Web Framework
Angular 2 vs React. What to chose in 2017?
Lessons learned from building Eclipse-based add-ons for commercial modeling t...
Ad

Recently uploaded (20)

PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
top salesforce developer skills in 2025.pdf
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PPTX
Odoo POS Development Services by CandidRoot Solutions
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PPTX
Essential Infomation Tech presentation.pptx
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
System and Network Administraation Chapter 3
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PPTX
Transform Your Business with a Software ERP System
PPTX
Introduction to Artificial Intelligence
PDF
Nekopoi APK 2025 free lastest update
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Odoo Companies in India – Driving Business Transformation.pdf
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
CHAPTER 2 - PM Management and IT Context
top salesforce developer skills in 2025.pdf
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Odoo POS Development Services by CandidRoot Solutions
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Essential Infomation Tech presentation.pptx
Softaken Excel to vCard Converter Software.pdf
Navsoft: AI-Powered Business Solutions & Custom Software Development
Which alternative to Crystal Reports is best for small or large businesses.pdf
System and Network Administraation Chapter 3
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Transform Your Business with a Software ERP System
Introduction to Artificial Intelligence
Nekopoi APK 2025 free lastest update
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...

Isomorphic JavaScript with Node, WebPack, and React