分享

js模板引擎

 quasiceo 2015-04-17


选型标准:
简单、通用、性能好

各种JS模板引擎对比数据(高性能JavaScript模板引擎)
http://blog.csdn.net/wuchengzhi82/article/details/8938122

baiduTemplate(百度) http://thub.io/BaiduTemplate/
artTemplate(腾讯)https://github.com/aui/artTemplate
juicer(淘宝)http:///
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./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:///js-template/

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多