What is the best javascript templating engine for scalability, performance, and dealing with complex html graphs? [closed]
Currently, what is the most widely used javascript templating engine that is very scalable, performance in the popular web browsers (even IE6-8) and can easily deal with very complex HTML graphs and decisional presentational logic?
EDIT: What I mean about decisional presentation logic is creating content using logic and not just a way to put in variable placeholders.
http://beebole.com/pure/ claims to be
Simple and ultra-fast ...
Backbone.js is both robust and widely used, it is a good choice.
http://documentcloud.github.com/backbone/
doT.js is apparently lightning fast (those stunningly long bars in the graphs are doT). As for your 'most widely used' criterion, I doubt it'd fall into that category, but that doesn't mean it's a bad solution! It's got 134 watchers and 8 forks on GitHub, though, so it does seem to have some traffic. Actively maintained... decisional presentation support through the inclusion of JavaScript statements... works in node.js and the browser (I just tested it in IE6; it works great). I'm not quite sure what the definition of 'complex HTML graphs' is, but I presume that by your use of the word 'graphs', you're talking about having a DOM tree that you can manipulate with this engine. Don't think this would be that great for you, although you can use nested loop statements in a template.
I've just started using it, and it's quite a simple engine, but that's one of the reasons it's so fast!
Use underscore.js, Its simple and straightforward. For performance statistics see this
Regards!
精彩评论