NodeSummit - Isomorphic and Reactive Applications

1e2275ae49fccaa79d88fa6539492640?s=47 Peter Marton
February 10, 2015

NodeSummit - Isomorphic and Reactive Applications

There is no such thing as separated client and server app in the isomorphic era, there are only environments (browser, server, IoT device etc.). One app is running on both client and server side: this the end of the SEO pain and code duplications.

1e2275ae49fccaa79d88fa6539492640?s=128

Peter Marton

February 10, 2015
Tweet

Transcript

  1. 3.

    $ whoami - work: RisingStack, Inc. - twitter: slashdotpeter -

    email: peter@risingstack.com - blog: http://blog.risingstack.com
  2. 4.

    SPA: Single Page Load Applications - single page load -

    pure data after first load -> fast UI - renders on client side - example: Backbone, AngularJS, Ember, etc.
  3. 6.

    SPA Problems - SEO - code duplications: validation, routing... -

    performance - first load is heavy -> bandwidth - rendering -> drains mobile battery - legacy browser support
  4. 10.

    What can be shared? - from templates and small components

    - to the ~entire application - today I talk about entire apps
  5. 13.

    What do we need? 1/2 - language that runs on

    both sides: JS ;) - bundle with Browserify/Webpack - modules that runs on both sides -> npm: superagent etc. - view engine that renders on both sides: - React, - VirtualDOM...
  6. 14.

    What do we need? 2/2 - share states: Serializable states

    (stores) - https://github.com/yahoo/serialize-javascript - continue at the client from where server left
  7. 20.

    Isomorphic challenges - data fetching: talk about this later -

    init app on both sides - singleton app on client -> request scoped on server
  8. 21.

    Data fetching problem - environment specific problems - should be

    shimmed - same functionality and interface - different implementation: AJAX / WS / DB call / micro-service / .. - “Full Stack Flux” - Pete Hunt: React.js Conf 2015 - Full Stack Flux
  9. 22.
  10. 24.

    Isomorphic Flux - share Store(s): serialize / deserialize - per

    request isolated Dispatcher and Store(s) - server rendering should wait initial data load
  11. 25.

    Reactive programming and Isomorphic - think in data and event

    streams - optimize rendering calls with immutability Omniscient, nuclear-js
  12. 26.

    Isomorphic packages - power of npm - envs. (browser) should

    be shimmed - check your published packages BE ISOMORPHIC!