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.

gwtProjectStructure.png

  • GWT root package node (1).
  • Client (2). Under this node, the client-side source files and subpackages are grouped.
  • Public (3). UNder this node, various static resources that can be served publicly are grouped.
  • Server (4). Under this node, the server-side code and subpackages are grouped.
  • GWT Module XML descriptor (5).

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:

  • Inherited modules.
  • 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 EntryPoint and that can be constructed without parameters. When a module is loaded, every entry point class is instantiated and its EntryPoint.onModuleLoad() method is called.

To get more familiar with the GWT application structure, have IntelliJ IDEA generate a GWT Sample Application for you.

See Also

Procedures:

Web Resources: