Search code examples
jqueryjquery-templatesjtemplates

jTemplates vs jQuery Templates. Which is one better? Is there a better?


I've seen that Microsoft has created a official jQuery Template plugin for jQuery. But also jTemplates from what I've read is pretty popular. I didn't know if I should not bother with jTemplates and go straight to the jQuery Template or give jTemplates a go.

Any suggestions?

Note: it's my first time using any client-side templating framework.


Solution

  • I've been happily using jTemplates for a couple years, but absolutely recommend jQuery Templates going forward. Here are a few of the main reasons:

    • Other than using AJAX requests to load template definitions (which is easy to overcome), jQuery Templates is already as capable as jTemplates. In fact, I think jQuery Templates' {{tmpl}} tag for template composition is more intuitive and straightforward than jTemplates' #include.
    • Going forward, the massive community support and development around the "official" jQuery solution for templating will be hard to beat.
    • Since jQuery Templates will be rolled into jQuery core in 1.5, it doesn't make sense to include another template engine in addition to the one you're already getting for free with jQuery. I was told authoritatively that this would happen, but it now apparently will not happen by the 1.5 release at least. Sorry for any confusion.