Target Audience: CAST Administrators


Summary: This document provides a guide based on CAST’s field experience on how to configure GWT based applications using CAST AIP. These configurations are used all versions of CAST AIP 8.2.x and above for GWT offering (see Reference Materials below for links) to overcome limitations such as missing links. The applicability of this guide should have assessed for newer versions of CAST AIP and Extension.

Introduction to GWT

This section gives a brief overview of the framework.

GWT is a development toolkit for building and optimizing complex browser-based applications. Its goal is to enable productive development of high-performance web applications without the developer having to be an expert in browser quirks, XMLHttpRequest, and JavaScript. GWT is used by many products at Google, including AdWords, AdSense, Flights, Hotel Finder, Offers, Wallet, Blogger. It's open source, completely free, and used by thousands of developers around the world.
In a nutshell,

  A GWT application consists of following four important parts out of which last part is optional but first three parts are mandatory:  

Versions of GWT Supported by CAST


File Types expected for CAST Analysis

This section highlights all the file types that can be expected to be delivered if the application has implemented this framework.


How to identify the implementation of GWT:

This section details the approach for identifying the presence of GWT in the code delivered.

module descriptor is the configuration file in the form of XML which is used to configure a GWT application. A module descriptor file extension is *.gwt.xml, where * is the name of the application and this file should reside in the project's root. Following will be the module descriptor Helloworld.gwt.xml for a Helloworld application. This xml contains the Entry Point class and the source-path.

The most important public resource is host page which is used to invoke actual GWT application. A typical HTML host page for an application might not include any visible HTML body content at all but it is always expected to include GWT application via a <script.../> tag as follows:

Client Side code is the actual Java code written implementing the business logic of the application and that the GWT compiler translates into JavaScript, which will eventually run inside the browser. The location of these resources can be configured using <source path="path" /> element in module configuration file.
For example Entry Point code will be used as client side code and its location will be specified using <source path="path" />. 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. A sample HelloWorld Entry Point class will be as follows:

The server side part of your application and its very much optional. If you are not doing any backend processing with-in your application then you do not need this part, but if there is some processing required at backend and your client-side application interact with the server then you will have to develop these components.
 Every user interface considers the following three main aspects which is added to the client side part code and these classes can be set as Entry Point classes in CAST: 

GWT Description:

This section gives a brief overview of GWT.

GWT UI Elements:
The GWT library provides classes in a well-defined class hierarchy to create complex web-based user interfaces. All classes in this component hierarchy has been derived from the UIObject base class as shown below: 

How to configure GWT in CAST AIP:

This section describes all the CAST configuration steps to be followed in order to configure GWT based application.

Reference for other patterns of GWT

Pattern 1 – GWT

1. Architecture Diagram:

1.1. Code Snippet: 

1.2.. Representative Code Flow  
JSP -> GWT Client Module -> GWT Place -> GWT Activity/View -> GWT RequestFactory Proxy -> GWT RequestFactory Service -> Hibernate -> Database(extends ContentView, start from step 5)\com\....\tfx\client\mvp\

2. (....\com\....\tfx\client\mvp\\com\....\tfx\client\mvp\\com\....\tfx\client\\com\....\tfx\client\\com\....\tfx\client\ui\\com\....\tfx\client\ui\

8. ....\com\....\tfx\shared\

9. ....\com\....\tfx\shared\service\ajax\\com\....\tfx\server\service\ajax\

Pattern 2 – GWT

Architecture Diagram:

Server manager Configuration:


Pre Analysis Configuration:



This section gives an overview of the Enlighten diagram.

CMS Configuration:

This section describes the CMS Configuration which is required to set for GWT.

Universal Importer



Universal Importer




TCC Configuration:

This section describes the TCC configuration which needs to be set.

a. Classes which extends Widget

a. GWT View classes which extends ContentView
b. Classes which extends  WidgetDisplay 
c. Classes which extends Composite 
d. Classes which extends EntryPoint 
e. Classes which extends BasePresenter