各種JS模板引擎對比數據(高性能JavaScript模板引擎)


js模板引擎

JavaScript 模板引擎作為數據與界面分離工作中最重要一環,越來越受開發者關注,從而出現在各大型網站 Twitter、淘寶網、新浪浪微博、騰訊QQ空間、騰訊微博等。那么他們各自性能怎么樣?請看下面。
 

通常模版引擎

baiduTemplate(百度)\ artTemplate(騰訊)\ juicer(淘寶)\ doTtmplhandlebarseasyTemplateunderscoretemplate \  mustache \ kissytemplate
 

通過對各模板引擎測試結果,可以看出
artTemplate,juicer與doT引擎模板整體性能要有絕對優勢;
其中doT引擎模板在IE與safari瀏覽器表現非常優越;
tmpl模板引擎在IE中運行能完美勝出,但在其它瀏覽器中表現就差很多;

延伸
通過對模板引擎的熟知,不同瀏覽器渲染能力也不一樣;渲染快的打開網頁速度就快;chrome與360瀏覽器打開速是最快的;ie瀏覽器的速度是最慢;

 

各個模板引擎下載地址

 

baiduTemplate:  http://baidufe.github.io/BaiduTemplate/

artTemplate: https://github.com/aui/artTemplate

juicer: http://juicer.name/https://github.com/PaulGuo/Juicer/zipball/master#download

doTdoT source:https://github.com/olado/doT   Docs:http://olado.github.com/doT/

tmplhttps://github.com/BorisMoore/jquery-tmpl

handlebars:http://handlebarsjs.com/或https://raw.github.com/wycats/handlebars.js/1.0.0-rc.4/dist/handlebars.js

easyTemplatehttps://github.com/qitupstudios/easyTemplate

underscoretemplate: http://documentcloud.github.io/underscore/

mustache:https://github.com/janl/mustache.js

kissytemplate:https://github.com/ktmud/kissy

 

相關引擎資料

 

淺析js模板引擎

高性能JavaScript模板引擎原理解析

在前端開發中應用JS模板引擎 -- 事半功倍!

 

轉載自:http://blog.csdn.net/wuchengzhi82/article/details/8938122


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM