Google Web Toolkit Tutorial - douglasjose.comhttp://douglasjose.com/tech/tutorials/gwt.htm1 of 53/23/2008 14:17
Google Web Toolkit Tutorial
) library is available. These components are well known byGMail and Google Maps users.This tutorial presents how GWT changes the application development paradigm, and brings an implementation sample using the framework.
Java classes advantages
A model of GWT architecture is presented below.The architecture is split in two big layers. The first one is the libraries layer. This layer has a visual components layer, which represents user interfacecomponents, and a Java emulation library, that contains the implementation of some classes from
The first step to use GWT is to download the package from framework site. It's currently available to Windows and Linux. In this tutorial we're going to presentconfiguration instructions to Windows, remembering that the procedures almost the same for Linux. This tutorial was built using GTW version 1.0.20. Thepackage is distributed in a zip file, and its size is 13.9 MB.The installation is very simple: just unzip the distribution package in a local directory. In this directory will be created the GWT libraries and some projectconfiguration utilities.This tutorial will be written using Eclipse WTP. This IDE was choose because GWT brings tools that simplify the project creation step for Eclipse.
Creating a project
So let's start coding. First of all, we're going to create a project and an application. To do that, we'll use two utilities,
. It'snecessary to create a directory where the project files will be placed. Add the GWT directory to the environment variable
, to make project creation easierand from project's directory, run the command
projectCreator -eclipse TutorialGWT
to create the project, and then, run the command
applicatoinCreator -eclipse TutorialGWT br.com.javamagazine.client.TutorialGWT
The basic Eclipse project structure will be created, with GWT libraries references already configured. At Eclipse, just import the created project (Menu
File>Import>Existing projects into workspace
), and the configurations will be automatically set up. The project structure should be similar to the presented belo