Dez 10 2009

Experiences with the migration from GWT 1.7.1 to 2.0

Published by at 1:29 PM under Google Web Toolkit

google web toolkit


With the release of GWT 2.0 there are several new features (like Code Splitting, Compiler improvements, faster development mode) introduced and i decided to make a test run on my current enterprise project to see what have changed in this points:

  • Compilation time
  • API changes
  • Startup time of the new Development Mode
  • Problems with other libraries


My enterprise project currently needs 66 seconds to build 8 permutations and is using this technologies:

  • GWT 1.7.1
  • GXT 2.1.0
  • GIN 1.0 (with Guice 2.0)
  • GWT-Presenter 1.0.0
  • GWT-Log 2.6.2
  • gwtrpc-spring 1.01
  • Spring Framework 2.5.6
  • Spring Security 2.0.5
  • Hibernate Libs 3.x (core, annotation, validator…)


GWT 2.0

After i have replaced the old gwt-jar files with the new files, cleaned the project, i started the build target and launched the application. Here are the results:

Compilation time
Without compiler optimization the build need 107 seconds for 8 permutations. Using the draftCompile parameter the build needs “only” 82 seconds. These are not the results i have awaited.

API changes
Due to the fact that my build runs through without any errors or warnings, i think the major switch from listener to handler was done with the migration vom GWT 1.5 to 1.6 . So i think there aren’t any critical showstoppers waiting for me.


Startup time of the new Development Mode
Changing from com.google.gwt.dev.HostedMode to com.google.gwt.dev.DevMode was a great speedup! Using any browser you want, instead of this old Hosted Mode-Browser is a useful improvement. I can strongly recommend google Chrome 4 with the new Speed Tracer for development.

Problems with other libraries
In the technology-list above you can see that i use a wide range of gwt-technologies. I had some doubts about GXT, because i am using many widgets from it like the TabPanel, Drag and Drop, special Layouts, TreePanels, Accordion Window, Grids… , but i did not noticed any errors! I launched my Selenium-Tests many times and every result was green. The people from GXT have done a good job with the recently released version 2.1.0 .


Conclusion
Overall i think that migration could be possible with less effort if you have implemented an extensive test-suite. I see the most problems in Widget libraries like GXT, SmartGwt.. which are using listeners from API 1.5 .

If you have any comments, drop a line below.

Technorati Tags: , , , , , , , , , , ,

4 responses so far

4 Responses to “Experiences with the migration from GWT 1.7.1 to 2.0”

  1. Sanjiv Jivan sagt:

    Hi Siegfried,
    Small correction : SmartGWT has been using the new GWT addHandler style of event registration since the very initial release. SmartGWT is also fully compatible with GWT 2.0.

  2. Kevin Wong sagt:

    With each new GWT release, you should expect compilations to take longer, not shorter. This is because of additional JavaScript optimizations that inevitably add to the total time. Your resulting JavaScript should be smaller and faster, though, which should be the higher priority goal, after all.

  3. [...] la migration, les retours (comme celui-ci) sont plutôt encourageants et laissent présager une migration sans trop de difficultés. Les [...]

  4. scc sagt:

    There are environment issues, which aren’t described anywhere, and lots of people have small problems…

    Read more about these tricks here: http://ui-programming.blogspot.com/2009/12/update-your-application-to-gwt-20.html

    Cheers!