显示标签为“GWT”的博文。显示所有博文
显示标签为“GWT”的博文。显示所有博文

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.

2008-07-03

GWT & AJAX Libraries

AJAX is becoming de facto leading Web development approach. It's not only because AJAX can give end users more responsive and better richer experience in Web browser, but also because it saves development time by using the approach invented in Google GWT (http://code.google.com/webtoolkit/) to translate Java code into javascript, so to free developers to focus on the language they familiar with, to develop Web app using standalone GUI app style (listener - event - handler style, and to retrieve data from backend only and display the data in UI naturally, but not page navigation) which saves time in both design flow and coding, and no need worry about cross-browser compatibility which saves time in debugging and testing…

Microsoft is following GWT's approach in new project Volta, so this approach is adoptable in .NET too. I had chance to use it to develop a Web Patch for CodeStriker and feel the same advantage to save time in design flow and coding (as I enjoyed in using GWT in my previous projects), though Volta inherits those bad genes of M$ (1. stolen the idea from GWT but denied; 2. pretend to be free but actually is not free - it requires you to buy VisualStudio Prof 2008; and 3. same as any other W$ development tools, buggy & poor documentation), but it still worth to wait to see if Volta growing mature in case one has to do development in .NET platform due to under the situation of decision made already...