-
Book Overview & Buying
-
Table Of Contents
Mastering JavaScript Single Page Application Development
By :
Many of the features in Handlebars.js that differentiate it from Mustache.js are designed to make the templates render more quickly in a browser. One of the main features in Handlebars that allows this is the ability to precompile templates, as we covered in Chapter 2, Model-View-Whatever.
Precompiling the templates converts them to the JavaScript functions that are normally compiled in an application before rendering with other templating engines. Using this feature increases the speed of an application by skipping that step, and it additionally reduces the load on the browser for the application because the JavaScript compiler does not need to be included in the frontend asset payload.
The creators of Handlebars also decided that the ability to set alternative delimiters within a template is not necessary. This further reduces the asset payload for an application if you are not precompiling...