Embrace Server-Rendered Rails Views
Explore the architecture of server-rendered Rails views and understand how keeping rendering on the server promotes stability, predictability, and faster testing. Learn the trade-offs when comparing traditional Rails rendering to Jamstack and discover when to minimize JavaScript complexity while maintaining responsive web apps.
We'll cover the following...
Rails server-rendered views work very much like PHP, JSP, or ASP: the server loads an HTML template, populates that with dynamic data, renders it into HTML, and sends that HTML to the browser as part of the request/response cycle. This interaction model is easy to understand, instrument, predict, and test.
Outside of Rails, it’s becoming more common for developers to send the HTML templates bundled with dynamic data to the browser and have the browser render the HTML on the client side. With sufficiently powerful back-end APIs, developers can build the entire application to run in the browser using JavaScript and markup. This combination is known as the Jamstack, with JAM standing for JavaScript, APIs, and Markup.
Setting aside the risks with ...