Package Spotlight: Handlebars

Package Spotlight: Handlebars

Handlebars, a derivative of Mustache, is a JavaScript templating syntax that allows JSON to be bound to a view. Handlebars is logicless by default but also offers support for helpers and methods to add functionality into the views.

We at TRYTN use Handlebars for our front-end templating system. We chose this due to it’s common usage in the front-end development world as well as it’s speed and performance. There are two primary types of JavaScript templating engines: pre-compiled and run time. In a run time template the template is compiled at the time of the request. While this makes the overall JavaScript file smaller the perceived load time is worse because the templates are compiled for use only when they are needed. The popular JavaScript framework Angular is known for this type of template system.

Handlebars, on the other hand, is pre-compiled. This means that during the build process these templates are compiled and compressed into the JavaScript files they are being used in. While the overall file size is bigger the perceived performance is much better because they are already ready and available when the user makes a request. We aren’t as concerned about file size because of technology and caching we have in place to support this.

Package Name: Handlebars
Website: http://handlebarsjs.com/

a woman sitting at a table using a laptop computer
Blog
Virginia

Seven Ideas for Slow Season

It’s hard to avoid having an “off-season” in any business. This is especially true in the tourism industry. By its very nature, the travel industry

Read More »

Request a Demonstration