Google Web Toolkit v2 released with many improvements

By Kshitij Sobti Published Date
11 - Dec - 2009
| Last Updated
11 - Dec - 2009
Google Web Toolkit v2 released with many improvements

Google has just released the second version of its GWT, a rich web development platform. The new version comes with many improvements and features including the Speed Tracer tool and a new way of creating UIs declaratively.

GWTs approach lies in coding web applications in Java, which are then compiled to JavaScript code which can run in any browser. This enables the developer to code once without worrying about browser compatibility issues. The GWT compiler not only generates the JavaScript from the Java source, but also optimizes it to reduce the size, and improve performance.

The development procedure is similar to developing any Java application, and comes with the same benefits. For example you can debug your GWT Java application just like you would any other Java bytecode. You can step through code, editing it and seeing the changes instantly.

Furthermore, since your application is written in Java, and compiled to JavaScript, the GWT compiler is able to more perform more optimization than could be achieved using a JavaScript minifier, as it has an grasp on the code of the entire application.

Version 2.0 of the toolkit brings many improvements for testing and coding.

In version 2.0 GWT application can directly be run on any browser using a plugin available for multiple browsers. The testing can even be done remotely, allowing for scenarios where the developer is running a Linux system and as such cannot test the code in IE. With this you have te opportunity to test your code on the browser it will run on, and use the development tools for the browser to debug it. In GWT 2.0 the same debugging session can also be connected to multiple browsers, allowing you to test it simultaneously on all the target browsers.

The compiler of GWT has also been improved to give more efficient code, which can be between 3% to over 20% faster. In GWT 2.0 you can also use instruction which will split the JavaScript into multiple segments, reducing start-up times. The split pieces will automatically be rearranges and loaded at the proper time to ensure that all dependencies are met.

To further improve performance, you have a new Chrome extension "Speed Tracer" which provides you rich detailed information about your application's performance. This also includes the rendering and layout times so that you can optimize those too.

Another feature to save time is ClientBundles. These allow you to bundle together resources into one download, thus saving round trips to the server.

GWT 2.0 features a new way of creating UIs with UiBinder. This allows you to declaratively lay out your application's UI in an XML file instead of writing everything in code. New layout panels allow for greater flexibility in creating complicated layouts which use CSS instead of JavaScript for faster performance.

If you are a web developer, you should definitely find out more about this amazing toolkit. Visit the GWT page at Google Code for more information, tutorials, and download of the Google Web Toolkit. You can also get the Google Speed tracer chrome extension here.