Client-side rendering enable many things. We have independent frontend and backend deploys. It’s possible to update sections of the page without re-render everything. It’s easier for teams to develop their own part of the same page (widgets). And it’s possible to develop rich user interactions.
However, we also got new problems. It’s easier to break rendering since we have many run-times (all browsers) instead of one (the server) and JavaScript is not fault tolerant. There’s a really high rate of change in the JS library space. We get a longer time to first render. And client-side web applications are hard to evolve.
In this talk I will show a simpler way, using a toolbox of techniques: a gateway web server, pjax, client-side includes, and custom elements.
9. techniques
web server enables server-side web (architectural foundation)
pjax → partial updates (HTML views over ajax)
client-side includes (caching and reusable content)
server-side driven client refreshes
custom elements → shared widgets
23. h-include.js
custom element version of hinclude.js
https://github.com/mnot/hinclude/pull/46
custom element polyfill: 3KB
https://github.com/WebReflection/document-register-element
includes in includes, etc etc
29. → widgets
separate content from execution
code repository for custom elements
no dependencies
custom element enhances content
think about compatibility
33. techniques
web server enables server-side web (architectural foundation)
pjax → partial updates (HTML views over ajax)
client-side includes (caching and reusable content)
server-side driven client refreshes
custom elements → shared widgets (free from dependencies)
39. why is server-side web simpler?
(technological progress → device diversity)
less moving parts
working with the browser
better evolvability
lower rate of change