from GWT benefits to jQuery adoption
I was pretty interested in checking it out at the time but had little time on my hands and the proliferation of AJAX into the projects I was working on was pretty minimal in that perhaps one or two areas of the application leveraged the advantages of AJAX but it was far from being adopted application wide as the de facto client / server interaction model. In addition, many of the enterprise products I was dealing would have traditionally been slower in providing first class integration of newer technologies as a core product feature but were rather tacked on to fulfill customer requirements and sales & marketing demands.
I’ve had a little bit more flexibility in recent times in technology selection for new product development and have had the opportunity to use GWT and some additional libraries providing extended support for GWT and wanted to provide my insights in this blog entry and relate how what started as an evaluation of GWT ended in adoption of jQuery …
from 5,000 feet
and why do I care?
- Integrated debugging
- Compile time syntax and error checking
- Code completion shortcuts
- Syntax highlighting
hasn’t this been done before?
This to me is why GWT is so appealing as a development toolkit. Providing a solution to the issues mentioned above can add up to huge cost savings for a complex project and ease the longer term support and maintenance headaches that invariably arise as teams change and people grow into new positions. Having such a well know framework for development such as that provided by GWT / Java the addition of new people to the team can be more easily supported and more junior members can be supported more autonomously.
now, what’s the bad news?
In reality there are some downsides that should be considered when deciding on whether or not to incorporate GWT into your project, which I will cover in the following sections.
- There are a large number of libraries available that extend the core GWT framework. The two most ubiquitous examples are Smart GWT and Ext GWT. A search for GWT libraries reveals a lot more besides, with varying functionality. Most if not all provide at least a free version with additional features being offered on a license basis. The features available and the pricing need to be understood fully before the selection should be made.
- As of release 2.0 of GWT, Google has open sourced the toolkit allowing for the development community at large to extend the core functionality provided in the framework. This should spur additional contributions from the development community providing many of the productivity features that have been built to address their specific needs that can now be more rapidly released back to a wider audience.
page loading / rendering
cross browser support is a moot point
mixing presentation & code
Fortunately, GWT 2.0, includes a feature known as the UiBinder, which addresses this exact problem and allows a developer to specify the layout and presentation using an XML based representation and even allows the interspersement of HTML fragments within the layout. In this way the user interface can be specified declaratively rather than procedurally as is the case in the current version.
reinventing the wheel
Development teams have become accustomed to using existing libraries such as Spring MVC, to address these challenges. With the paradigm shift supported by GWT, the problem may be that teams will find themselves reinventing similar designs to support the functionality that they are used to, in the absence of first class support for similar frameworks in GWT.
other client side integrations
not all doom and gloom
- Server side integration – what level of support above and beyond the GWT RPC support does the library provide. Some libraries such as Smart GWT Enterprise Edition (Smart GWT EE) provide excellent data binding support with server side objects and save a lot of development time. However there is a cost usually associated with such libraries.
- Widget extensions and theme support – What level of support does the framework provide for implementing a custom theme most efficiently and what additional widgets are provided within the framework above and beyond those provided by GWT e.g. list grids, cascading drop downs.
- Cross browser support – jQuery (and Ext JS) espouses the same cross browser compatibility
- Easily integrate other libraries – Having control over and access to the JSP / HTML page allows you to easily integrate other libraries and control the flow between these libraries more easily
- As to the two points on “framework shortcomings” and “reinventing the wheel”, one need only search for jQuery plug-ins to see the vast amount of third party plug-ins available to extend the base jQuery library.
In the interest of disclosure, however, it’s necessary to admit that since using jQuery, I have wasted a noticeable amount of time hunting down some bugs which the IDE could easily have highlighted for me. Even with this in mind, the benefits of jQuery still outweigh the disadvantages for me in comparison to GWT.
To wrap things up in GWT’s favor, with the 2.0 release, a number of my concerns have been directly addressed although I have not had the opportunity to test the assertions put forth in the release notes. It’s definite that GWT 2.0 provides a much better framework that the 1.x version and developers trying it for the first time or those upgrading their projects may well find it to be the solution to their problems. For my part, having used jQuery for a number of weeks now, it will be a difficult transition to return to GWT and see how it shapes up but it is something I hope to find time for in the future. Until then, it’ll be jQuery all the way.