Developing Web Applications with the Web ADF  

What is the Web Application Developer Framework?



The ArcGIS Web Application Developer Framework (ADF) for the Microsoft .NET Framework enables you to integrate GIS data and capabilities into your Web applications.  The ADF includes a set of Web controls, classes, frameworks and APIs that you’ll use to build your Web applications.   To get started, you can use Manager, an administrative Web application included with ArcGIS Server and ArcIMS, to step through a comprehensive Web application designer to generate a predesigned Web site.  Alternatively, you can start building your Web application in Visual Studio with the Web Mapping Application template, which offers basic map display, navigation, and interactive capabilities.    You can also use the Web controls directly to create a Web site from scratch or develop your own specialized application in a style that conforms to your existing Web site.

The diagram below highlights the primary components and their basic relationships in the Web ADF.    There are five distinct sections to consider: Web controls, Web ADF JavaScript Library, Task framework, Common Data Source API, and Web ADF graphics and core classes.  All sections work in conjunction with one another.  Note that most of the Web ADF components reside solely on the Web server.  At runtime some client-side support content, such as Web ADF JavaScript libraries, will be loaded by the browser.  A set of data sources supported out-of-the-box by the Web ADF are included for reference, but are not required for the Web ADF to be utilized.  Depending on the data source, Web ADF JavaScript may be able to take advantage of browser technologies to interact directly with data source content, such as accessing a map image available via a public virtual directory.  External data sources supported by the Web ADF out-of-the-box are included in gray at the bottom of the diagram.   These data sources are not installed by the Web ADF and are only included to show the relationships with Web ADF components.  In general, the Web ADF does not require the use of a specific data source.  It can be installed and utilized on its own.      



A set of assemblies are included with the Web ADF which contain tangible components associated with each section.  The following diagram highlights the standard nomenclature for Web ADF assemblies that will be discussed in this help system.


Web Controls


The Web ADF includes a set of AJAX-enabled Web controls built on ASP.NET AJAX technologies.  The Web controls utilize a set of JavaScript libraries, termed the Web ADF JavaScript Library, to process asynchronous interaction between browser and Web application components as well as remote resources.  The Web ADF JavaScript Library provides a public API for Web ADF developers to enhance Web applications by leveraging browser capabilities. 
Web ADF controls support two AJAX patterns: the ASP.NET 2.0 callback pattern and the ASP.NET AJAX partial postback pattern.   State between the client browser and the Web application on the server is maintained using Web ADF CallbackResults.  Callback results can be explicitly created and managed and are designed to processed by Web ADF JavaScript to update browser content dynamically.   

Web ADF controls are also designed to support working with multiple data sources at the same time in the same Web application.  A set of controls termed resource managers broker interaction between Web controls and data sources via the Common Data Source API.   Resources can consolidated for display (for example, within a Map) and utilized for queries and spatial operations.  

Web ADF JavaScript Library            

The Web ADF includes a public JavaScript API packaged in a JavaScript Library.  The Web ADF JavaScript Library is built on the ASP.NET AJAX JavaScript Library and provides a comprehensive client-side framework which can be used to interact with Web ADF controls and components in a scriptable environment.   Web ADF JavaScript is designed to enhance Web ADF applications by leveraging browser technologies to support client-server synchronization and pure browser interactivity.   The library is available for use once a Web ADF control resides in the page.  It is not designed to be used outside of the Web ADF.


Task Framework

The Web ADF Task Framework is an extensible architecture by which a developer can integrate and deploy custom functionality as "Web tasks" within a Web ADF application.  In general, a "Web task" is a Web control that encapsulates a set of related actions to generate results.  It is a modular component that can be distributed and "plugged into" Web ADF applications via Visual Studio or the ArcGIS Manager application.   The task framework provides the ability to effectively integrate a custom Web task into the Web ADF and Manager.  Task framework interfaces and classes are included in the ESRI.ArcGIS.ADF.Web.UI.WebControls.dll assembly.  Implementations of the task framework are included out-of-the-box with the Web ADF as task controls in the ESRI.ArcGIS.ADF.Tasks.dll and ESRI.ArcGIS.ADF.ArcGISServer.Editor.dll (EditorTask control only) assemblies.   

Common Data Source API 

The Web ADF is designed to support data from multiple sources, including ArcGIS Server, ArcIMS, and Microsoft Bing Maps services.   The multi-source architecture allows you to integrate and interact with data from different sources at the same time, in the same application.   To accomplish this, the Web ADF needs a common framework in which data sources can be integrated with Web ADF components.  This framework is the Common Data Source API, or in short, the Common API. 

The Common API consists of a set of classes and interfaces in the ESRI.ArcGIS.ADF.Web.DataSources.dll assembly.   These classes and interfaces make up the generic framework that Web ADF controls use to interact with different data sources in a common way (thus "Common" API).   To utilize a data source as a resource within the Web ADF, the data source must provide an implementation of the Common API generic framework.  The capabilities of the data source will dictate the breadth of implementation.  A set of data sources are supported out-of-the-box including ArcGIS Server, ArcIMS, Microsoft Bing Maps, ArcWeb, OGC\WMS, and Web ADF graphics datasets.   Each Common API implementation is contained within a separate assembly included with the Web ADF.   

Some data sources are built on an explicit programming interface used in the Common API implementation.  These are known as data source specific APIs.  For example, the Common API implementation of ArcGIS Server uses components in the ArcGIS Server library ESRI.ArcGIS.ADF.ArcGISServer.dll.  This library leverages the ArcGIS Server SOAP API to work with ArcGIS Server services via a Local or Internet connection.  Note, data source specific APIs can be utilized on their own, without Web ADF controls or Common API implementation classes. 

A set of connection libraries are also included with the Web ADF to support Local connections to ArcGIS Server and TCP or HTTP connections to ArcIMS.   

Web ADF Graphics and Core Classes   
  
Different sources of data can be combined and utilized in a common way (Common API) in the Web ADF.  As a result, the Web ADF includes a set of components designed to support and enhance working with multiple resources in the Web-tier.   Most of these components reside in the ESRI.ArcGIS.ADF.Web.dll assembly.  

In general, the Web ADF must support some of the basic capabilities of a data source or service.  For example, it maintains a graphics dataset, which extends an ADO.NET Dataset to include spatial properties.  The graphics dataset can contain a collection of Web ADF graphics layers which enhance the ADO.NET DataTable and emulate feature class properties.  The Web ADF includes a set of geometry types, renderers and symbols to manage and display graphic elements in Web ADF graphics layers.  Since Web ADF graphics capabilities are managed in the Web-tier and an Common API implementation is provided, they can be integrated and utilized as map resources.   Web ADF graphics provide a pure Web ADF dataset type to manage selected features, dynamic data, and custom feature data sources.          

Components of the Web ADF rely on the Web ADF graphics and core classes to do work and interact with one another.  The Map control needs to maintain a spatial reference and define display settings for a map resource to generate a map image.  A task control may use task results to display graphics on a map with Web ADF graphics layers.   A developer may use the generic interfaces of the Common API to execute a query using a spatial filter composed of Web ADF geometry.  In addition, a set of Converter classes are included in the Web ADF to provide convenient methods for converting between client, Web ADF and data source specific data types.   In a true consolidation environment such as the Web ADF, managing the translation of information between application tiers and source types is essential to maximizing usability.