BT
x Your opinion matters! Please fill in the InfoQ Survey about your reading habits!

Instantiations Adds Google Web Toolkit Support with GWT Designer

by Scott Delap on Sep 21, 2006 |
GWT has become the new favorite technology of tools providers. InfoQ previously covered the announcement of Wirelexsoft's VistaFei GUI design tool. Instantiations, makers of visual design tools for SWT and Swing, has now added GWT support with their beta release of GWT Designer. Among the product's main features:

  • Bi-directional Code Generation - Java code can be changed graphically or in source with changes reflected in the other view.
  • Fast Operations - Edits and Updates in 300-400 milliseconds
  • Rich Editing Experience - Support for Grids, FlexTables, and TabPanels
  • Wizard & Builders - Wizard for creating PopupPanels, DialogBoxes, etc. Builders for "async" services.
  • GWT Application Launching - Launch GWT Applications from Eclipse
  • Intelligent Refactoring - Renaming modules classes and remove service updates modify the module XML files and renames any associated *Async and *Impl classes
  • Internationalization - Hard coded string can be extracted to resource bundles
InfoQ sat down Instantiations Vice President, Mark Johnson, and Sr Vice President of Product Development, Eric Clayberg, to discuss their new product. In regards to why create an GWT designer Johnson responded:

By all measures Instantiations has the market-leading Java GUI builder for Eclipse with our WindowBuilder Pro product. With WindowBuilder's component products - SWT Designer and Swing Designer - we support the two most popular Java client GUI frameworks. WindowBuilder is all about giving developers the choice of which framework they use (SWT or Swing) to build their Java client GUIs. Since GWT puts AJAX application development into the realm of the Java developer, it made a lot of sense for us to support the GWT framework. In addition, the WindowBuilder product is mature and has very sophisticated development facilities (drag-n-drop, bi-directional code generation, internationalization, multitude of layout managers) so we can leverage those facilities and make them available to developers who want to build web applications using GWT.

We then asked Clayberg about the challenges of working with GWT:

The biggest challenge was in making it work at all. As you may know, GWT uses native methods with special special comments to declare JavaScript methods. This allows it to implement the lowest-level functionality of the core GWT classes in handwritten JavaScript. On the other hand, inside of JavaScript special naming is used for the reverse task - calling Java code from JavaScript (JSNI). GWT borrows this concept from the Java Native Interface (JNI). Our aim was to implement true WYSIWYG with full widgets and CSS support, so we needed to be able to load these classes and use them just like as other SWT/Swing components. This required a lot of magic with COM/OLE and class loaders. We also employ a *proprietary* technique of using ASM for fast bytecode modification that converts JavaScript methods into normal Java methods. In the end, we have a very fast system that works several times faster than the original Google GWTShell.

Another non-trivial challenge is the support for images (and other resources). GWTShell starts Tomcat to serve up static contents. Due to speed and memory limitations we can't afford to start Tomcat each time the user opens a new editor, so we register a special custom Internet protocol within IE that routes URL requests to our Java handler.

In terms of which features he's most proud of:

We are very proud that it works at all ;-) and does it very fast, with true WYSIWYG and bi-directional code generation. You can work in the design view or source view and changes are kept in sync instantly. The ability to reverse engineer existing GWT code (either hand written or generated by GWT Designer) means that the user isn't limited in how they want to evolve their work. They can refactor their code, insert arbitrary logic, etc. without breaking the ability of the graphical design view to render their window.

The graphical design tools are also first class with excellent, context-sensitive feedback provided for any graphical operation. Matisse-like snapping and alignment feedback is provided in absolute (xy) panels, while grids and flex tables provide very nice table-oriented feedback. Creating tab panels and custom composites is also very easy and intuitive.

Another complex feature is i18n (Internationalization) support. Several months ago we did a major rewrite of our i18n support in Designer. We made it very flexible with the goal of easily adding any new i18n source pattern. Once we found that GWT version 1.1 supported i18n (using a new i18n pattern custom to GWT), we were able to add support for it in GWT Designer. It integrated easily into our existing i18n framework. We are always proud when a new feature can be implemented using an existing general framework or when adding a new feature makes it obvious that some existing features can be done using a more general and flexible approach.

Finally Johnson commented on where Instantiations sees the GWT marking going in the future. The Ajax market has featured a tremendous amount of churn and indecision in regards to which framework might become a (defacto) standard. Google brings a crediable option to the table with their industry clout, experience with Ajax apps (such as GMail and Google Maps), and significant contribution of resources advancing GWT. Instantiations believes that GWT will be an important framework for building next generation RIA applications.

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
Community comments

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

Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2014 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT