About a couple of months back a news posting caught our eyes. We were fed by a few aggregators and ofcourse Google alerts – mentioning that Google has just released the beta (i am fed up of seeing beta for all google products) version of GWT (Google Web Toolkit). We were already into evaluating a couple of web frameworks including JSF and Wicket.
GWT was just another announcement among those recent spurt of web framework offerings. But knowing the brand value of Google we decided to give it a go. We put together a team developing a full fledged application on GWT to start with. And then add on the complexity of having a Spring + Hibernate backend. I am posting our observations out of this excercise.
- The team didnt have to know a thing about JSP and Servlets to develop a web application.
- Knowledge of core java is good enough to get started, though a little idea of event driven programming and Swing/AWT will be added advantage.
- The embedded shell provides an easyway to test and see the application in action during development.
- Discussion forums on GWT site is already rich enough to have information on almost all issues that we faced.
- There is a huge community building and contributing UI widgets.
There are a lot more positives. You can always get them from GWT site. But what you wouldnt get is – the negatives. So the below text is more important and needs to be exhaustive. So dont decide on GWTs fate by the number of items below, but use the information below to your aid.
- It only supports async communication. We didnt find a way to do sync communication.
- Its documentation is not very friendly. Not based on standard javadoc. Sometimes it becomes difficult to navigate. We posted in the forum but no luck.
- Limited set of GUI widgets. Dialog box doesn’t have minimize, close buttons out of the box.
- Documentation doesn’t have pictures of all the widgets. You really need to use the widget to know how it looks like.
- It needs a tooling support for drag-n-drop GUI design. As of writing this there is no open source IDE or plugin to other IDEs. Desiging the UI manually was painful and reminded us of those granny’s days of Swing coding. 😦
- Browser incompatibility, looks different in Firefox and IE. Didnt try with Safari or Opera.
- No support for JSE 5.0 yet.
- GWT UI will not load at all if a browser doesn’t support JS.
- No direct support for internationalization. There is a complex workaround only.
- It provides an abstraction over JS, HTTP and HTML using Java. The obfuscated (compiler generated) JS is very hard to debug while detecting and fixing bugs.
- The web application will be dependant on GWT’s code generator being error free.
- You can only unit test the java code and assume that the generated JS will work properly.
- GWT supports only a subset of java classes and interfaces.
- Serializable is not recognised by GWT compiler and it forces objects that are passed between cleint and server to implement GWT’s IsSerialisable interface. This puts design constraint when GWT is integrated with a backend. We had to resort to object to object mapping toolkits (like Dozer) to solve the problem.
- List Box does not have ‘value’ feature.
- gwt-user jar cannot be used for deployment in Tomcat, the javax.servlet packages have to be stripped from the jar before deployment.
- If you need to integrate your UI with any existing application, the source code of existing app will be required if any of the classes from it needs to be used in UI code. If it uses any ‘non-supported’ java class then you are in a soup.
- All your GWT code runs on client. So the bigger your application is, the heavier the JS that gets downloded to client browser and hence the slower your initial page load beomes.
- Application code is sent to the client though in the form of obfuscated JS.
- Few utility packages in java like, reflection, text and regular expression are frequently used in user interface code. GWT doesnt support them.
Our impression from this small excercise is that, if there is open source (we support OSS) IDE support to build the UI quick and fast then building the web application using a bunch of java developers will not be a tough task. If the API documentation can be improved and the widget libarary can be made little more rich then the UIs can be made amazingly beautiful in small time.
We reserve our comments for its suitabilty for enterprise application development. Its definitely an issue if you have to integrate with existing applications.
ps: Thanks to the team who worked on developing the prototype and helped compiling these points.