jQuery Templating in the HomeTab.

Blake Winton bwinton at latte.ca
Wed Jun 9 21:59:54 UTC 2010


So, after asking Andy to take a look at the HomeTab, and see if he could 
bring some Raindrop-style fanciness to it, it struck me that as long as 
we're building large swaths of the UI in javascript, it's not 
particularly easy for him (or Andreas) to style.  So I asked James about 
various templating systems that we might want to use.

He suggested three or four.  The first choice, and the one I think we 
should go with, was jQuery-tmpl, the officially-maintained jQuery 
templating plugin.  (The others were Mustache, his own Blade, and 
Andrew's Wmsy.  As I understand it, Mustache is pretty close to 
jQuery-tmpl, but isn't as integrated, and Blade and Wmsy aren't quite up 
to a point where we want to depend on them.  As a side note, jQuery-tmpl 
is dual licensed under the MIT or GPL Version 2 licenses, so I think 
we're okay using it.  If not, we can always ask jresig at mozilla.com for a 
more acceptable license.  ;)

So, I've converted one of the bits of javascript we use into a template, 
and committed it as 
<http://hg.mozilla.org/users/bwinton_latte.ca/hometab/rev/3f7d9dcc5609>, 
and I plan on converting the rest in the near future.

Having said that, it wasn't a lot of work, so there's still lots of time 
to switch to a different templating engine.  Which is a longer way of 
saying: Any feedback is welcome.

Thanks,
Blake.



More information about the tb-planning mailing list