Developing Web Applications with the Web ADF - Working with resources and functionalities  

Access a data source specific API

In a basic sense, the Web ADF simply provides you with a set of objects to program with. You can use these objects to build desktop and Web applications that access a single resource, such as an ArcIMS service or a data frame within an ArcGIS server object, or multiple resources at the same time. The Web controls and convenience classes expose a set of coarse-grained properties, methods, and events which allow you to interact with common functionality in different resource types. Each type provides a specific implementation to access fine-grained functionality provided in data source specific APIs, such as working with ArcObjects via an ArcGIS Server object or ArcXML via an ArcIMS service.  Once you have access to a data source specific business object, you can access a greater range of data source specific capabilities.

The basic architecture of the Web ADF is illustrated in the following object model diagram.

In general, one or more Web ADF controls can be used within an ASP.NET Web page. Each control works with a single resource manager, either directly or through another control. The resource manager manages access to one or more resources depending on the type of manager.  For example, the MapResourceManager manages resources that can generate mapped data, each known as a MapResource.  
When a control accesses a resource, it generates a collection of functionalities, depending on the control type.  For example, a Map control generates a MapFunctionality for each MapResource in a MapResourceManager.  MapFunctionality dictates how the Map control will interact with the MapResource to generate a map.  

The data source type dictates the resource and functionality implementation. The business objects for a data source can be accessed via a functionality or a resource. In essence, the Web controls work with resources to create functionalities. Functionalities are classes the Web control can use to perform an action. 
The data source type dictates the capabilities of a resource (such as the ability to create a map image). The resource manager type dictates the capabilities of a resource it needs to utilize (for example, a MapResourceManager needs to access resources that can create a map). As a result, the Web ADF has a Common API which defines a abstract contract to marshal interaction between the multi-source Web controls and data source specific business objects.  More specifically, these contracts are interfaces, such as IGISResource (Resources), IGISFunctionality (Functionalities), and IGISDataSource (DataSources).  Each data source type implements these interfaces, and those implementations are utilized by the Web controls to perform tasks.  

Each data source has a specific API which defines how you can work with it.  ArcGIS Server has two APIs, SOAP and ArcObjects.  The ArcIMS API included with the Web ADF manages ArcXML in a library of .NET objects.  ArcWeb Services maintain a SOAP API via a Web service endpoint.  In each case, the data source API can be used alone, without the Web ADF controls and Common API.  However, to plug into the Web ADF, each data source must implement the Common API interfaces.  These implementations are then utilized by the Web controls to perform actions.

In general, the Web ADF works with data sources in a stateless manner.   State is not maintained by the data source, instead the data source implementation classes and business objects manage state for you.  Each IGISDataSource, IGISResource, and IGISFunctionality may expose data source specific business objects which can be modified.  The modifications are maintained in-session by the Web ADF. 

For example, a MapResourceManager stores MapResourceInfos that reference resources of type MapResource. A Map knows how to work with a resource of type IMapResource, which implements IGISResource. Each resource in a MapResourceManager is associated with a data source specific MapResource which implements IMapResource.  The Map control will create one data source specific MapFunctionality, which implements IMapFunctionality, to interact with the data source.  By default, state is managed in properties and data source business objects available via the MapFunctionality.