SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.
SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.
Successfully reported this slideshow.
Activate your 14 day free trial to unlock unlimited reading.
Slides from Spike Brehm's talk at JSConf US 2014. Topics include the etymology of "Isomorphic JavaScript", examples is isomorphic apps in the wild, reasons behind the growing trend towards isomorphic apps, and how to build an isomorphic module using Browserify & NPM.
Slides from Spike Brehm's talk at JSConf US 2014. Topics include the etymology of "Isomorphic JavaScript", examples is isomorphic apps in the wild, reasons behind the growing trend towards isomorphic apps, and how to build an isomorphic module using Browserify & NPM.
36.
View layer
shared
Entire app
runtime synced
between client
& server
37.
Isomorphic
JavaScript can be
or
shimmed per
environment .
environment-
agnostic
38.
Does not depend on browser-specific
properties (window) or server-specific
properties (process.env,
req.cookies).
Environment-agnostic
39.
Example: Handlebars.js
var template = !
'<ul>' !
'{{#each posts}}' !
' <li>{{title}}</li>' !
'{{/each}}' !
'</ul>'!
;!
!
var templateFn = Handlebars.compile(template)!
, html = templateFn({posts: posts});
40.
Provide shims for accessing
environment-specific properties so
module can expose a single API.
window.location.pathname
vs.
req.path
Shimmed per environment