|
OverviewUsingGWT
Using GWTYou can use GWT's set of UI components (called Widgets) to construct the UI elements that make up your AJAX application. Like traditional UI frameworks, Widgets are combined in Panels that determine the layout of the widgets contained within them. This is a complete GWT application that displays a button with a click handler: public class Hello implements EntryPoint {
public void onModuleLoad() {
Button b = new Button("Click me", new ClickListener() {
public void onClick(Widget sender) {
Window.alert("Hello, AJAX");
}
});
RootPanel.get().add(b);
}
}GWT supports a variety of built-in Widgets that are useful for AJAX applications, including hierarchical trees, tab bars, menu bars, and modal dialog boxes. GWT also has built-in support for remote procedure calls and other more sophisticated web application features. See the complete list of features for more information. Debugging and Deploying GWT ApplicationsGWT applications can be run in two modes:
To support hosted mode, GWT ships with a special web browser with hooks into the JVM. See the GWT architecture diagram below for more information. For a step-by-step installation and usage guide, please see the Getting Started Guide. Google Web Toolkit ArchitectureGWT has four major components: a Java-to-JavaScript compiler, a "hosted" web browser, and two Java class libraries:
The components, from bottom to top, are:
For a step-by-step installation and usage guide, please see the Getting Started Guide. If you're curious about the underlying source code, please feel free to check it out. The source code for all of GWT is available under the Apache 2.0 license. |
Sign in to add a comment