Re:Backbone vs Knockout
by jashkenas on Tuesday November 22, 2011 @02:13PM
(#3266895)
Sure -- I tend to strongly prefer libraries that simply allow you to interpolate JavaScript, nothing more and nothing less, so our Underscore.js templates work fine: http://documentcloud.github.com/underscore/#template
On the other hand, if you're looking to share templates between the client-side and server-side, and you're not using JavaScript on the server end, there's a strong case to be made for "logic-less" templates that can be rendered (at least in theory), by Ruby or Python just as easily as JavaScript. Check out Mustache: http://mustache.github.com/
There's also HAML, Jade, Eco, Handlebars, and many, many more.
On the other hand, if you're looking to share templates between the client-side and server-side, and you're not using JavaScript on the server end, there's a strong case to be made for "logic-less" templates that can be rendered (at least in theory), by Ruby or Python just as easily as JavaScript. Check out Mustache: http://mustache.github.com/
There's also HAML, Jade, Eco, Handlebars, and many, many more.