HTML template-rendering engines

Fortunately, we've already covered the idea of HTML template-rendering engines throughout the course of this book. The topics and concepts transfer directly to frontend applications as well. There are many different HTML template engines to choose from for use in the browser.

Many template engines will be mustache-based, meaning that they use {{ and }} for merge variables. Handlebars is currently my personal favorite, mainly because it works so well in the backend and frontend of an application, and I really like working with its helpers. Underscore.js has a built-in lite template-rendering engine for use with Backbone.js, but its syntax uses <% and %> (much like classic ASP or ASP.net MVC Razor syntax). Typically, most frontend MVC frameworks allow you to customize the template-rendering engine and use any engine you want. For example, Backbone.js can be set up to use Handlebars.js very easily, instead of using Underscore.js by default.

Here's just a small sample list of some of the currently available frontend template-rendering engines:

Some of these will work at the backend as well as on the frontend.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.16.79.65