programming, internetJanuary 5, 2007 6:20 pm

Google Web Toolkit: A Free Software AJAX framework from Google

On December 12th, Google made their "Google Web Toolkit" (GWT), version 1.3 Release Candidate, Free Software. It’s released under the Apache 2.0 license.

I haven’t yet used GWT, but it looks very clever. You write code in Java, against the GWT API, and then GWT compiles it into a JavaScript AJAX application.

AJAX

AJAX is the next step in the evolution of several existing technologies. Its predecessor is DHTML, which is the combination of HTML, CSS, and JavaScript.

From Wikipedia:

Ajax, shorthand for Asynchronous JavaScript and XML, is a web development technique for creating interactive web applications. The intent is to make web pages feel more responsive by exchanging small amounts of data with the server behind the scenes, so that the entire web page does not have to be reloaded each time the user requests a change. This is meant to increase the web page’s interactivity, speed, and usability.

The Ajax technique uses a combination of:

  • XHTML (or HTML) and CSS, for marking up and styling information.
  • The DOM accessed with a client-side scripting language, especially ECMAScript implementations such as JavaScript and JScript, to dynamically display and interact with the information presented.
  • The XMLHttpRequest object is used to exchange data asynchronously with the web server. In some Ajax frameworks and in certain situations, an IFrame object is used instead of the XMLHttpRequest object to exchange data with the web server, and in other implementations, dynamically added <script> tags may be used.
  • XML is sometimes used as the format for transferring data between the server and client, although any format will work, including preformatted HTML, plain text, JSON and even EBML. These files may be created dynamically by some form of server-side scripting.

Java

The fact that you can code in Java may well make the process much more pleasant, and give a greater sense of power.

Interoperability

One of the really clever things about GWT is that it should take care of browser incompatiblities for you. JavaScript programming is notoriously difficult, because of the differences in browser implementations. Trade-offs are often made in deciding which browsers to support, and to what extent.

If GWT lives up to its promise, and deals with that worry, then it’s worth using for that reason alone.

Capabilities

I’ve been pretty impressed by the samples I’ve seen, and the extra libraries people have made available. Check out some of the links at the end of this post.

On the GWT site itself, there’s a sample that emulates a desktop email application. It’s pretty impressive. Also have a look at the GWT Wiki & gwtpowered for some other nice examples, and additional components.

There seems to be a rich set of components available from third parties. Even better, most seem to be Free Software.

*** 

I hope to use GWT, in the not too distant future, to help create an AJAX interface for SquirrelMail and, in turn, ippimail. Given what I’ve seen, I’m really looking forward to it. The practice should also be useful in building some Java skills.


Related posts:

Links: 


GNU Free Documentation License

Copyright (c) 2006-2007 Michael J Kaye.

Permission is granted to copy, distribute and/or modify the content of this blog post under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.