javascript / jquery模板建议 [英] javascript/jquery templating suggestions

查看:73
本文介绍了javascript / jquery模板建议的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个高度依赖于javascript的大型应用程序。部分内容将是在屏幕上显示信息。我希望显示关于ui的信息,我正在寻找使用javascript模板来做到这一点。我将使用jquery框架。

I am developing a large scale application highly dependent on javascript. Part of this will be displying information on screen. I am looking to display information on the ui and I am looking at using javascript templating to do such. I will be using the jquery framework.

对javascript / jquery模板框架的任何建议或建议?

Any suggestions or recommendations to javascript/jquery templating frameworks?

推荐答案

只是部分同意GregL。原始测试不考虑最终将呈现的html附加到页面所花费的时间。

Only agree with GregL partially. The original test does not consider the time spent to eventually append the rendered html to the page.

您还应该检查 http://jsperf.com/dom-vs-innerhtml-based-templating/259


此测试将包括将呈现的html文本附加到页面。

You should also check out http://jsperf.com/dom-vs-innerhtml-based-templating/259
This test will include appending the rendered html text to the page.

您可以将其与 http://jsperf.com/dom-vs-innerhtml-based-templating/257

You can compare it with http://jsperf.com/dom-vs-innerhtml-based-templating/257
The original test case. You will find out that the difference across template engines is not that significant. You do need to consider more about the usability of a template engine, unless you are going to simply render a chuck of html text without put it to the client browser.

除此之外在我看来,一个好的模板引擎应该可以极大地帮助你维护模板的
,帮助你少花钱多做这也是jQuery的原则。

Besides, in my opinion, a good template engine should greatly help you maintain the templates, help you write less to do more which is also the principle of jQuery.

doT.js的性能非常好,但我不同意它可以帮助你有效地编码。

doT.js is really great in performance, but I don't agree that it could help you code efficiently.

我正在开发一个开源项目试试构建一个易于使用的模板引擎。它可以帮助您以树状结构管理模板,创建模板参考,定义自己的语法,将数据绑定到html dom ..请试一试

I am now working on an open source project to try to build a easy-to-use template engine. It can help you manage your templates in a tree-like structure, create template reference, define your own syntax, bind data to html dom.. please give it a try

http://jspopisno1.github.com/Beard

您还可以在stackoverflow中读取另一个问题

You can also have a read another question in stackoverflow

https://stackoverflow.com/questions/552934/what-javascript-templating-engine-do-you-recommend/8129492#8129492

这篇关于javascript / jquery模板建议的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