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 ''
         [WARN] Line 103: Referencing deprecated class ''
         [WARN] Line 104: Referencing deprecated class ''
         [WARN] Line 104: Referencing deprecated class ''

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)
Eclipse 3.4 (Ganymede)
Eclipse 3.3 (Europa)

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

Wednesday, October 7, 2009

Announcing GWT 2.0 Milestone 1

If you are like me I am sure you have been patiently waiting for the release of GWT 2.0.  If you are ready to start some early testing of GWT 2.0 you can download a copy of the Milestone 1 release here.  It is interesting to note that you no longer need to download the appropriate version for you development environment.  Now you simply download this single version and then GWT will download the appropriate plugins for your browser. There are lots of changes in this Milestone 1 release so your best bet is to take a look at the release notes and also the GWT 2.0 Milestone 1 announcement  in the GWT group here.
Be on the lookout for bugs and you probably don't want to attempt to use this version in your GWT production environment at this time.

Saturday, August 1, 2009

GWT Google Plugin for Eclipse 1.1.0

For those of you using the GWT Eclipse plugin there is a new version. Of course if you installed in Eclipse and have automatic updates enabled then you probably know about this update already.

Here are some of the main features of this release:
- Support for Eclipse 3.5 (Galileo)
- GWT RPC interface validation with quick fixes
- App Engine DataNucleus enhancer console no longer steals focus on save

The GWT group thread on this new version is here.

Depending on your version of Eclipse you have different URLs for installation:

- Eclipse 3.5 (Galileo) -
- Eclipse 3.4 (Ganymede) -
- Eclipse 3.3 (Europa) -

Thursday, June 4, 2009

GWT Tetris - Great Puzzle Game from the 80s

I am sure there are some of you out there that have never heard of the puzzle game Tetris. Seems like the 1980s was just a few years ago, ah how time flys. I first played the game Tetris on my Tandy Color Computer 3, and played and played. I absolutly loved the game! Funny, I still love the Color Computer too. Here is a screen shot of Tetris on the Color Computer:

Some time ago I tought it would be a fun little project to take the game Tetris and write a GWT version of it. Well now someone has already done it. A few days ago on the Google Web Toolkit Group I noticed a post about Tetris. I had to give it a try, and I was quite impressed with the result:

I had a chance to talk to the author Janusz Prokulewicz and asked him a few questions about the development of this game.

Some time ago Janusz created a Java version of his Tetris game. Having created the same game as a linux shell application over 4 years ago he was able to get his Java version working in three days. So the real question, how hard was it to convert to GWT and how long did it take? To quote Janusz: "It took me 2 and a half days (or rather nights) to do it".

So we have an existing Java application that Janusz was able to convert it to GWT in two nights. The game can now be played in any modern browser with no special plug-ins and no goofy browser quirks to worry about. Write it once in GWT and compile and you are ready to go.

Unfortunately at this time he does not have a web site that contains his other work, maybe in the future he can set something up.

He used GWT version 1.6.4 with no additional libraries.
The game is deployed with a PHP backend using JSON to get/send data to the server.

Janusz's web site is here.

Update June-8-2009: Janusz now has a blog setup. You can see his site here.

Wednesday, April 8, 2009

GWT support in Google Apps Engine AND GWT 1.6

Big news today for GWT!

First GWT 1.6 is available for download. Please see the official blog entry from Google here.

Second big annoucement for GWT is that the Google Apps Engine now supports Java. One thing to be aware of is that google has said that they are only allowing the first 10,000 developers. Better sign up fast. Here is the link to signup.

The also ask that you provide feedback, here is that link.

To find out more please see the official blog post from Google here on Google App Engine supporting Java.

For those of you using Eclipse for Java development (and I highly recommend you use it) there is now a GWT/App engine plugin for Eclipse.
For more information on the plugin see this Blog post.

The quick start guide to install the GWT/Google App Engine Eclipse plugin is here.

If you are already an eclipse user and know how to install plugins here are the shortcuts you need:

Eclipse 3.3 (Europa)

Eclipse 3.4 (Ganymede)

Friday, February 13, 2009

GWT 1.6 Milestone 1 available for download

This is the latest GWT release, it is a milestone release so be sure to only use it for testing.
If you are like me and use Eclipse to develope your GWT application there is a nice change that is part of this release. You no longer need to run these commands to create a new GWT Eclipse project:

C:\Program Files\gwt-windows-1.5.3>applicationCreator.cmd -eclipse MyGWTProject -out c:\MyGWTProject com.mynumnum.client.MyClass
Created directory c:\MyGWTProject\src
Created directory c:\MyGWTProject\src\com\mynumnum
Created directory c:\MyGWTProject\src\com\mynumnum\client
Created directory c:\MyGWTProject\src\com\mynumnum\public
Created file c:\MyGWTProject\src\com\mynumnum\MyClass.gwt.xml
Created file c:\MyGWTProject\src\com\mynumnum\public\MyClass.html
Created file c:\MyGWTProject\src\com\mynumnum\public\MyClass.css
Created file c:\MyGWTProject\src\com\mynumnum\client\
Created file c:\MyGWTProject\MyClass.launchCreated file c:\MyGWTProject\MyClass-shell.cmd
Created file c:\MyGWTProject\MyClass-compile.cmd

C:\Program Files\gwt-windows-1.5.3>projectCreator.cmd -eclipse MyGWTProject -out c:\MyGWTProject

Created directory c:\MyGWTProject\test
Created file c:\MyGWTProject\.project
Created file c:\MyGWTProject\.classpath

Now all you need to do is run the command webAppCreator:

C:\Program Files\gwt-windows-1.6.0>webAppCreator.cmd -out c:\MyGWT16Project com.
Created directory c:\MyGWT16Project\src
Created directory c:\MyGWT16Project\war
Created directory c:\MyGWT16Project\war\WEB-INFCreated directory c:\MyGWT16Project\src\com\mynumnum
Created directory c:\MyGWT16Project\src\com\mynumnum\client
Created directory c:\MyGWT16Project\src\com\mynumnum\server
Created file c:\MyGWT16Project\src\com\mynumnum\MyClass.gwt.xml
Created file c:\MyGWT16Project\war\MyClass.html
Created file c:\MyGWT16Project\war\MyClass.cssCreated file c:\MyGWT16Project\war\WEB-INF\web.xml
Created file c:\MyGWT16Project\src\com\mynumnum\client\
Created file c:\MyGWT16Project\src\com\mynumnum\client\
Created file c:\MyGWT16Project\src\com\mynumnum\client\
Created file c:\MyGWT16Project\src\com\mynumnum\server\
Created file c:\MyGWT16Project\build.xml
Created file c:\MyGWT16Project\.projectCreated file c:\MyGWT16Project\.classpath
Created file c:\MyGWT16Project\MyClass.launch

Your new GWT 1.6 Project will be ready for import into Eclipse. Also you will notice that a simple client and server class is created in the example that demonstrates how to send and receive RPC requests.

Errors when launching your Eclipse GWT project in the GWT shell

You must create a lib folder in your 'project folder'/war/WEB-INF folder and copy gwt-servlet.jar into that folder.
After this is done you should be able to launch your new Project without this nasty error message:

2009-02-13 12:22:51.760::INFO: Logging to STDERR via org.mortbay.log.StdErrLog
2009-02-13 12:22:51.901::INFO: jetty-6.1.x
2009-02-13 12:22:52.229::WARN: failed echoServlet
java.lang.NoClassDefFoundError: com/google/gwt/user/client/rpc/RemoteService
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)