Update your application to GWT 2.0

Hoourey GWT 2.0 was released, it's time for new project update.

 1. Point one
First thing we all know the GWT 2.0 comes with the new "development mode" instead of the "hosted mode" that allows us to run and test our applications faster and in the browser of our choice. GOOD point.

Another good point is the "Speed Tracer" plugin to help you understand here bottleneck is. Though, this tool is not very oriented on detail, but more on high level view, which is good, but could be improved in the next versions.

All those can be found here: http://code.google.com/webtoolkit/download.html

The starting of the "dev mode" is faster than the old "hosted mode", and you can use and test the application in the browser, so now we get rid of the problem "I don't know, it's working in the hosted mode, but not in the web mode".

2. Point two
For running in dev mode, though, we need to install the dev-mode plugin (download Google Web Toolkit Developer Plugin), from one of this direct URL links:
- Firefox
- Internet Explorer
- Chrome
- Safari

I've tried my application using the GWT2.0 in these 3 browsers (Chrome, IE8, and FF3.5), and as Chrome is the fastest in day to day operations ... I expected the GWT dev-mode plugin will be the same ... but false ... the order of speed in dev-mode is:

1. Firefox
2. Internet Explorer
3. Chrome (far away comes)

 Why? I hope we'll have soon an updated version !

3. Point three
Other difference is that the starting of the application requires a quite special URL, like this one, to be typed directly in your browser:
http : // localhost : 8080 / MyApp.html ? gwt.codesvr = localhost : 9997
The parameter "gwt.codesvr" is used by the dev-mode browser plugin to communicate with your "eclipse" project, so you can debug it nicely. If you miss this parameter then you just run your application in plain "web mode" with no debug possibility.

Note: 8080 is the default port for you app, 9997 is default the port for dev-mode plugin ... both of them can be changed (so pay attention to startup configuration)!  Here you can find how to change the GWT ports.

4. Point four
Question: what do we do with our older releases, which cannot be updated, and they are still on older GWT 1.7.1 versions?

Things to do when we update/change a library (GWT in our case):
- 0. Generate first a simple GWT 2.0 project using the Eclipse plugin, and then update your module MainApplication.gwt.xml and MainApplication.html according with the GWT recommendations.
- 1. put the new jar
- 2. update the classpath, build.xml files etc.
- 3. perform a clean up of the browser cache
- 4. clean up the "Temp" folder, here the GWT compiles the project (usualy is the OS temp file).
- 5. perform a clean build of the project
- 6. launch you application.

 This is valid for trying to run older projects on the same machine with the GWT2.0 projects ... clean-up the browser cache and temporary folder "temp" is the "action of the day".

Happy GWT 2.0 updating !!!

5. My other related articles
       - Optimize the GWT compilation
       -  Replace CSS images with ClientBundle
       - Ideas for optimizing the GWT applications
       - Code examples of "How To Do" things in GWT
       - Change the default GWT Dev-Mode ports and parameters



  1. great tricks ... thanks man!

  2. Thank you for posting those plugin URLs. My browsers were detecting the need for the plugin but were not finding it automatically. I couldn't find links to the direct access pages for the plugin until I ran into your article.

  3. As far as the Eclipse GWT 2.0 plugin is considered, it is horribly slow if we try to run any app with any external server (by unchecking the 'Run built-in server' checkbox). As soon as we hit the URL in some browser, it starts peeping thru all the available Jars and try to find out something which i never had any hunch. It takes nearly 5-6 mins just to invoke the onModuleLoad method of my EntryPoint class.
    You guys have any clue on wat the process happening under the hood ?

  4. Hi Aditya,

    We don't know what Google is doing with its own browser, but perhaps they have critical design bugs with the GWT dev-plugin. I've opened this defect for them since the GWT2.0 was release, few months ago ... but not fix so far.

    As I said earlier at point 2), use the FireFox for this .. is fastest and you can have the FireBug add-on to help you debug.


  5. Is there any way to download the plugin for Chrome and install it on computer without Internet?

  6. 1. Use a computer connected on internet and
    2. right-click on my previous link "Chrome" at the above point (2)
    3. select "Save Target As.." or "Save link as..." and save the file "gwt-dev-plugin.crx" to your desktop.
    4. copy this file to your computer without internet condition that has already installed the Chrome.
    5. right-click on it, and choose "Open With..." option that will allow you to select the Chrome the application to open this kind of file .crx
    6. accept the "fake" download message, and the install it.
    7. that's it -- cheers!

  7. this is definitely a useful link.
    thanks for sharing ;)