views:

162

answers:

5

I'm looking for a minimalist template system for javascript, ala John Resig's Javascript Micro Templating. The smaller the better, and if it's jquery based even better. Recommendations?

I tried John's micro-templating but ran into a few issues, wanted to see if there are more baked / better packaged solutions out there.

[Update] I tried Resig's Micro Templating again and it's working well for me. Would still like to hear about other alternatives if there are any.

+1  A: 

Theres JBST

<a class="ExtLink"
            href="<%= "http://en.wikipedia.org/wiki/" + this.data.wiki %>"
            onclick="window.open(this.href);return false;"><%= this.data.name %></a>
F.Aquino
A: 

In the end I went with John Resig's Micro Template, it's working nicely for me.

Parand
A: 

I really like JST (JavaScript Templates). They use the same convention for tokens as JSPs ${} - pretty easy.

stevedbrown
A: 

JBST (JsonML+Browser-Side Templating) is a good alternative to John Resig's Micro Template. It has a similar syntax but template parsing is not performed at runtime so it can be more compact and robust. The result of parsing is pure JavaScript which can be combined with other scripts and executed directly in the browser.

McKAMEY
+1  A: 

There is also Mustache.js, it has a neat syntax IMO.

Chubas