js模板引擎
http://www.douban.com/group/topic/41272516/
选型标准:
简单、通用、性能好
各种JS模板引擎对比数据(高性能JavaScript模板引擎)
http://blog.csdn.net/wuchengzhi82/article/details/8938122
baiduTemplate(百度) http://baidufe.github.io/BaiduTemplate/
artTemplate(腾讯)https://github.com/aui/artTemplate
juicer(淘宝)http://juicer.name/
doT https://github.com/olado/doT
tmpl https://github.com/BorisMoore/jquery-tmpl
handlebars http://handlebarsjs.com/
easyTemplate https://github.com/qitupstudios/easyTemplate
underscoretemplate http://documentcloud.github.io/underscore/
mustache https://github.com/janl/mustache.js
kissytemplate https://github.com/ktmud/kissy
性能方面结论:
artTemplate,juicer与doT引擎模板整体性能要有绝对优势;
其中doT引擎模板在IE与safari浏览器表现非常优越;
tmpl模板引擎在IE中运行能完美胜出,但在其它浏览器中表现就差很多;
模板语法:
“嵌入式”,可以将js直接写在模板里面,从而实现一些复杂的渲染逻辑;
“无逻辑(Logic-less)”,模板应当同逻辑尽可能的分离,因此不会包含比较复杂的逻辑
代表类型:mustache
模板语法介绍:http://rocwang.me/js-template/
倾向使用淘宝的那套模板引擎:juicer(淘宝)http://juicer.name/
浙公网安备 33010602011771号