2008-09-06

eFAN's GWT Development Approaches

There are different approaches to do GWT web development. One easy and quick way is to use GWT Designer*. Design the GUI layout and look & feel within one tool, and the generated code is ready and bug free for integrating with business process logic code. Design, code, debug and test, ... all can be done by one single developer. The approach is so similar to traditional standalone windows application development approach. That's the beauty of GWT and GWT Designer. However, before GWT Designer could become widely adopted by GUI artists / designers, this approach does has two big disadvantages:
  1. Obviously, few developers are excellent at GUI design. Either a developer spends extra time to come out kind (not so professional) GUI by drag & drop in GWT Designer, or a GUI designer pass over a GUI design in paper (or whatever electric format) to a developer who then uses GWT Designer (or pure java coding if he prefer) to implement the design. Either way one has to spend extra or duplicated time, so the time saved by GWT is wastered here.
  2. More seriously, once that design went into implementation phase, it's totally mixed with Java code (or worse, mixed with process logic), then it's very hard to change the GUI without breaking the code.
So GWT Designer approach is only suitable for small project, or for quick prototype purpose. That's why I went into another approach.
The approach is, a GUI designer come out GUI design/mockup in html format (which has been widely adopted and language/tool independent), a developer takes that html then does two small changes:
  • Add GWT loading script (***.nocache.js) into the html head.
  • Assign unique ID property to each html tag which content need to be dynamic updated by code (or wrap that part in a "div" tag).
Then pass back the updated html to designer, and use the html as the host page for development. This approach integrates the design output and the Java logic code seamlessly but clearly separates the concern between GUI designer and Java developer, and the design could be changed without breaking the java code.

* Note:  GWT Designer was created by Instantiations which acquired by Google.

没有评论:

发表评论