[AI] (Tech Dose of the Day) Google Web Toolkit

vishnu ramchandani vishnuhappy at yahoo.com
Thu Feb 14 03:16:45 EST 2008

Google Web Toolkit
contributor : Baskar P from Media&Entertainment
Vertical Initiative Team (MphasiS Software Services)
What is Google Web Toolkit?
Google Web Toolkit (GWT) is an open source Java
development framework that lets you escape the matrix
of technologies that make writing AJAX applications so
difficult and error prone. With GWT, you can develop
and debug AJAX applications in the Java language using
the Java development tools of your choice. When you
deploy your application to production, the GWT
compiler translates your Java application to
browser-compliant JavaScript and HTML.
Here's the GWT development cycle:

1. Use your favorite Java IDE to write and debug an
application in the Java language, using as many (or as
few) GWT libraries as you find useful. 
2. Use GWT's Java-to-JavaScript compiler to distill
your application into a set of JavaScript and HTML
files that you can serve with any web server. 
3. Confirm that your application works in each browser
that you want to support, which usually takes no
additional work.
The major GWT components include:

1. GWT Java-to-JavaScript Compiler
Translates the Java programming language to the
JavaScript programming language.
2. GWT Hosted Web Browser
Allows the developers to run and execute GWT
applications in hosted mode (the app runs as Java in
the JVM without compiling to JavaScript). 
3. JRE emulation library
JavaScript implementations of the commonly used
classes in the Java standard class library (such as
most of the java.lang package classes and a subset of
the java.util package classes). 
4. GWT Web UI class library
A set of custom interfaces and classes for creating
Dynamic and reusable UI Components: programmers can
use pre-designed classes to implement otherwise
time-consuming dynamic behaviors, such as
drag-and-drop or sophisticated visual tree structures,
Simple RPC mechanism, Browser history management and
Support for full-featured Java debugging.
GWT handles all cross-browser issues for the developer
such as JUnit integration, Easy internationalization,
The developers can mix handwritten JavaScript in the
Java source code using the JavaScript Native Interface
Support for using Google APIs in GWT applications
(initially, support for Google Gears) Open-source. 
The developers can design and develop their
application in a pure object-oriented fashion, since
they're using Java (instead of JavaScript). Common
JavaScript errors (such as typos and type mismatches
are caught at compile time. JavaScript that the GWT
compiler generates is quite obfuscated or very
difficult to read, which provide the application with
some security and protection of proprietary material.
A number of libraries are available for GWT, by Google
and third parties. These extend GWTs features.
GWT compiles JavaScript and HTML from Java bytecode.
This model will in most scenarios create much larger
JavaScript and HTML than what is possible to achieve
with solutions where the JavaScript Widgets handcoded
from before and is thought of rather as an API than as
a "compiler result". An alternative way of creating an
Ajax framework with "no-JavaScript pain capability" is
to think of the browser as a purely rendering
mechanism for predefined widgets and send messages
from the server to those widgets and vice versa.
Available Widgets:-
As of version 1.4 (August 2007), GWT offers several
HTML primitives (Button, Radio Button, Checkbox,
TextBox, PasswordTextBox, TextArea, Hyperlink,
ListBox, Table etc.), PushButton, ToggleButton,
MenuBar, Tree, TabBar, DialogBox, Panels (PopupPanel,
StackPanel, HorizontalPanel, VerticalPanel, FlowPanel,
VerticalSplitPanel, HorizontalSplitPanel, DockPanel,
TabPanel, DisclosurePanel), RichTextArea, SuggestBox
Many common widgets not found in the GWT have been
implemented in third-party libraries, such as GWTiger,
GWT Widget Library, GWT Component Library, Rocket GWT,
GWT-Ext etc.    
Further References 
Google Web Toolkit: 

      Why delete messages? Unlimited storage is just a click away. Go to http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html

More information about the AccessIndia mailing list