mustache.js vs. jquery-tmpl mustache.js vs. jquery-tmpl javascript javascript

mustache.js vs. jquery-tmpl


My reason to choose mustache over any other template language was that it is implemented for any language you are likely to use. As it is also a true logic agnostic templating language your templates become portable. Therfore you gain the flexibility to choose to render your templates on the client or server side. Even though I have no benchmark available I don't think that performance should be an issue.


Initially I started out using jquery templates but development on that halted a long time ago.

Have a look at handlebar.js as an alternative to mustache.js ( see http://catchvar.com/jquery-tmpljs-vs-handlebarsjs )

handlebar.js seems to be about 2x faster than mustache.I've been using handlebar in a few projects and mustasche in one or two. I much prefer handlebar and find it 'better'. Here's a nice tutorial by Andrew Burgess I found.

Edit Mar-2013: Also since then Twitter have released Hogan.js which looks awesome like everything else that Twitter does, so I'll be investigating that too at some point.