Overview of the Web ADF architecture


Summary There are three tiers to the Web Application Developer Framework (ADF). The first is the view/controller tier that contains the Web controls. The second tier is model tier 1, which provides some business logic but also acts as an intermediary between the Web and pure business logic tiers. In model tier 1, the controlling object is the context, and all the other controls must be attributes of the context to work properly. The third tier is model tier 2, which provides access to geographic information system (GIS) data sources and exposes functionalities on those data sources. In model tier 2, there is a concrete implementation of GISResource for each data resource. In model tier 2, there is also a concrete implementation of GISFunctionality for each functionality for each data source that has that type of functionality.

For a resource to work with the controls, it must be registered with the context.

Each of the model tiers exposes functionality that you can use out of the box without having to communicate directly with the corresponding servers.

In this topic


Web ADF architecture tiers

There are three tiers to the Web ADF architecture as shown in the following diagram. The first tier is the view, or client tier, which is composed of the Web controls; the bottom of the stack is the GIS business objects tier, or model tier 2; and in between these are the model tier 1 objects that mediate between the view tier and the GIS business objects. "Model" in the diagram refers to model in the Model-View-Controller (MVC) pattern. The ellipses (...) represents the presence of other similar objects.

Controls

The controls are the first tier, and they cover the view/controller part of the MVC architecture. Controls are in both the view and controller because they not only interact with and render output to the client, but they can also affect application flow during the phases of the request life cycle. The Javadoc for the controls can be found in the package com.esri.adf.web.faces.component.

Data objects

The tier below the controls is the first tier of the model in the MVC architecture; these are the data objects that work directly with the Web controls. These objects usually connect to business objects in other tiers but are not required to. The controlling object at this tier is  WebContext, which not only controls connections to resources (data sources) but also coordinates state between all the other objects in this tier. For that reason, all the other objects are registered as attributes on the context. By being attributes on the context and implementing an interface that will be covered later, they are notified about changes in application state as well as custom phases of the request life cycle provided by the Web ADF.

Additional objects

Other objects in this tier, such as WebMap and WebGeocode, contain information about the control they represent. For example, in the Javadoc for WebMap, there are properties for dots per inch (DPI) of the output image, the height and width of the image, and various other attributes of the rendered map. There are also methods for working with the map, such as centerAt and getCurrentExtent. You can use these methods to obtain functionality without having to work against the server object directly. Similar properties and methods can be found on the other objects in this tier. The Javadoc for these objects is in the com.esri.adf.web.data package.
This package also contains the interfaces and base classes for model tier 2. These objects and interfaces, such as GISResource and MapFunctionality, are not tied to a presentation tier; instead, they are closely tied to GIS data and analysis. There are two parent objects in this tier that are crucial to the Web ADF: GISResource and GISFunctionality. GISResource is a data source that the Web ADF uses for display or analysis, and GISFunctionality is used to expose GIS and mapping functionality for a particular GISResource. For example, the Web ADF has AGSMapResource, which is the concrete implementation of GISResource to work with an ArcGIS Server Map Server data source. This resource makes the connection to the server and is used by the functionalities, such as AGSMapFunctionality, to make calls to the server. There must be a child of GISResource for every data source used in the application. Out of the box, the Web ADF has resources for the following:
  • ArcGIS Server using the Server application programming interface (API)
  • ArcGIS Server using Web services
  • ArcIMS Server using the Java Connector
  • Web Map Service (WMS) servers
For a resource to work with the Web ADF, it must be associated with the context. Since the context is the controlling object for the other data objects of the controls, it coordinates pulling information from the appropriate resources as well as updating the controls.
The GISFunctionality interface is implemented by any class that exposes functionality for a particular GISResource. There are several subinterfaces that come out of the box for shared or common functionality, such as GeocodeFunctionality for working with geocoders, or TocFunctionality for creating a list of layers in a table of contents. For a data source to expose a functionality, there must be a concrete class. Certain data sources don't support certain functionalities. For example, there is no geocode functionality for a WMS server.


See Also:

Introduction to the Web ADF