Archive for the ‘AJAX/RIA’ Category
The GWT-Ext Best Practices part II
As I venture into the deeper depths of the GWT/GWT-Ext and AJAX RIA game, I discover a lot of intricacies and eccentricities surrounding its existence.
I learnt that the base library of GWT-Ext, the renowned ExtJS, has undergone a recent license change (towards becoming a more commercial product) and infuriated many in the open-source community.
I also started learning a few tricks to speed up the otherwise very slow compilation process… I’m hoping these tips can be of good use to others:
Compiling GWT Takes a Long Time, so script away…
Because compiling a GWT project takes a ridiculous amount of time, we should try to make use of its XML facilities. We can make use of the GWT-Ext’s TreeLoader / XMLTreeLoader and GWT’s own XMLParser, and load data (or even a tree structure) dynamically. If you ever need to update the menu, all you have to do is change the configuration XML, instead of recompiling the whole mess of HTML + CSS + JS produced by GWT.
Create Your Own Event Objects
GWT-Ext relies on injected event objects to function properly, especially in those pages which require custom grids capable of adding or deleting rows and displaying different grid layouts dynamically, depending on the data received. Create your own classes of events and reuse them!
-
I suppose tips are never complete without sample code. I haven’t had time for that. Next post will hopefully come with sample codes.