Thursday, December 10, 2009

Upgrading GWT code from version 1.7 to version 2.0

I have already starting converting several of my GWT apps from older version of GWT to version 2.0.  According to this link the steps are as follows.

There are 3 tasks involved when upgrading a GWT 1.7 project to a GWT 2.0 project:
  • Download GWT 2.0 and update your launch configurations
  • HostedMode has been replaced by DevMode, so you will need to update your Eclipse project settings accordingly.
  • Tests now run in HtmlUnit by default. You will need to modify some of your tests to work with HtmlUnit.


So far I have not run into any issues with upgrading.  As of this post I have not seen any mention of a GWT 2.0 Incubator file, but my apps seem happy with the older version gwt-incubator-july-14-2009.jar.  I have seen several warnings however while compiling with this version such as:



         [WARN] Line 102: Referencing deprecated class 'com.google.gwt.widgetideas.table.client.overrides.HTMLTable'
         [WARN] Line 103: Referencing deprecated class 'com.google.gwt.widgetideas.table.client.overrides.Grid'
         [WARN] Line 104: Referencing deprecated class 'com.google.gwt.widgetideas.table.client.overrides.Grid'
         [WARN] Line 104: Referencing deprecated class 'com.google.gwt.widgetideas.table.client.overrides.HTMLTable'

GWT 2.0.0 is here. Get your copy today!

You can now download and start using GWT version 2.0.  If you are using Eclipse the links are below, and of course if you are already using Eclipse then you should be able to update to the latest plugin and GWT version automatically.

Eclipse 3.5 (Galileo)
http://dl.google.com/eclipse/plugin/3.5
Eclipse 3.4 (Ganymede)
http://dl.google.com/eclipse/plugin/3.4
Eclipse 3.3 (Europa)
http://dl.google.com/eclipse/plugin/3.3

If you would like to download the latest version of GWT without using Eclipse you can find the download here.


Some of the new changes:
Speed Tracer
Speed Tracer is a Chrome Extension that allows you to pinpoint performance problems in your web applications.
Downloading & getting started with Speed Tracer for Google Chrome


Speed tracer tutorial video


What's New in GWT 2.0?


New Features
  • Development Mode
  • Speed Tracer
  • Developer Guided Code Splitting
  • Compiler Optimizations
  • Draft Compile
  • Declarative User Interfaces
  • Layout Panels
  • Bundled Resources via ClientBundle
  • HtmlUnit for Testing
Video of changes in GWT Version 2.0:



Google Web Toolkit Gallery


Google Web Toolkit Showcase of Features