jQuery Templating in the HomeTab.

Blake Winton bwinton at mozillamessaging.com
Thu Jun 10 02:08:46 UTC 2010

On 10-06-09 8:03 PM, Andrew Sutherland wrote:
> On 06/09/2010 02:59 PM, Blake Winton wrote:
>> 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.
> It looks like this was replacing jQuery-based HTML generation, which
> tends to end up ugly. This seems like a good improvement over that.

Yeah, that's what I hoped.

> The traditional moztech approach would be XBL which is definitely
> theme-able, but has those horrible horrible life-cycle issues which
> are no doubt the reason you skipped using it.

Well, I skipped it more because I'm doing the ui in (x?)html, and 
switching over to XBL seemed like a pain.  Also because I'm already 
doing it all in jQuery, so sticking with jQuery seemed like a good idea. 
  :)  But now that you've reminded me of the issues, I'm doubly glad I 
didn't go that route.

> I would say move forward with jQuery templating at full speed. I say
> this with the impression that the goal of HomeTab is primarily as a UI
> prototype and usable and pragmatic extension that is not intended to be
> core UI without a rewrite. The 'without a rewrite' is because I believe
> very strongly in our goal of extensibility but would not expect a
> rapidly developed UI based on templating to provide an ideal
> extensibility story. I suspect it could be done, but would compromise
> the rapid development which I think is very important for iterating on
> the UI experiments (or end up very limited/limiting).

Well, I hope that eventually the home tab can land in core, possibly 
even without a rewrite, if we incrementally improve our way there, but 
that day is a long way off, and we may have ended up switching to wmsy 
by then.

> If I'm off-base here and the goal would be to land the home tab in core
> with only minor changes, then we should probably discuss the
> extensibility aspect more and revisit whether it's appropriate to use
> wmsy despite its early state.

That sounds intriguing.  What sort of things are you thinking of for 
extensibility, and how far away do you think wmsy is from my being able 
to use it?

My longer-term plan is to do some crazy UI stuff in it now, and then 
once it's stabilized a little, polish up the internals to allow for 
extensibility, add (more) unit tests, etc, before eventually landing it 
in core.


More information about the tb-planning mailing list