BT

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

| by R.J Lorimer Follow 0 Followers on Jan 21, 2008. Estimated reading time: 5 minutes |
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 Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

there's also UFace... by James Strachan

The UFace project provides support for Eclipse Data Binding on GWT as well as a UI widget facade so you can develop your application once and deploy on GWT, MyGWT, gwt-ext, Swing or Eclipse/JFace.

James

Re: there's also UFace... by Ronald Miura

An abstraction of the abstraction of the abstraction? Here we go again... :)

Re: there's also UFace... by Dan Diephouse

An abstraction of the abstraction of the abstraction? Here we go again... :)

Yeah James, I have to admit I'm skeptical about such an abstraction as well. Whats good for the web isn't good for the desktop and vis a versa. Maybe for some limited applications its useful, but as a general idea I'm wary. Thoughts?

Re: there's also UFace... by James Strachan

An abstraction of the abstraction of the abstraction? Here we go again... :)

Yeah James, I have to admit I'm skeptical about such an abstraction as well. Whats good for the web isn't good for the desktop and vis a versa. Maybe for some limited applications its useful, but as a general idea I'm wary. Thoughts?


So GWT doesn't have any data binding facilities at all, to take an object and bind it to a form or take a list of objects (maybe a property of an object) and bind it to a table or tree etc. So thats the first thing UFace does; provide an implementation of Eclipse Data Binding for GWT, gwt-ext and MyGWT. Thats got nothing to do with abstractions on abstractions; its purely a data binding implementation for GWT*. There's also one for Swing and SwingX too. Note that the Data Binding implementations work directly off of the actual widgets, not through any kind of UI abstraction.

Then, when you look at the GWT API, the gwt-ext and MyGWT APIs for widget creation; there kinda the same abstractions - a GWT/gwt-ext/MyGWT/Swing/JFace table are all kinda the same widget in what they can do; ditto for tree, combo box, input field, text area, buttons etc. The guts of the widgets are the same, they just support different styling options. Its also worth mentioning that if you want to deploy your app with pure GWT, with gwt-ext or MyGWT you need some kind of abstraction as the APIs are all totally different (and thats just for GWT never mind Swing/JFace).

Sure whats good for a typical server side web framework like Struts isn't good for the desktop. However the widgets in GWT are pretty much desktop widgets in what they can do and how you use them; they are very similar to Swing & SWT/JFace widgets so the abstracts fit very nicely. Take a look at the examples in UFace; they are typical rich applications which work great in GWT, gwt-ext, MyGWT, Swing, SwingX and JFace using the same Java code. Note that the abstraction is really just a Builder abstraction for creating widgets in a generic way.

Sure there are differences; mostly in layout. Also there's some fun and games with GWT as it doesn't support introspection so you need to use things like gwt-reflection. Ultimately it'd be good if we could build Swing & JFace UIs in a GWT way (using HTML for the layout, CSS for styling and the Java code just mostly deals with the data binding).

You might thing its a bit wacky; but then I think most folks coming from a Java server side web framework think GWT is wacky too until they really get it. (At first I thought GWT was crazy with all this Java -> JavaScript compiling until the penny dropped). GWT really is a kinda desktop UI framework that deploys in web browsers:)

Re: there's also UFace... by James Strachan

An abstraction of the abstraction of the abstraction? Here we go again... :)


Putting on my pedant hat for a second, the GWT/gwt-ext/MyGWT UI APIs are not really abstractions; they are Java classes for working with specific widget implementations :)

Tatami should be listed by Jeff Sublet

The goal of the Tatami project is to integrate Dojo Widgets in the GWT.

You can have a look to the demo.

Jeff

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

6 Discuss
BT