Developing with ArcGIS Server: An overview


As you learn and use ArcGIS Server, you'll probably reach the point where you want to build or customize an application outside of Manager. For example, you might need to add your own code to a Web application, deploy an EJB application, or create a Web service for use by other applications. The Eclipse platform is the supported development environment for building customized applications with ArcGIS Server for the Java framework. Sun Java Studio Creator is also a supported development environment for building custom ArcGIS Web Applications. The Web ADF gives you Eclipse and Creator plugins and tools to simplify the ArcGIS Server development experience.

What's an ADF?

ADF stands for Application Developer Framework. ArcGIS Server comes with two ADFs: the Web ADF and the Enterprise ADF. The ADFs are not applications; rather, they are sets of developer tools that you can use within standard Java IDEs such as Eclipse and Sun Java Studio Creator. When you install the ADFs, you will find that there are Eclipse and Sun Java Studio Creator plugins for each environment respectively, and a help system that guides the user through the plugin configuration process for each.

The ADFs contain templates that you can use to create applications without writing code. You can see these templates in the New Project dialog when you open Eclipse or Sun Java Studio Creator.

The ADFs also include controls such as maps and toolbars, which you can drag and drop within the Creator IDE to design a GIS application.

For advanced applications, you can use the ADF libraries to fully automate the process of connecting to servers and performing GIS tasks. When you create an application from a template, some of these libraries are referenced for you; otherwise, you'll need to add the references yourself. All of the ADF package names are prefixed with com.esri.arcgis.adf.

The ADFlibraries provide simple classes for common GIS functionality such as map navigation and query. These are referred to as convenience classes because they reduce the amount of code required to program a GIS operation. For example, a map navigation operation that takes dozens of lines of ArcObjects code to automate might only require one or two lines of code using a convenience class. For this reason, it's worth the effort to familiarize yourself with the ADFs and their class libraries.

What can I develop with ArcGIS Server?

When you install the ADFs, you get developer tools that allow you to access the server from four types of clients:

The following sections provide overviews of what's available for developers of these applications and services.

Web applications

Through the Eclipse and Creator plugins, developers can quickly build and customize Web applications. Both development tools will generate Web Application templates that can be extended by adding custom "tasks", using the Web Controls and Web Services APIs that come with the ADFs. With Creator, you can drag and drop the JSF web controls, such as a Map, a Table of Contents, and a Toolbar, from the ArcGIS tool pallete that comes with the Creator plugin onto a JSF page canvas and visually design rich ArcGIS Web applications. The IDE provides the property sheets for setting properties on those controls for further customization. The Eclipse plugin also features a complete ArcGIS Server Java Help System for developers, fully integrated into the Eclipse IDE.

If any part of this process seems unfamiliar to you, you should probably take a break from learning about ArcGIS Server and spend some time learning a little more about Java Enterprise Edition (Java EE), JSF technology, Sun Java Studio Creator and the tutorials that accompany it, and the Eclipse platform and the Web Tools Project Eclipse plugin. The Developer Help assumes that you are already familiar with this development environment and understand many of these technologies.

Starting with the Web Mapping Application

The Web ADF comes with the Web Mapping Application which is a template in the Eclipse and Creator plugins. 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 out of the box 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 Creator without the use of a template or an application previously created in Manager. As you design your application, you can make use the ADF's Web controls that are added to the Creator JSF Tool Pallete. You can drag and drop the controls onto your JSP page, set their properties, and write code to respond to the control's events or connect them with other controls on your page.

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 new multi-service architecture allows you to transparently overlay map services.

Each type of service that the Web ADF supports has its own programming framework, or 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 framework 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.

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. It also helps in application performance, as web graphics are added to the map at the web tier, rather than requiring a round trip to the server to have the SOC process add the graphic.

Extending the Web ADF

The controls, tasks, and data sources supported by the Web ADF are sufficient for many applications; however, the ADF is flexible enough to be extended through customized tools, commands, tasks, and data sources.

The Navigation Task 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 Plan Old Java Object (POJO) which you add to your faces-config.xml for your application. You can then configure each tool and command to execute code in that POJO using standard JSF expression laguage.

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 Task framework in the Web Controls library. You can use the same framework to develop your own tasks.

The Web ADF supports the display and query of multiple types of services, such as ArcGIS Server services, ArcIMS services, WMS services, and ArcWeb 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 (ArcGIS Server for the Java Platform only)

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.

Web services

Web services have no user interface; they accomplish a focused task on the server and send the result back to the client application. Web services are invoked and consumed programmatically, from either Web or desktop client applications. The application that uses the Web service does not have to be a GIS application, but it may require some piece of GIS functionality that only the server can provide. For example, a bank's Web site may have a feature that displays a list of the three nearest branches when you type in your address. If the machine hosting the application doesn't have any GIS software installed, a Web service could request the information from a server equipped to handle the GIS analysis of geocoding your address and finding the nearest branches.

Using Eclipse and the Web ADF, you can develop Web services that access any type of service. For example, in the bank locator application, the Web service might use an ArcIMS service to get the location of the nearest branches. An appropriately-configured ArcGIS Server GIS service could also do the job.

Since Web services are designed to be consumed programmatically, you'll need to work with the developer APIs packaged with the ADF and the Eclipse plugins. In Eclipse, there is a project type called ArcGIS Web Services Client project that generates a rich client application that can be used as a template. The Developer Help within the Eclipse plugin contains additional information to assist you creating a custom application Web service.

Desktop client applications

You can use the ADF to make connections to remote services from Java SE-based desktop applications. In some cases, you may want to provide a client with the rich user interface of a desktop application, while sending some of the GIS work to a server.

The ADF contains a server library (the package name is com.esri.arcgis.server) that you can use to connect to a GIS server or an ArcIMS server when building a desktop application. The Developer Help contains instructions and samples for accessing various types of servers from a desktop application.

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) website.

ArcGIS Server Developer Help

You can launch Developer Help standalone or from within Eclipse.

To launch Developer Help as standalone:

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

To open Developer Help within Eclipse (after the plugins have been installed):

  1. From the Help menu, click Welcome.
  2. When the Welcome page appears, click the Globe icon.

Library reference (component help)

The JavaDoc 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.

EDN

The ESRI Developer Network (EDN) website at http://edn.esri.com/java contains the most up-to-date versions of the developer help and library reference.