This post is part of the “ITworks Design Journal” series.
ExtJS has been working on version 2.x of GXT, built upon GWT version 1.6. Recently, ExtJS released the milestone 1 "release" of GXT, and I decided to upgrade and see what all the fuss was about.
Before I could test anything, some changes needed to be made to my environent. GWTShell has been deprecated in leu of the new hotness, HostedMode. The "public" directory, used for storing static content such as images and stylesheets, has been migrated to a directory called "war."
Some changes were made to the API in general. For example, EventType is now a class; that means all your code that look like this:
public class AppEvents
{
public static final int Init = 1;
/** trimmed **/
public static final int BuildContainers = 20;
public static final int BuildUI = 21;
/** trimmed **/
}
and this
public void handleEvent(AppEvent<?> event)
{
switch(event.type)
{
case AppEvents.Init:
this.onInit(event);
break;
case AppEvents.BuildContainers:
this.onBuildContainers(event);
break;
case AppEvents.BuildUI:
this.onBuildUI(event);
break;
}
}
Now need to be changed to this
public class AppEvents
{
public static final EventType Init = new EventType();
/** trimmed **/
public static final EventType BuildContainers = new EventType();
public static final EventType BuildUI = new EventType();
/** trimmed **/
}
and this
public void handleEvent(AppEvent event)
{
if(event.type == AppEvents.Init)
this.onInit(event);
if(event.type == AppEvents.BuildContainers)
this.onBuildContainers(event);
if(event.type == AppEvents.BuildUI)
this.onBuildUI(event);
}
A good change, in my opinion.
I was also surprised to see that the look and feel had changed just a tiny bit. Compare the last version’s dialog (including borders, shadows, buttons, and the title bar) to the new version’s:


The differences are relatively minor (except for the buttons, which I will be working on) but definitely noticeable.
There were are few other things I had to change, such as the removal of StatusButtonBar (now you use getButtonBar() on a Dialog and add() a new Status object to it). Overall, I think the changes were mostly positive, and I’m looking forward to checking out some of the other changes.
GWT 1.6
GXT 2.0 M1 (note this link may change as builds are released)