Justin wong
Justin wong

Reputation: 638

What is the difference between "JavaScript Micro-Templating" and mustache.js/handlebars.js?

First, I apologize for such a novice question again, and if this has been answered elsewhere.

There are too many template engine,I really do not know how to choose!I seriously study this, but still at a loss.

I mainly want to know the advantages of mustache.js/handlebars.js? Compared with the JavaScript Micro-Templating

Please give examples to explain, thank you very much!

Upvotes: 1

Views: 1798

Answers (1)

Geert-Jan
Geert-Jan

Reputation: 18895

For a pretty well-rounded comparison see

http://engineering.linkedin.com/frontend/client-side-templating-throwdown-mustache-handlebars-dustjs-and-more

It includes a lot of considerations and a good 'in-the-field' approach.

Moreover, it's from LinkedIn so you can trust it's pretty thorough.

EDIT:

Only real omission is Hogan from Twitter, likely because it was (and still is) a new kid on the block . http://twitter.github.com/hogan.js/) Like Handlebars based on Mustache. Functionality is in between Mustache and Handlebars. Performance 5/5.

I use Hogan both on the client-side and with Nodejs on the server-side and it's really great working with it once you get the hang of it.

hth

Upvotes: 3

Related Questions