Creating .NET Web applications

If you want to build Web applications that leverage ASP.NET, or if your requirements exceed the capabilities of the JavaScript APIs, consider using the ArcGIS Server Web Application Developer Framework (ADF). The Web ADF provides tools and templates for developing .NET Web applications within Microsoft Visual Studio.

Once you install the Web ADF, you'll notice some of the following new things in Visual Studio:

If you've ever worked with any of Microsoft's integrated development environments before, you'll find adding GIS functionality to Web applications in Visual Studio to be much the same—you drag controls from a toolbox onto a form (in this case, a Web form), set some control properties, and programmatically define how the control works by writing code that responds to events such as mouse clicks. With the Web ADF, in addition to adding text boxes and buttons, you can add items such as a map and a table of contents directly to your Web form. The Developer Help assumes that you are already familiar with this development environment and understand Web forms, Web controls, assemblies, namespaces, and so on.

Starting with the Web Mapping Application

The Web ADF comes with the Web Mapping Application, which is a Visual Studio template. The Web Mapping Application has the appearance of an application built with Manager; however, you do not have to go through the process of creating the application in Manager. You can deploy the Web Mapping Application as-is without writing any additional code or use it as a starting point for creating a custom application. In some cases, you may want to use the code or files included with the Web Mapping Application as a guide for your own projects.

Creating a new Web application

You can use the tools provided with the Web ADF to build a new Web application in Visual Studio without the use of a template or an application previously created in Manager. As you design your application, you can use the Web ADF controls that are added to the Visual Studio Toolbox. You can drag the controls onto your Web forms, set their properties, and write code to respond to the controls' events or connect them with other controls on your form.

If you don't need to use the Web controls, or you want to go beyond the default functionality they provide, you can use the libraries provided with ArcGIS Server to programmatically connect to a server and work with the services running on it. Each of the libraries has an object model diagram that can help you visualize the classes in the library and their relationships. You can find the object model diagrams in the library reference section of the Developer Help.

Leveraging the Web ADF

The Web ADF is architected to support connections to multiple types of GIS services in Web applications and Web services. These include the following:

You can not only access multiple types of GIS servers but also combine the GIS services running on those servers into one map. The Web ADF supports adding multiple map services to a single map display, allowing you to seamlessly integrate map services running on the same server or different servers of varying types. For example, you can combine a map service running on an ArcIMS server with one running on ArcGIS Server. This multiservice architecture allows you to transparently overlay map services.

Each type of service that the Web ADF supports has its own API. This means that if a map contains several different types of services, you may need to work with several APIs. For example, if your map combines an ArcGIS Server service and an ArcIMS service, you may need to program with both ArcObjects and the ArcIMS API. Fortunately, the ADF provides a common API for navigating and querying a map containing multiple service types. This means that for operations involving the entire map—such as zooming to a specific extent—you can write the code using the Web ADF convenience classes instead of writing the code in the API of each service type.

If you want to develop advanced features with a specific service type, the ADF provides a way to access the service's API in a .NET environment. For example, you can use the ArcIMS API to work with ArcIMS services using .NET classes. The Developer Help contains information about programming with multiple service types and how to access the APIs for each one.

In addition to the service types listed above, the Web ADF supports adding graphics to a map. You can associate attributes with the graphics using standard .NET data tables. In many cases, using a Web ADF graphics layer provides a lightweight alternative to other more advanced means of storing data, such as programmatically creating a feature class.

Extending the Web ADF

The Web ADF is designed to be flexible so that you can customize the following:

The Toolbar control included with the ADF contains a default set of tools and commands used for map navigation and query. You can write code for your own tools and commands and add them to a toolbar. A common way to do this is to write the custom code in a class library, which you add to your Visual Studio project. You can then configure each tool and command to execute code in the class library.

The Web ADF includes a number of out-of-the-box tasks that you can add to your applications. These include tasks for query, network analysis, and editing. These tasks are all built from a common framework in the Web Controls library. You can use the same framework to develop your own task.

Learn more about working with tasks.

The Web ADF supports the display and query of multiple types of services, such as ArcGIS Server services, ArcIMS services, and WMS services. In the context of the ADF, a service is a data source. The ADF contains a framework for developing support for your own types of data sources in addition to those listed above.

Getting help

When you install the Web ADF, Developer Help is automatically installed. You can open Developer Help from the desktop or within Visual Studio.

To access Developer Help from the desktop, follow these steps:

  1. Navigate to Start > All Programs > ArcGIS > Developer Help > Server Help for .NET.
  2. Click Creating ArcGIS Server solutions.

To open Developer Help within Visual Studio, do the following:

  1. Click the Help menu > Contents.
  2. When the Help table of contents appears, click ESRI Developer Resources.
  3. Click Creating ArcGIS Server solutions.

The library reference

The library reference includes brief descriptions of each class and member in the Web ADF. Some classes and members have extra remarks and code samples. Additionally, if an assembly has an object model diagram, you can find it in the library reference.

You can get to the library reference by following the steps above to open Developer Help. Once you click Creating ArcGIS Server solutions, you will see the Library reference node in the table of contents.


11/18/2013