Introduction
Audience
These tutorials are intended to serve those who want to write rich Ajax applications using Google Web ToolkitProgramDevelopers.
Although these tutorials assume you have knowledge about HTML, CSS, and Java, they are not necessary to run these tutorials.
Before getting started
Before starting these tutorials, we assume that you have completed the following:
- You have installed the Java SDK.
If you have not installed the latest Java SDK, you can download the Sun Java Standard Edition SDK.
- You have installed eclipse or other your favorite Java IDE.
In these tutorials, we use eclipse because it is open source. GWT does not force you to use eclipse. You can use intellij, netbeans, or any other Java ide you prefer. However, if you use a Java ide other than eclipse, it will be different from some specific introductions in the tutorial, but the basic GWT concepts are still the same.
If your Java ide does not yet include support for Apache ant, you can download a program to compile and run GWT applications conveniently.
- Google Eclipse plug-in has been installed.
The Google Eclipse plug-in adds additional functions to eclipse for creating and developing GWT applications.
- Google Web Tookit has been downloaded.
Google Web Toolkit can be downloaded using the Google Eclipse plug-in. In addition, you can download the latest Google Web Toolkit for your operating system.
- You have extracted GWT to the directory where you want to run it.
There is no installation program for GWT. All the files required to run and use GWT are in the decompressed directory.
You can also choose to do this:
- Install the Google App Engine SDK.
Google App Engine allows you to run Java Web applications containing GWT on Google devices. The App Engine SDK can be downloaded using the Google Eclipse plug-in. You can also download the App Engine SDK for Java separately.
GWT tutorial
Build a sample GWT Application
- Build a sample GWT application.
Develop a stockwatcher (stock index Monitor) using GWT ), you will learn how to create a GWT project, how to use GWT widets and panels to build the UI, how to write client functions in Java, how to debug in host mode, how to apply CSS styles, and how compile Java into JavaScript and how to run applications in Webpage mode.
Client/Server Communication
- Communicate with the server through gwt rpc.
By adding a call to the server through gwt rpc, you will learn how to make asynchronous calls, how to serialize Java objects, and how to handle exceptions.
- Retrieve JSON data through HTTP.
Construct an HTTP request to retrieve JSON data from the server. This technology can also be used to retrieve XML data.
- Build cross-site requests
- Construct a remote server call subject to same origin policy
Internationalization
- Internationalization of GWT applications.
Use static string internationalization to translate the user interface of the GWT application into another language.
JUnit Test
- Use JUnit for unit testing.
Add Unit Tests for GWT applications through JUnit.
Deploy to Google App Engine
- GWT and Google App Engine.
Deploy the GWT application to the App Engine.
Reprinted with the author's name and original URL (jiaowei.cnblogs.com ).