Monday, April 7, 2008

Unified toolkit model

I had some time to spend with Ext this weekend, and it struck me that as nice as it looks, it still doesn't have a widget system. You might complain now since you can point me right away to a dozen or more nice-looking widgets that Ext sports. Yes, they're widgets, and yes, there's some system underneath it all, of course. I especially like the data modeling for the grid, et.c.

What I mean when I say that Ext has no widget system, is that there is no templating system in ext, and it seems like the only way of managing DOM interaction is to use jQuery-like stuff to add behavior and looks more or less manually.

When I create custom widgets in Dojo, I have the choice of using the standard ${} templating system, or the Django templating system. When I put a widget or two on the page, I have a number of magic functions that gets called by Dojo which enforces code sanitation in a good way. Also, when I need to change looks for the widget which is only related to styling, I change the client-side Dojo widget template and reload. I get the impression that a lot of styling issues gets hard-coded in Ext (and possibly jQuery as well) as hard to maintain document.createElement statements.

If this is the case, and Dojo has a truly outstanding widgeting system, why can't we share the love? I really like some features of the Ext grid, for example. But I'm really reluctant to create custom components without a client-side templating system. How hard could it be to us eone with the other?

Also, if that is possible, maybe one could make further concessions, and go all out for complete toolkit integrations :) Ideally, I'd like to use any widget from any toolkit (that behaves ...) together with any data model from another and wrap it in the widget model of a third (OK, Dojo).

Cheers,
PS

2 comments:

Zoom said...

Don't know Dojo that much but is this something like what you are looking for? http://extjs.com/learn/Tutorial:Utilizing_Format_Features_of_Templates

Peter Svensson said...

Yes! Thanks.

Silly of me not to find that. Now that does open up some possibilities.

If I were the Ext guys, I'd emphasize this on the first page.

Now for some reading..

Cheers,
PS