Recently, I have been working on porting a Struts and uPortal based legacy application to GWT. This work was initiated a year ago to replace an unappealing, non-responsive and slow user interface of the legacy application. Another key requirement was to make the client side technology stack lighter. Use of multiple client side technologies (Struts, uPortal, JSP, Tag libraries, Java Script, configuration files, CSS, XSLT) made it difficult to make even simple UI changes.
After initial analysis, it was clear that we needed to incorporate AJAX in multiple areas across the application. It was further decided to use one of the existing AJAX frameworks rather than writing AJAX “by hand”. After evaluating several AJAX frameworks, we selected GWT. Other AJAX frameworks like DOJO and YUI library are also good but they did not solve the above mentioned problems arising from a fat architecture and a complicated technology stack.
One of the primary reasons for selecting GWT was its unique approach to developing the complete application: both the client side and the server side components using Java. GUI development with GWT APIs is similar to Swing development and it is refreshing to forget JSP, JavaScript, and Struts and write everything using Java. I am very happy with experience so far and we have vastly improved presentation layer while retaining most of the service layer code.
With GWT, the AJAX front-end is written in Java that gets compiled into highly optimized Java Script. Developers do not need to write Java Script while end users are provided with dynamic and standards-compliant AJAX experience. JavaScript gets downloaded by the client browser at runtime where most of the client side processing is performed thus releasing the server side from handling presentation tasks.
I am impressed by the developer friendly features of GWT. Using Java in the presentation layer facilitates the use of design patterns and creation of reusable widget libraries. GWT’s approach to history management, internationalization, and service layer interaction is easy to understand and implement. I felt spoilt by the choice of available tools, default support for multiple browsers and ability to debug AJAX in hosted mode. I also noticed ancillary benefits like elimination of training on multiple technologies, reduced dependence on technology experts, and the overall speed of development.
I have heard arguments about Flex being a better RIA choice than GWT. I think this may be because some people may not be aware of other GWT widget libraries (like GWT-EXT) available today. Although GWT comes with a very good collection of useful and cool widgets but you can always use third party widget libraries which provide additional AJAX components like a special Tree or Grid component. We used GWT-EXT, a very rich widget library to achieve the desired functionality.
I found a few features missing – for example, there is no inbuilt support to load client side libraries on demand. Actually GWT loads all client-side libraries in client’s browser when the end-user accesses any module of the web application for the first time. So I think GWT may be a misfit for large enterprise applications. Also I faced problems due to lack of emulators for some of the Java classes like Calendar and our application POJOs contain Calendar objects. The good thing is that there are workarounds available to solve these problems.
I strongly recommend GWT if you are developing a mid size web application that needs enhanced usability and a desktop like look and feel.

By Mohit on Jun 3, 2009
Nitin: Thanks for sharing your experience.
I was preparing the case to use one of the Ajax frameworks in our application and would like to know the following:
Did you guys use “Comet” or “Reverse Ajax” technology in the application? It would be interesting to know if GWT supports Comet or how easy it is to integrate Comet with GWT.
Also, I feel the Ext JS framework needs a mention here for the developers evaluating frameworks for RIA: http://extjs.com/
Reply
Nitin Sood Reply:
June 10th, 2009 at 12:57 am
Thanks Mohit for reading the blog and posting this query.
We are not using “Comet” in our application. A quick search suggests there already are solutions available to implement Comet solution using GWT. Based on your requirements, you can decide to implement your own solution or check an existing one like rocket-gwt (http://code.google.com/p/rocket-gwt/wiki/Comet).
You can also check blog by Jean where he talks about implementing GWT Comet based web app using Grizzly Comet (http://weblogs.java.net/blog/jfarcand/archive/2008/05/building_gwt_co.html)
Reply
By Rob Stone on Jun 4, 2009
I have followed a similar path, creating a new configuration interface for our product using GWT and gwt-ext. The one piece of advice I would give would be to avoid using a javascript library wrapper (eg. gwt-ext, smartgwt) if you possibly can and stick with pure GWT as when you encounter problems with the library tracking them down and fixing them can be time consuming.
When I first started my app there were very few pure GWT widgets available beyond the standard set, so to get the extra functionality required I had to rely on gwt-ext. The picture has changed significantly since then with projects such as gwt-incubator. Another problem with gwt-ext was that it is no longer supported, I plan to replace it with pure GWT widgets as soon as possible.
Reply
Nitin Sood Reply:
June 10th, 2009 at 1:12 am
Thanks for your comments Rob.
I agree using a javascript library wrapper like gwt-ext can become a pain beause of licensing changes / lack of support. We faced similar problem while using “Livegrid” control. This control had a bug in the version of GWT-Ext we were using which was fixed in ExtJS and unfortunately GWT-ext was not supported anymore. We had to analyze the fix and apply similar one in the version of code we were using. If you can get all the required widges in pure GWT widgets then that sure is preferred way. We used gwt-ext because we required very rich widget library that was not available in GWT.
Reply
By Sekhar Ravinutala on Jun 4, 2009
Thanks Nitin for the nice, objective summary. If this app is public, could you post the URL?
Reply
Nitin Sood Reply:
June 10th, 2009 at 12:49 am
Thanks for the compliments Sekhar.
I cannot post the URL since the app is not public.
Reply
By Tan on Feb 5, 2010
Hi, we’re evaluating GWT and JSF to see which one is best suited to rewrite our “fat” desktop application to a web-based one. Your article is very helpful.
You know GWT 2.0 is out now, does it solve some of your problems now?
Regarding your statement “So I think GWT may be a misfit for large enterprise applications.” due to lack of dynamic loading. Is there way to workaround this problem?
Finally, is Ext-gwt 2.1 a JS wrapper?
I appreciate your answers.
Reply