KnockoutJS 现在 jQuery 模板即将过时
基于此 链接
由于 jQuery 团队决定保留 jquery 模板,所以我想知道 KnockoutJS 的未来会怎样,以及我是否应该考虑使用backbone.js?
我现在正处于计划阶段,使用 ASP.NET MVC 4 构建一个相当大型的 Web 应用程序,并注意到项目模板中包含了 knockoutjs 1.3.0,但您认为它会在那里存在很长时间吗?
Based around this link
Since the jQuery team has decided to keep jquery templates on hold I was wondering what the future of KnockoutJS will be and if I should consider to use backbone.js instead?
I'm in the planning stages right now to build a pretty large scale web app using ASP.NET MVC 4 and noticed that knockoutjs 1.3.0 is included in the project templates but do you think this will be in there for long?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Knockout 1.3(现在处于 RC 版本)包含一个本机模板引擎。这意味着您可以将 Knockout 与模板一起使用,而无需引用 jQuery.tmpl 等模板引擎。
在文档准备好之前,这里有几篇文章可以帮助描述它:
http://blog.stevensanderson.com/ 2011/08/31/knockout-1-3-0-beta-可用/
http://www.knockmeout.net /2011/09/ko-13-preview-part-1-native-template.html
您将无法使用 jQuery.tmpl 特定语法(${variable}, {{each}} 等),但控制流绑定与标准绑定提供了几乎相同的体验。
KO 计划在稳定后支持 jsRender (jQuery 模板的继承者)。
Knockout 1.3 (in RC right now) includes a native template engine. This means that you can use Knockout with templates without referencing a template engine like jQuery.tmpl.
Here are a couple of posts to help describe it until the docs are ready:
http://blog.stevensanderson.com/2011/08/31/knockout-1-3-0-beta-available/
http://www.knockmeout.net/2011/09/ko-13-preview-part-1-native-template.html
You would not be able to use jQuery.tmpl specific syntax (${variable}, {{each}}, etc.), but the control-flow bindings along with the standard bindings provide a mostly equivalent experience.
KO plans to support jsRender (successor to jQuery templates) as well when its is stable.