简体   繁体   English

JavaScript模板引擎的当前状态?

[英]Current state of JavaScript template engines?

I did some research months ago looking for a nice javascript template engine and settled on one made by Trimpath . 几个月前我做了一些研究,寻找一个不错的javascript模板引擎,并选择了由Trimpath制作的一个

I like this a lot, but I have a few wish list items: 我很喜欢这个,但我有一些愿望清单项目:

Are there any other great template engines which have been released in the past year or so which I should know about? 在过去一年左右发布的其他伟大的模板引擎我应该知道吗?

Update: I thought I'd come back and update this to let people know that we settled on Handlebars.js. 更新:我想我会回来更新这个让人们知道我们选择了Handlebars.js。 We've got several months experience with it under our collective belts and we've been very happy with our choice. 我们在集体的带领下有几个月的经验,我们对我们的选择非常满意。 It has the basics included and you can create helpers that give you additional capabilities as needed. 它包含基础知识,您可以创建帮助程序,根据需要为您提供其他功能。

There's also ICanHandlebarz (similar to ICanHaz for Mustache) and http://tryhandlebarsjs.com/ so you can try before you buy, so to speak. 还有ICanHandlebarz(类似于ICanHaz for Moustache)和http://tryhandlebarsjs.com/所以你可以在购买之前尝试,可以这么说。

I now return you to the original answer I gave. 我现在回答你给出的原始答案。

We've been doing a survey of JavaScript template engines because there are so many and they have many different syntax and performance profiles (some compiled, some not, etc.). 我们一直在对JavaScript模板引擎进行调查,因为它有很多,并且它们有许多不同的语法和性能配置文件(有些是编译的,有些不是,等等)。

Unfortunately our favorite solution was jQuery Templates and it worked great. 不幸的是,我们最喜欢的解决方案是jQuery模板,它运行良好 Now it's deprecated software and the proposed replacement for it (JsRender) is no where near ready to use at the time I write this (Oct 2011). 现在它已经被弃用的软件和建议的替代品(JsRender)在我写这篇文章时没有准备好使用(2011年10月)。 So while there are so many to choose from, after having a solution we were quite happy with, we are suddenly adrift again and trying to find its replacement. 因此,虽然有很多可供选择,但在我们非常满意的解决方案之后,我们突然再次漂泊并试图找到它的替代品。

Comparisons 比较

Template Loaders 模板加载器

Engines 引擎

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

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