Developing with ArcGIS Server: An Overview

Release 9.3.1 E-mail This Topic Printable Version Give Us Feedback

As you learn and use ArcGIS Server, you'll probably reach the point where you want to build or customize an application outside Manager. ArcGIS Server offers several programming frameworks, or APIs, that you can use to create Web applications and services. The API that you choose depends on your experience and skill level, as well as the requirements of the application.

Following is a summary of the ways you can work with the server accompanied by the recommended skill level (beginner, intermediate, and advanced) for each one.

Building JavaScript applications (beginner - intermediate)

If you want to embed lightweight mapping functionality into a Web application, or if you're just getting started with ArcGIS Server development, consider using the ArcGIS JavaScript API. It's free to use and deploy applications built with this API. All you need is an ArcGIS Server available whose maps and tools you can use in your application. To get started, see the ArcGIS JavaScript API home page.

The ArcGIS JavaScript API is powered by a back-end REST API that is able to retrieve information statelessly from the server. When you run the application, the code runs in the browser instead of having to run on the server. This provides a quick and clean client experience. The ArcGIS JavaScript API is built on top of the Dojo JavaScript toolkit, so you don't have to worry about accommodating browser idiosyncrasies in your code; the framework handles it for you.

You can use the ArcGIS JavaScript API even if you have little or no coding experience. Copy and paste the example code into your HTML pages to add mapping functionality.

When writing applications with the ArcGIS JavaScript API, you'll need to provide the URLs to maps and other resources on your server. You can use the ArcGIS Services Directory to find out these Web addresses. For examples, see the Services Directory Help page at http://<server name>/<instance name>/SDK/REST/servicesdirectory.html.

ArcGIS Server also includes extensions for well-known online mapping APIs for JavaScript:

These two extensions can be useful if you're already familiar with the Bing Maps or Google Maps APIs or you want to use the basemaps provided by these services. If you decide to use the ArcGIS JavaScript API, you can use the basemaps provided by ArcGIS Online.

Building Flex applications (beginner - intermediate)

Another way to include mapping, geocoding, and geoprocessing functionality in your Web applications is to use the ArcGIS API for Flex. This API gives you access to services published with ArcGIS Server 9.3 in applications that use the Adobe Flex framework. Like the JavaScript API, the Flex API works with the REST endpoints of the services.

To get started building GIS-enabled Flex applications, visit the ArcGIS API for Flex page on the ArcGIS Server Resource Center. Here you can cut and paste code from the online samples, read detailed conceptual help, or browse entries other developers have submitted to the Code Gallery.

Building Silverlight applications (beginner - intermediate)

Similar to the ArcGIS API for Flex, the ArcGIS API for Microsoft Silverlight allows you to build applications that perform mapping, queries, geocoding, and geoprocessing. This API works with Microsoft Silverlight to provide a rich user experience on the Web. To learn more about the ArcGIS API for Silverlight, visit its home page at http://resources.esri.com/arcgisserver/apis/silverlight/.

Building Java Web applications (beginner - advanced)

If you want to build Web applications that leverage Java EE, 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 the Java EE environment.

Once you install the Web ADF, you can access the developer plugins for Eclipse and NetBeans which offer you:

The supported developer IDE's include Eclipse and NetBeans. These are excellent productivity tools for you to extend your Web Mapping Application (WMA).. With the Web ADF, in addition to adding text boxes and buttons, you can add things such as a map and a table of contents directly to your web application. The Developer Help assumes that you are already familiar with this development environment and understand standard Java EE JSF controls.

Starting with the Web Mapping Application

The Web ADF comes with the WMA which is a ready to use application template. The Web Mapping Application can be easily created from the Manager application or by using one of the IDE plugins You can run the WMA directly from Manager and deploy it "as is" without writing any additional code, or use it as a starting point for creating a custom application by importing into your developer IDE. 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 a Java EE developer IDE without the use of a template or an application previously created in Manager. If you use Eclipse or NetBeans with the plugins installed, you can make use the ADF's Web controls by adding them to your respective projects classpath.

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:

