Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Server Rendered JavaScript Apps

February 11, 2015

Server Rendered JavaScript Apps

A short talk on the whys and wherefores of server-rendered JavaScript apps, presented at ManhattanJS.


February 11, 2015

More Decks by tomdale

Other Decks in Programming


  1. Why Client-Side JavaScript? • Fast Navigation • Fast Data Access

    • Rich Interactivity • Coherent Programming Model
  2. “Progressive Enhancement” • Server render, then add behavior using JavaScript

    • No client-side routing • Complexity increases over time
  3. But what if we could get the benefits of progressive

    enhancement as a by-product of modern development?
  4. JSON data GET /api/posts.json GET /posts Browser CDN JS App

    Empty HTML, JavaScript (Big!) API Server
  5. Rehydration • Show server-rendered HTML • Wait for JavaScript to

    load • JavaScript “takes over” once loaded • Side effect: Wicked fast re-renders (thanks to “virtual DOM”)