Submitted by Jim Cooper on Mon, 04/08/2013 - 00:00
Forums

Niels,

Just to be clear, is HandleBars.js another plugin or tool like the JavaScript Libraries? If so, why doesn't jQuery have a template plugin? Very confusing.

Regards,
Jim Cooper

Niels Liisberg

Mon, 04/08/2013 - 00:00

Hi Jim;

Actually jQuery has loads for template plugins – I.e. look at:
http://www.borismoore.com/2010/09/introducing-jquery-templates-1-first…

And read a comparison if jquery-tmpl.js and HandlebarsJs here:
http://catchvar.com/jquery-tmpljs-vs-handlebarsjs

I can follow you frustration of picking up yet another technology, however you will need the right tool for the right task - don't use a hammer for drilling holes!!
It is just that I find HandlebaresJs is just what we need for applications, and it work just great together with jQuery.

If you will try a great sample of all the template libraries available – then you can actually benchmark them all at the same time on the following link:
http://jsperf.com/dom-vs-innerhtml-based-templating/73

Best regards,
Niels Liisberg