Dr. Axel Rauschmayer is a freelance software engineer, blogger and educator, located in Munich, Germany. Axel is a DZone MVB and is not an employee of DZone and has posted 246 posts at DZone. You can read more from them at their website. View Full User Profile

GWT's Future: 2.0 and My Wishes

  • submit to reddit

Programming web applications with GWT has been a revelation. Having mature tools and a single code base for client and server is great. In this blog post, we'll first look at the new features of the upcoming version 2.0 of GWT. Then I'll list a few wishes that are still unanswered by 2.0.

New features in GWT 2.0

GWT 2.0 has some incredible features in store:

  • In-browser hosted mode: see your hosted mode webapp in a real web browser. This obviates many needs for compilation. Plus both compilation and starting hosted mode will become faster.
  • Developer-guided code splitting: you tell the compiler roughly were to split to lazily load code and the compiler figures out how to package your code.
  • Better layout: the GWT team seems to have worked on better CSS-based layouts. I'll believe it when I see it, but if this works, it will fix one of the biggest Ajax problems.
Get more details about GWT 2.0 at “GWT Can Do What?! A Preview of Google Web Toolkit 2.0”.

Open wishes

Alas, a few of my wishes are still unfulfilled. I've collected them below, they are the result of my experiences while implementing Hyena. If all of these wishes were to come true, then this would make web applications true competitors to desktop applications (well, one would still have to figure out packaging and access to desktop features; Trephine is very useful here, but an even cleaner solution would be nice).


  • Server-side image generation: generate a JPG, PNG or SVG image on the server, send it to the client, display it in an image. Right now, the work-around is to use a data: URL with base-64 encoded binary data and assign it to an image. But that wastes space and does not work with SVG in a cross-browser fashion.
  • @Ignore annotation for methods: This would mark server-only methods and prevent client-side code from being generated. The current work-around is to move server-only code to static methods in a different class.
  • Swapping a server-only implementation of an interface with a client-side place holder: With custom field serializers you can control how a class is serialized but not what class is instantiated. This is a problem whenever you have a nested data structure that contains server-only implementations. I currently do my own reflection-based traversal and swap implementations to solve this problem (directed by annotations). Hardly a simple solution.
  • True dynamic loading of client-side GWT code: would be the perfect client-side complement to server-side OSGi modules. Then OSGi modules (or even just plug-in JARs) could bring their own client-side code. Currently this does not work, because GWT always compiles the reachable code of all used modules into a single monolithic "binary". The kind of code splitting that is planned for GWT 2.0 seems to be almost there, but serves a different purpose.
  • GWT API for Bespin's widget library: This widget library is completely drawn by JavaScript in the canvas tag. Sounds crazy, works really well, because JavaScript has gotten so fast.


  • Full client-side regular expressions (preferably with an API that works server-side, too).
  • Non-static GWT.create(): It would be nice if class objects could be sent to the client for instantiation. Currently, the only work-around is to register serializable factories (that actually do the instantiation, statically) and send those to the client.
  • String.format(): is useful, easy to implement, and should work on the client.
  • Class.getSimpleName(): same as above.


  • Better layout: Hopefully GWT 2.0 delivers on this front. What I miss is to be able to specify “take up as little space as possible” (as opposed to * or fixed spaces). Vertical spacing is often tricky, too.
  • Better widgets: The scarcity of widgets is still one of GWT's weak spots. Mappings to JavaScript widget libraries are possible, but then one does not profit from GWT's small code size. A few widgets I'd like to see are:
    • A more flexible suggest box (that can make suggestions anywhere and has a configurable trigger character; both things are relatively easy to add to the current suggest box).
    • A tab bar where one can add widgets to the right of the tabs (right-justified).
    • A span-based HTML widget.
    • Tables: a table that can be translated back to a model (with the incubator's ScrollTable, row numbers change when sorting), a table with grouping (see SmartGwt), and a tree table.
    • More events: an OnEnterKey event for TextBox and onChange events that are fired whenever a change happens; not just when un-focusing a TextBox or TextArea.

From http://2ality.blogspot.com

Published at DZone with permission of Axel Rauschmayer, author and DZone MVB.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)



Dominique De Vito replied on Mon, 2009/06/29 - 3:55am

I would like to see a rich client implementation of GWT on top of Java2D, similarly to Pivot (like Pivot is based on top of Java2D, and not Swing) : http://incubator.apache.org/pivot/

Today, GWT is compiled on top of HTML+AJAX while some business code stays on the server-side.

