简体   繁体   English

与jquery一起使用的好的模板引擎

[英]Good Templating engine to be used with jquery

what are the good alternatives to jquery.tmpl now that jquery team has halted it development. 现在jquery团队已经停止了它的开发,jquery.tmpl有什么好的替代品。 It will now be coordinated by the jQuery UI team, as it will be a dependency of the upcoming jQuery UI Grid. 它现在将由jQuery UI团队协调,因为它将成为即将推出的jQuery UI Grid的依赖项。 But since grid is still far away in future which engine can i use. 但是,由于未来电网仍然遥远,我可以使用哪种引擎。 My backed is Cakephp 我支持的是Cakephp

http://blog.jquery.it/2011/04/16/official-plugins-a-change-in-the-roadmap/ http://blog.jquery.it/2011/04/16/official-plugins-a-change-in-the-roadmap/

PS: MOst questions on this topic are outdated hence i asked this question. PS:关于这个主题的MOst问题已经过时,因此我问了这个问题。 So as of 2011 which one should i go for. 所以到2011年我应该去哪一个。

One of the most commonly-used Javascript templating engines is mustache.js . 最常用的Javascript模板引擎之一是mustache.js

A simpler alternative is contained as part of underscore.js . 更简单的替代方法包含在underscore.js中

From my experience this is the best 根据我的经验,这是最好的

http://handlebarsjs.com/ http://handlebarsjs.com/

Revisiting this question in 2017, it looks like JsRender and JsViews have emerged as the current official implementation of templating within the jQuery ecosystem (whilst not necessarily requiring jQuery): 在2017年重新审视这个问题,看起来JsRenderJsViews已经成为jQuery生态系统中模板化的当前官方实现(虽然不一定需要jQuery):

JsRender is a light-weight but powerful templating engine, highly extensible, and optimized for high-performance rendering, without DOM dependency. JsRender是一款轻量级但功能强大的模板引擎,具有高度可扩展性,并针对高性能渲染进行了优化,不依赖于DOM。 It is designed for use in the browser or on Node.js, with or without jQuery. 它被设计用于浏览器或Node.js,有或没有jQuery。

JsRender and JsViews together provide the next-generation implementation of the official jQuery plugins JQuery Templates, and JQuery Data Link -- and supersede those libraries. JsRender和JsViews一起提供官方jQuery插件JQuery模板和JQuery数据链接的下一代实现 - 并取代这些库。

- JsRender GitHub Readme - JsRender GitHub自述文件

Official Site: http://www.jsviews.com/ 官方网站: http//www.jsviews.com/

GitHub (JsRender): https://github.com/BorisMoore/jsrender GitHub(JsRender): https//github.com/BorisMoore/jsrender

GitHub (JsViews): https://github.com/BorisMoore/jsviews GitHub(JsViews): https//github.com/BorisMoore/jsviews

I recommend EJS . 我推荐EJS

You could also look at : 你也可以看看:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM