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

谁说胖子不能爱 提交于 2020-01-07 05:03:19

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!