15

So there are a bunch of older questions on this topic that point to a number of options available. These two questions for example are some of the most answered on the topic:

What good template language is supported in JavaScript?

jQuery templating engines

Most of the answers to both questions are from 2008.

However in the past year or so the javascript landscape has evolved considerably. For example, the .NET JQuery extensions were recently added as official JQuery plugins.

Out of the current templating engines, which is the best one to use? Here are some options I'm aware of:

Given all these different options, which is probably the best one to choose?

I was trying to decide between Resig's Microtemplates and JQuery-tmpl, but I don't know which of the two is better or if there is a better option than either of them.

Can anyone familiar with many of the options available lend some advice on this matter?

Community
  • 1
  • 1
Andrew De Andrade
  • 3,606
  • 5
  • 32
  • 37
  • 1
    This is entirely subjective, it wouldn't be if you had certain criteria you're after...but you're just asking "what's the best?" You need to layout what you're after, ease of use, performance, flexibility, etc. – Nick Craver Nov 26 '10 at 14:49
  • 1
    The list is missing mustache.js (and the spin-off handlebar.js) – Pointy Nov 26 '10 at 14:53
  • I know that asking "which programming language is best?" is a total no-no, but I didn't realize that the topic of templating engines was such a religious subject. – Andrew De Andrade Nov 27 '10 at 00:46

2 Answers2

2

The ASP.NET Ajax Library's DataView should not be considered. It was deprecated before release, in favor of jQuery Templates.

I've been using jTemplates for a couple years and have found it to be solid enough. However, with jQuery Templates slated for inclusion in jQuery 1.5 core, it doesn't make sense to take an external dependency that re-implements something already included in the core library. That alone is enough reason to favor jQuery Templates, assuming you're using jQuery.

Dave Ward
  • 59,815
  • 13
  • 117
  • 134
0

It's definetely a subjective and argumentative question, I've just wanted to add performance to the list of things you may consider.

gblazex
  • 49,155
  • 12
  • 98
  • 91