The first library I started to tinker with was jQote2. jQote2’s main goal appears to be as fast as possible, and the syntax of the templates should be very familiar to anyone who was worked with server-side scripting languages like ASP or PHP for such things. jQote2 works seamlessly with jQuery as a plugin, so it’s easy to add the templating logic into your document. Here’s an example I have up on a gist:
Pretty straight forward. I’m adding in jQuery through an existing HTML5 resource I’ve got on the instance, and then the jQote2 library itself. jQote2 then adds in the functions to render the template portion. “jqoteapp” means “jqote append”, as in append the results of the template (in this case the script area with the “contacts_tmpl” id to the DOM object referenced by jQuery (in this case, the unordered list).
I’ve set this page up so that the HTML reads as someone might normally parse an HTML file, but the script templates are up to you to create and place as you need – even if you need to load them separately, though I’m not sure if the latter defeats any of the cache system jQote2 uses for speed. Any way you slice it, though, it offers a great tool for the user interface toolkit.