Monday, October 16, 2006

Introduction to the Google Web Toolkit

Since a couple of weeks I am looking at the Google Web Toolkit (GWT). I think there is a lot to say about this piece of software and I will try to share my experiences and opinions about it.

What it is? Simply said, it is a set of API and utilities that enables you to write Java programs that can be converted by a special compiler into Javascript! So GWT makes your code runnable into the most recent browsers without requiring the user to install a plug-in (assuming Javascript is enabled).

GWT belongs to the family of AJAX technologies (Asynchronous Javascript and XML) that are becoming common for building applications on the web. Using AJAX, the user’s experience is closer to a “normal” software utilization than web pages surfing. Local processing by the Javascript gives more interactive applications and avoids the entire page reloading syndrome.

A first remark, although the term is recent, AJAX is everything but new from a technology perspective.

Why converting Java into Javascript versus writing Javascript code directly?

  • you develop in one language (good for me, I have always difficulties mixing languages).
  • you can easily cross-debug in one debugger – GWT fits well into Eclipse – in a so called hosted mode.
  • you benefits from the Java compiler and syntax controller tools.


So only goods in GWT?

  • Only a subset of the Java runtime is available and developers have to learna new set of objects of interface programming – one more: it is not Java Server Face, it is not Swing nor SWT. Well, it is GWT.
  • Because it is Javascript and requires the compiler, forget about transferring serializable objects from a server to the client.
  • You have great debugging, but what you debug (Java in hosted mode) is not what you deploy to your users (code compiled into Javascript running in various Browsers).


Next I will explain you a bit my first experience with GWT…

No comments: