My favorites | Sign in
Google
                
Search
for
Updated Aug 28, 2008 by galgwt.reviews
DevGuideModules  
Modules are XML files that contain settings related to your application or library.

Modules

Individual units of GWT configuration are XML files called modules. A module bundles together all the configuration settings that your GWT project needs:

Modules may appear in any package in your classpath, although it is strongly recommended that they appear in the root package of a standard project layout.

Entry-Point Classes

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 gets called.

Source Path

Modules can specify which subpackages contain translatable source, causing the named package and its subpackages to be added to the source path. Only files found on the source path are candidates to be translated into JavaScript, making it possible to mix client-side and server-side code together in the same classpath without conflict. When module inherit other modules, their source paths are combined so that each module will have access to the translatable source it requires.

The default source path is the client subpackage underneath where the Module XML File is stored.

Public Path

Modules can specify which subpackages are public, causing the named package and its subpackages to be added to the public path. The public path is the place in your project where static resources such as HTML files, images, and third party javascript libraries are stored. When you compile your application into JavaScript, all the files that can be found on your public path are copied to the module's output directory. The net effect is that user-visible URLs need not include a full package name. When module inherit other modules, their public paths are combined so that each module will have access to the static resources it expects.

The default public path is the public subdirectory underneath where the Module XML File is stored.

Specifics

Module XML Format Modules are defined in XML and placed into your project's package hierarchy.

Automatic Resource Inclusion Modules can contain references to external JavaScript and CSS files, causing them to be automatically loaded when the module itself is loaded.

Filtering Public and Source Packages Filter files into and out of your public path and source path to avoid publishing files unintentionally.


Sign in to add a comment