Hot skills: Ajax-based framework simplifies Java
development
What is it?
The Google Web Toolkit (GWT) is an Ajax development framework
for Java programmers. They write their program front-ends in Java,
and the GWT compiler converts it to browser-compliant Javascript
and HTML.
Google says, "GWT is for developers who don't speak browser
quirks as a second language," and GWT applications do not
necessarily "break the back button" - one of the big objections to
Ajax.
GWT is downloadable free, with open source licensed source code
for the libraries.
When Google previewed GWT at the JavaOne 2006 event, it was with
a lack of fanfare typical of the take-it-or-leave-it attitude the
company adopts to its applications. Less easy to understand is the
lack of media attention the preview received, since Google is the
originator of the most widely used Ajax-developed applications -
Google Mail, Google Groups, Google Suggest and Google Maps.
What's it for?
Ajax applications can be developed and debugged using Java
integrated development environments (IDEs) and other development
tools of choice. There are four major components of GWT: a
Java-to-Javascript compiler; a "hosted" web browser that enables
applications under development to execute as Java in the Java
Virtual Machine without compiling to Javascript; and two Java class
libraries.
The Java Runtime Environment emulation library has Javascript
implementations of the most widely used Java standard classes, and
the GWT web user interface class library has custom interfaces and
classes to create web browser widgets such as buttons, text boxes
and images. The libraries can be supplemented with handwritten
Javascript using a native interface.
At least one plug-in has been released, allowing GWT projects to
be set up within the Eclipse IDE.
What makes it special?
Google claims GWT-generated Javascript applications are similar
in size to, and almost always as fast as, handwritten Ajax. Since
code in development runs in the Java Virtual Machine, developers
have access to full-featured Java debugging. And because developers
are not tied up with browser compatibility issues and debugging,
they can devote more time to functionality.
How difficult is it to master?
GWT is supposed to take care of all the complexities of
developing Ajax applications, allowing developers to work with
familiar Java tools. They simply confirm that the application works
with each additional browser, which usually takes no additional
work.
What systems does it run on?
GWT automatically supports Internet Explorer, Firefox, Mozilla,
Safari and Opera. Google's download site offers only Windows and
Linux, but according to bloggers, the Linux version can be run on
the Macintosh, with some limitations.
What's coming up?
GWT is currently in beta and Google warns, "You should expect
the APIs to change in upcoming versions," and outdated versions
will not be supported.
Rates of pay
Java developers earn an average of £46,430, although financial
services firms often pay higher rates.
Training
Dowloads, the getting Started Guide, and other resources are on
Google. Several unofficial GWT sites exist, offering user guides,
alternative libraries and news.
http://code.google.com/webtoolkit
www.gwtsite.com
Vote for your IT greats
Who have been the most influential people in IT in the past 40
years? The greatest organisations? The best hardware and software
technologies? As part of Computer Weekly’s 40th anniversary
celebrations, we are asking our readers who and what has really
made a difference?
Vote now at:
www.computerweekly.com/ITgreats