Wednesday, March 18, 2009

GWT Highlights

Cross channel Support - 

GWT shields you from worrying too much about cross-browser incompatibilities. If you stick to built-in widgets and composites, your applications will work similarly on the most recent versions of Internet Explorer, Firefox, and Safari. (Opera, too, most of the time). Whenever possible, GWT defers to browsers' native user interface elements. For example, GWT's Button widget is a true HTML button rather than a synthetic button-like widget built, say, from a div.


Pros

  • GWT does a good job of abstracting away some of the low-level aspects of Ajax application development, such as cross-browser incompatibilities, the DOM event model, and making Ajax calls.
  • GWT scores in its RPC mechanism and built-in serialization of objects between Java code and JavaScript. This removes a lot of the heavy lifting you see in the average Ajax application.
  • GWT has the upper hand in terms of unit testing, providing JUnit integration for client-side code. Unit-testing support is an area where JavaScript is still sorely lacking.
  • Can map native server objects such as database results to JavaScript equivalents.
  • Minimizes the amount of JavaScript code you have to handle (depending on the library)

Cons

  • Any errors in your generated JavaScript are out of your control. A particular problem is GWT's reliance on user-agent detection: Each release of a new browser requires an update to the GWT toolkit to provide support.
  • The GWT tool chain is provided in binary-only form, and modifications are not permitted.
  • Although it's possible to combine GWT widgets with normal HTML form inputs, the state of a GWT widget is fenced off from the rest of the page. For e.g., there's no straightforward way to submit the selected value from a GWT Tree widget as part of a regular form.
  • Ties the JavaScript code tightly to the server language.

2 comments:

Ayan said...

Jay... that was so technical that I am not able to comment. But I had set a target for the day to leave at least one comment on your blog.

By the way... if you re-collect in one of the projects where GWT was used, the folks faced a lot of performance issues.
Are these technologies tried and tested yet ?

Jay Kapadia said...

These technologies are indeed tested with different stress testing and regression testing tools. It is just that you should have expertise in these tools which are completely different than the current tools in the area.