3 ms·
> and there are already a large number of wonderful templating libraries for rendering HTML from JS objects Can you list the names of some of these, out of cur
by sneak 15y ago
> and there are already a large number of wonderful templating libraries for rendering HTML from JS objects
Can you list the names of some of these, out of curiosity? I'm building some new stuff and it seems like this is the way to go, but all the ones I've seen have been way too heavyweight.
- jashkenas 15y agoSure -- 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 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/ http://mustache.github.com/ There's also HAML, Jade, Eco, Handlebars, and many, many more.
- jguimont 15y agoI have made a clone of Sproutcore implementation of their TemplateView but for Backbone. You can find it at http://github.com/juggy/backrub http://github.com/juggy/backrub It gives almost the same functionalities of knockout.
- lucian1900 15y agoIf you're using CoffeeScript, check out CoffeeKup.