concept rendr in category javascript

appears as: Rendr
JavaScript Application Design: A Build First Approach

This is an excerpt from Manning's book JavaScript Application Design: A Build First Approach.

7.5. Backbone and Rendr: server/client shared rendering

Rendr boosts the perceived performance of Backbone applications by rendering them on the server side. This allows you to display the rendered page before JavaScript code is executed in the browser and Backbone kicks in. The first time the page gets loaded, the human will see the content sooner. After that first load, Backbone will take over and handle routing on the client side. The first load is extremely important and rendering the application on the server before the human gets any content is better than having them wait for Backbone to pull your data, fill your views, and render your templates. That’s why server-side rendering is still vital to the web application development process. Let’s start with a quick dive into the world of Rendr.

The following listing configures Rendr for your example. The middleware will take care of everything else, as you’ll see next. The data adapter configuration tells Rendr what API it should query. The beauty of Rendr lies in that, both on the client side as well as on the server side, it’ll query the API whenever it needs to fetch data.