BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News GWT Shows Momentum With the Creation of Numerous Open Source Framework Projects

GWT Shows Momentum With the Creation of Numerous Open Source Framework Projects

This item in japanese

GWT (Google Web Toolkit) is seeing continued adoption in the RIA (rich internet application) community. This has triggered the initiation of a number of frameworks and libraries that either supplement GWT, or use it as a foundation for more feature-rich functionality:

GWTx (download)

GWTx focuses on enhancing what Google refers to as their JRE Emulation. GWT provides several implementations of core Java libraries in Javascript so code written in Java for GWT can be properly 'compiled' or translated by GWT into Javascript.

GWT-DND (download)

GWT-DND is an extension library for providing drag-and-drop support to GWT. GWT-DND is extensively used in the community, and other projects (such as GWT Diagrams listed below) use or provide integration with the libraries provided by this extension. This library is very mature, and has been around in at least some manifest since early last year when it was introduced as a series of patches to the core GWT download.

Hibernate4gwt (download)

Hibernate4gwt is specifically targeted at providing a framework for integrating the GWT Java back-end with the mature ORM Java tool Hibernate. GWT presents unique complications as well as unique opportunities for using a library such as Hibernate in a GWT application. By leveraging the API of the remote services in GWT as well as the features of the Hibernate library, Hibernate4gwt is able to provide a handful of different integration options with different benefits and drawbacks:
  • stateless (the default) : your server remains stateless and do not store any extra information. Your domain classes will have to inherit from LazyGwtPojo to store lazy attributes.
  • dynamic proxy : a proxy is generated to handle lazy properties information both on server and client side. You just have to implement the Serializable interface and force GWT deferred binding on client side (see the associated guide for details)
  • Java5 support : because GWT does not support Java5 beans, hibernate4gwt allow you to dynamically clone your Domain classes to GWT compatible DTO. Theses clone classes must have the same name than the Domain class (in a different package) and inherits from LazyGwtPojo. On the other hand, hibernate4gwt will manager lazy properties for you and do not require any clone mapping file.
  • stateful : lazy informations are not stored in the POJO but in HTTP session. So, your Domain classes won't have to inherit from LazyGwtPojo anymore, but your web server become stateful. 
Hibernate4gwt also provides documented support for working with the Spring framework (which is valuable for developers also using GWT-SL listed below).

MyGWT (download)

MyGWT is one of the most popular GWT frameworks currently available, and is built using the LGPL-licensed Ext Javascript library, by the same team. MyGWT brings a significant amount of Javascript functionality to GWT by leveraging the existing and already mature Ext library.

Included in the MyGWT library are implementations of several components such as buttons, dialogs, tables, trees, lists, and tabs among others. MyGWT also provides several layouts for organizing components in a user interface.

Also supported are multiple dynamic data loading schemes for the various components, including XML data stores, JSON, and the GWT RPC communication layer.

GWT-Ext (download)

GWT-Ext is similar in many ways to MyGWT. Just like MyGWT, GWT-Ext is also built on top of the Ext Javascript library. Because of that, many of the supported controls and widgets in GWT-Ext look and behave very similarly to MyGWT. However, GWT-Ext supports several components and features not available in MyGWT, such as DatePickers, explicit form and validation functionality, and drag-and-drop support in trees.

Like MyGWT, GWT-Ext also supports a variety of back-end data sources for its components.

Gwittir (download)

The Gwittir project is a component library for GWT, with an emphasis on using a consistent UI to model interaction scheme. The authors of Gwitter describe it in this way:
The purpose of this project is to provide a set of code generators, scaffolding, utilities, and a basic MVC framework for use with Google Web Toolkit based applications.
In many ways, Gwittir is similar to MyGWT and GWT-Ext in that it is a GWT UI library, and provides functionality such as components, flow control, validation, and even animation. However, while both MyGWT and GWT-Ext use a fairly familiar MVC-style pattern (analogous to the layout of Swing components as an example), Gwittir uses a significiantly different approach to integrating business models to the UI. The authors state their frustrations with traditional MVC models on the Gwittir website:

I have a confession to make. I have hated almost every UI toolkit I have ever used, in almost any environment. The Model-View-Controller pattern has been with us for a long time now, and other UI toolkits like Swing or SWT in the Java space employ them to a great degree when they build their UI components. The problem has always been that THEIR models and YOUR models are never the same. When you are working with a UI toolkit, you are trying to build a UI for working with your business model, not the abstract model used by the toolkit designers.

GWT-SL and GWT-WL (download)

The GWT Server Library (GWT-SL) is a project aimed at simplifying the integration of a GWT application with the Spring framework.
The SL is a sub project of the GWT Widget Library which aids integration of GWT RPC services to Spring by allowing the publication of POJOs as RPC services.
Meanwhile, the GWT Widget Library (GWT-WL) is another project aimed at providing a series of more feature-rich widgets than those available in the base GWT installation. Widget support in GWT-WL includes calendars, calculators, image buttons, progress bars, pagination, and more.

GWT Diagrams (download)

Unlike many of the component libraries described above, GWT Diagrams focuses on providing functionality for rendering mutable diagrams through GWT. Among the features included in GWT diagrams is support for multiple connection line styles, the ability to use any GWT UIObject as a connection point, and the ability control line connection to various edges of components.

---

Along with the projects listed above, there are several other open source libraries available for GWT with varying degrees of activity and community adoption. Some other libraries not listed here include Rocket GWT (which provides all kinds of functionality from widgets, to additional JRE emulation libraries), gwt-maven (offering integration of GWT with Maven), gwt-math (which offers an extended set of library implementations for the core Java math APIs) just to name a few.

InfoQ will continue reporting new development among the GWT open source development community.

Rate this Article

Adoption
Style

BT