Developing GWT Components
When the GWT support is enabled, you can start developing GWT application components.
- GWT Package Structure
The standard GWT package layout facilitates differentiating the client-side code from the server-side code. The image below illustrates the structure of a standard GWT package.
Client - this directory contains the client-side source files and subpackages.
Public - this directory contains various static resources that can be served publicly. By default, this directory is not created in the project.
Server - this directory contains the server-side code and subpackages.
GWT Module XML descriptor.
- GWT Module
Individual units of a GWT configuration are XML files called modules. A module bundles all the configuration settings that your GWT project needs, namely:
An entry point application class name; these are optional, although any module referred to in HTML must have at least one entry-point class specified.
Source path entries.
Public path entries.
Deferred binding rules, including property providers and class generators.
The GWT Module XML descriptor (5) should reside in the root package of a standard project layout. IntelliJ IDEA can simply generate a GWT Module with the corresponding project structure for you.
- Entry Point
A module entry-point is any class that is assignable to
EntryPointand that can be constructed without parameters. When a module is loaded, every entry point class is instantiated and its
EntryPoint.onModuleLoad()method is called.
In this part: