X
Business

Google redefines Ajax, again

Wouldn't it be nice if you could write, test, and debug your application using a normal client-side development environment and then just press a button to make it run inside any web browser? That's the promise of the new Google Web Toolkit (GWT).
Written by Ed Burnette, Contributor

Back in February I wrote:

"I think most people are just going to be sporting band-aids until we're all wow'ed by a better, hopefully simpler, solution."

I was writing about how nobody seemed to have quite figured out Ajax besides Google. Today at JavaOne they both proved my point and gave us a better, simpler solution. Enter the Google Web Toolkit (GWT).

Simply put, GWT lets you forget you ever heard about Ajax, DHTML, and JavaScript. Forget browser incompatibilities (and maybe someday even forget about having to write every application twice, once for the web and once for the desktop). What do you have to remember? How to program in Java.

What you do is: write, test, and debug your application in Java using Eclipse ("hosted mode"), and then as a final step, "compile" it into "browser machine code" (aka JavaScript). Command line utilities are available but it's easiest in Eclipse. According to Google,

"Generally speaking,

  1. If your GWT application compiles and runs in hosted mode as you expect
  2. And GWT compiles your application into JavaScript output without complaint,
  3. Then your application will work the same way in a web browser as it did in hosted mode."

It's not a totally new idea, but as with many things on the web, Google executes it better than anybody else. And, because it's Google, everybody is ga-ga over it. Just look at the new GWT forum; in the past day it has acquired over 500 members and over 350 posts.

Will this work? Judge for yourself by running the sample applications in your browser (no downloads required), or by checking out the GWT SDK.

Editorial standards