Google Web Toolkit (GWT)
I spent some time looking at Google Web toolkit (GWT). I developed a small application to get a feel of the framework - this post is to share what I found.
I evaluated the GWT framework in the following contexts:
Usability
This framework offers a lot of value for Java developers who want to develop cross browser AJAX enabled rich client applications without having to write any javascript code. The developers can use existing Java tools, IDEs for the development. GWT lets the developers run the client side code as a pure java application in “hosted browser” before compiling this java code into javascript that runs inside any browser. GWT comes with the support of RPC (and some other ways of making remote calls), which makes it very similar to a client/server like application.
Learning Curve
The product comes with good documentation and it should be easy for Java programmers to get up to speed with this framework quickly. Developers who have used any thick client technology will find it even easier to get started with
IDE Support
All the development is done in java so one can use and IDE like eclipse.
Testability of code
Since the client code is written in java, testing tools like JUnit can be used to run the test cases on this code.
Maintenance of code
Use of Java combined with an IDE like eclipse ensures that one can easily refactor the client side code.
Scalability
The javascript generated by GWT is highly optimized and the client only downloads the javascript that’s needed. We need to wait for more user experiences in situations where GWT has been used to develop complex applications.
Performance
The GWT pages load quite fast since the requests sent to server are asynchronous. The startup time is noticeably faster than the applications using traditional synchronous calls to download the html.
Cost
Free (Apache 2.0 open source license)
Industry take-up
Though this is still relatively new product, it has created quite a buzz in the industry and it has certainly grabbed the attention of many. The IDEs are coming up with plugins to better support GWT, and there are many user groups discussing GWT.
Industry support
The GWT user forums are quite active and can be used to get help on any development/deployment related issues. This page has some information on third party support for GWT: http://code.google.com/webtoolkit/thirdparty.html
Summary
So here is the brief summary of Pros and Cons of GWT in my opinion:
Pros:
Usability
- Enables developers create cross platform ajax application using pure Java.
- Use of statically typed language like Java makes finding bugs at compile time easier, ensures more predictable behavior and lets the compiler optimize the generated code
- Supports Constraint based layouts with panels
- Supports the ability to create new widgets from the existing ones
- Both existing and user created widgets can be styled using CSS
- GWT lets the developers run the application in “hosted mode”, where the byte code is run as a normal Java application in hosted browser. This feature allows the developers to debug and step into the client side code like they would do for any Java application.
- One can store state within browser as live objects (very similar to what one would do in a thick client application so a lot of server calls may be avoided.
- GWT comes with very good support for history management. It comes with a java class that takes care of implementing it in a browser specific manner. This also lets one bookmark a particular page in an app.
- It has support for JSNI (java script native interface) that can be used in case there is a situation when the developer needs to write javascript code manually (by defining a method native) instead of letting GWT generate it from Java code.
- GWT provides a variety of techniques to help developers internationalize their applications
Remote Calls
- Supports use of java interfaces to define remote services
- Client/Server can pass java objects back and forth over the wire. GWT automatically creates the stubs to do serializing/deserializing of objects.
- Use of same language (java) on both client and server ensures that one can refactor both client and server side code simultaneously
- GWT also supports communication with a service not written in java, so it can work with SOAP and JSON messages, for example.
Testing
- GWT brings in the software engineering practices to AJAX development by letting developers write test cases or debug their client side code as they would for any other java applications.
Cons:
- Only a fraction of java classes that come with JRE are available for use in GWT.
- It does not support features like reflection and dynamic class loading (the reason for this constraint, however, is that it gives the compiler as much information as possible at the compile time to better optimize the generated code).
- Requires developers to use Swing-style programming
Overall, I was impressed by GWT. I would like to hear if you have got the chance to use it in any real life projects and your thoughts/feedback on it.
Useful Links/Resources
GWT Resources
GWT Tutorials/Articles
GWT Forum
Next Steps »
- Leave your comment (2)
- Trackback from your own site
- Read other posts in similar categories : RIA, Technology






Subscribe by Email
Hey!…Thanks for the nice read, keep up the interesting posts..what a nice Tuesday
Thank you for your post. I was tabulating some features of GWT and found your post as answers for few of them