I would like a GWT implementation on top of Java2D (that is, that could be an opportunity to re-invent Swing following Swing 2.0 ideas : again, see Pivot for ideas), or may be Swing.

Then, when developping with GWT, developers would have the choice of the target platform: browsers or rich Java clients. 




Paul W. Homer replied on Mon, 2009/06/29 - 10:29am

I'd like:

 - an external way to update history (from somewhere like an iframe).

- faster compilation.

 - dynamic CSS (I did this, but I'd like it moved into the core).

 - way more and better widgets.

 - dynamic class loading and some form of introspection.

 - a better async handling method (I ended up using JSON underneath, but it could be better).

 The interface and build environments are ok, but I want more support for implementing interacting components (portal'ish stuff). Mostly because I think that lots of small interacting JavaScript app, would be better than one thick, "thin" JavaScript app. There aren't a lot of resources available (in browsers), so a partitioned load-what-you-need design will have less intrisic resource problems.



Greg Brown replied on Tue, 2009/06/30 - 7:37am in response to: Dominique De Vito

Why not just use Pivot? :-)

Dominique De Vito replied on Tue, 2009/06/30 - 3:16pm in response to: Greg Brown

There are some cases where I need to develop quite a similar app for 2 different targets : RIA and web-only deployment. I am looking for doing so using somewhat a common code base. Unfortunately, AFAIK, Pivot can't match that specific goal.

Greg Brown replied on Wed, 2009/07/01 - 10:13am in response to: Dominique De Vito

Makes sense. Have you considered writing the RIA version in Pivot and the web version in GWT? You'd at least be able to share some (Java) code between the two versions that way.

Andrei Vishnevsky replied on Wed, 2009/07/01 - 2:01pm

Frankly speaking I don't belive the idea of GWT. It is impossible to build luxury (GWT) car basing on bicycle (WEB).

I have slightly reviewed GWT (it was more than one year ago, but more or less actual today): GWT Quick View

Platform that works basing on Java2D already exists. It works everywhere: PDA, PCs, Smart Phone, old Java 1.1 or the latest Java 1.6 it doesn't matter. It is can be easily adapted to be run on Android, Eclipse or .NET environment. See Gravity

dee wang replied on Thu, 2009/07/02 - 1:16am

Thanks for a resourceful content. this is what i have been looking for so long. I don't get the idea why they start these kind of trial when the criminal are old. Perhaps this more personal form of accountability will deter future actors where the fear of international condemnation has not. Ed Hardy stores are located in many locations internationally including the Americas, Europe and Asia.

Ed Hardy UKgtsqqq

John Jonny replied on Thu, 2009/07/02 - 3:43am

it certificationReally felicitous post. Thanks in that sharing it.braindumps

Axel Rauschmayer replied on Thu, 2009/07/02 - 6:36am in response to: Andrei Vishnevsky

@Andrew Vishnevsky: I've blogged about this: What is the appeal of GWT (and Ajax)?

Andrei Vishnevsky replied on Thu, 2009/07/02 - 7:32am

Thank you. I have just read it. At least we have several common points regarding WEB development :) But what I cannot accept is the word combination: "WEB Application". WEB is supposed to be used to represent linked information, that is all. It has never been designed for application development. I have collected my thoughts in the article you can find following the link below:

WEB as antique value of our fathers

Axel Rauschmayer replied on Sat, 2009/07/04 - 9:49am in response to: Andrei Vishnevsky

Don't forget that the server side is part of a web application, too. Then the client side works as an interface to web services (or a web-service-like API). The server does the heavy lifting, the client is just a thin presentation layer. Quite useful for some scenarios.

I agree with the criticisms in your blog article, but the nice thing about GWT is that it abstracts everything enough so that one's code is fairly future-proof. Thus, one can let Google worry about keeping up with browser technologies. HTML 5 is already adding new widgets and while I was ready to hate the HTML DOM, I now really like it. Some aspects of CSS are weird, but it enables an interesting style of declarative GUI programming: By just changing attributes such as the class of an element, a whole lot of changes can be triggered. Check out jQuery to find out more.

I think one can loosely compare Ajax's success with Java's: Both didn't do anything new, were initially quite flawed, but somehow hit a sweet spot that made people use them. That is, people saw the potential and not the flaws. With Ajax, the story isn't finished, yet, but things look promising.

BWT: The thread at http://java.dzone.com/articles/what-appeal-ajax-and-gwt has gotten quite long and does have some more Ajax pro and contra arguments.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.