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

SSR, SPAs and PWAs

SSR, SPAs and PWAs

This talk has all the acronyms! It offers a deep dive into Server Side Rendering (SSR) in times of SPAs and PWAs. We will look at how pre-rendering JS applications server-side does not only improve perceived startup times but enables advanced techniques like incremental startup on the client and even progressive enhancement (yes, really!).

Marco Otte-Witte

October 19, 2018
Tweet

More Decks by Marco Otte-Witte

Other Decks in Programming

Transcript

  1. <html> <!-- Copyright 1996 Warner Bros. Online --> <!-- Badda

    Bing, Badda Boom --> <head> <title>Space Jam</title> <style type="text/css"> .footer-links { margin: 5px; } </style> </head> <body bgcolor="#000000" background="img/bg_stars.gif" text="#ff0000" link="#ff4c4c" vlink="#ff4c4c" alink="#ff4c4c"> <center> <!--**************Ads - Don't Touch!*************************************--> <CENTER> <nobr> <table border=0 cellpadding=0 cellspacing=0 width=488 height=60> <tr> <td align="center"> <!--#include virtual="html.ng/site=spacejam&type=movie&home=no&size=234&page.allowcompete=no"--> </td> <td align="center" width="20"></td> <td align="center"> <!--#include virtual="html.ng/site=spacejam&type=movie&home=no&size=234"--> </td> </tr> </table> </NOBR> </center> <!--*******************************************************************--> <br>
  2. • document is visually complete as received from server •

    …as well as immediately functional • subsequent page transitions require server roundtrips
  3. • initial document is essentially useless • …until JS loads,

    app starts and runs completely in the browser
  4. • initial document is essentially useless • …until JS loads,

    app starts and runs completely in the browser • subsequent page transitions are client-side and thus fast
  5. • initial document is essentially useless • …until JS loads,

    app starts and runs completely in the browser • subsequent page transitions are client-side and thus fast • only data is loaded lazily
  6. • initial document is essentially useless • …until JS loads,

    app starts and runs completely in the browser • subsequent page transitions are client-side and thus fast • only data is loaded lazily • requires JS to work at all
  7. • serve the app's main UI shell from a service

    worker • fill in content dynamically once the app starts
  8. • running the same SPA in the browser and on

    the server • no conceptual difference between browser and server
  9. • running the same SPA in the browser and on

    the server • no conceptual difference between browser and server • valuable initial response
  10. we now have an SPA that does not require JavaScript

    on the client and degrades gracefully
  11. SSR content + baseline functionality SPA improved UX & full

    functionality PWA app characteristics + offline support
  12. Q&A