Not only can you access multiple types of GIS servers, you can 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 an ArcGIS Server. This multi-service 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's 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 the Java environment. For example, you can use the ArcIMS API to work with ArcIMS services using Java 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 also supports adding graphics to a map. 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 things:

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 developer IDE 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.

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 called a data source. The ADF contains a framework for developing support for your own types of data sources in addition to those listed above.

Enterprise applications

The ADF provides out-of-the-box, ready-to-deploy Enterprise JavaBeans (EJBs) that provide coarse-grained, intuitive APIs for server-side mapping, querying, network solving, geocoding, and geoprocessing. These EJBs can be easily configured, generated and packaged using ArcGIS Server Manager. These EJB modules can then be deployed to any standard Java EE application server and consumed by the Web ADF controls or any Java application through JNDI lookup. From configuration to deployment, no programming tasks are required. The APIs exposed by these EJBs have a one to one relationship with the ArcGIS Web Services XML Schemas and APIs.

Developers can also use the Eclipse plugin wizards to generate and deploy ArcGIS EJBs.

Working with the GIS server directly (intermediate - advanced)

The ArcGIS family of products is built on a set of software objects called ArcObjects. The JavaScript APIs and the Web ADF provide higher-level frameworks that allow you to leverage the GIS server without having to worry about what is happening at the ArcObjects level. However, if you require the full power of ArcObjects, you can use the Connection Library included with the Web ADF and ArcGIS Engine to connect directly to the GIS server and work with the fine-grained ArcObjects API. This is how you might build a desktop client application or an application Web service that works with the GIS server.

An alternative to working with ArcObjects is to use the SOAP API. This is an appropriate choice when working with services that have Web access enabled (all ArcGIS Server services have Web access enabled by default). The SOAP API exposes much of the functionality of ArcObjects. You can work with the SOAP API through the Web ADF or through a non-ESRI solution such as the .NET SOAP Toolkit.

Where to get help

The ArcGIS Server Developer Help contains conceptual information, sample applications, and step-by-step scenarios. The library reference contains more detailed help for each class and member, as well as object model diagrams. Updated versions of the latest help can be found on the ESRI Developer Network (EDN) Web site.

ArcGIS Server Developer Help

When you install the Web ADF, Developer Help is automatically installed. You can launch Developer Help from the desktop, from command line on Linux/Solaris or within your supported developer IDE.

To launch Developer Help from the desktop:

  1. Navigate to Start > All Programs > ArcGIS > Developer Help > Server Help for Java.
  2. Click 'Developing Applications'.

To open Developer Help from command line on Linux/Solaris:

On Linux/Solaris, open the Java Developer Help by, as the install owner, running the

To open Developer Help within Eclipse:

  1. From the Help menu, click Help Contents.
  2. When the Help table of contents appears, click 'ArcGIS Server'.
  3. Click 'Developing Applications'.

Library reference (component help)

The library reference includes brief descriptions for each class and member in the Web ADF. Some classes and members have extra remarks and code examples. Additionally, if a package 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 'ArcGIS Server', you will see the 'Reference' node in the table of contents.

ArcGIS Server Resource Center

The ArcGIS Server Resource Center site at http://resources.esri.com/arcgisserver contains the most up-to-date versions of the Developer Help and library reference.

ESRI User Forums

The ESRI User Forums contain an ArcGIS Server discussion area where you can communicate with other developers and provide peer-to-peer support.

ArcGIS Server Development Blog

The ArcGIS Server development team maintains a blog where you can find tips and samples beyond what's included in this help system. Topics include Web ADF development, performance and caching, service packs, upcoming conferences and seminars, and more.

Code galleries and ArcScripts

The ArcGIS Server code galleries and ArcScripts are online resources for you to learn from other developers' code and share your own projects.

The code galleries are available through the ArcGIS Server Resource Center. Below are quick links to the code galleries for each API:

ArcScripts is a similar, older site where developers can exchange tools, samples, and utilities related to ESRI products.

Becoming familiar with the code galleries and ArcScripts can save you much time and effort if someone has already created the tool that you need. And if you've developed something useful, you can contribute it for others to download.