问题
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!
回答1:
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
来源:https://stackoverflow.com/questions/11010958/what-is-the-difference-between-javascript-micro-templating-and-mustache-js-han