Consuming and extending ArcObjects


The functionality of ArcObjects can be accessed using four APIs: COM, .NET, Java, and C++. The choice of which API to use is not a simple one and will depend on a number of factors, including the ArcGIS product that you are developing with, the end user functionality that you are developing, and your development experience with particular languages. ArcGIS Desktop supports the following APIs:
  • COM—Any COM-compliant language (for example, Visual Basic, Visual C++) can be used with this API.
  • .NET—Visual Basic .NET and C# are supported by this API.
When working with ArcObjects, developers can consume functionality exposed by ArcObjects or extend the functionality of ArcObjects with their own components. When referring to these APIs, there are differences with respect to consuming and extending the ArcObjects architecture.

In this topic


Consuming the API

The APIs support consuming the functionality of the ArcObjects components; however, not all interfaces implemented by ArcObjects are supported on all platforms. In some cases, interfaces make use of data types that are not compatible with an API. In situations like this, an alternative implementation of the interface is provided for developers to use. The naming convention of a "GEN" postfix on the interface name is used to signify this kind of interface; IFoo would have an IFooGEN interface. This alternative interface is usable by all APIs; however, if the nongeneric interface is supported by the API, it is possible to continue to use the API-specific interface.
Since ArcObjects are developed in C++, there are some cases in which data types compatible with C++ have been used for performance reasons. These performance considerations mostly affect the internals of ArcObjects; hence, using one of the generic interfaces should not adversely affect performance or your ArcObjects developments.

Extending the API

Extending ArcObjects entails creating your own objects and adding them to the ArcObjects architecture. ArcObjects is written to be extensible in almost all areas. Support for extending the architecture varies among the APIs and, in some cases, varies among languages of an API.
The majority of differences between the API's support for ArcObjects revolves around data types. All APIs fully support the automation-compliant data types shown below. Differences occur with data types that are not OLE automation compliant.
The COM API provides the most possibilities for extending the system.
The .NET API supports extending ArcObjects fully, with the one exception being interfaces that make use of non-OLE automation-compliant data types (see the table below for a complete list of all OLE automation-compliant data types).
OLE automation data types
The ArcGIS Desktop applications are rich, professional GIS applications with a lot of functionality, but if viewed simply, the applications can be broken down into a series of toolbars, along with a table of contents (TOC) and map viewing area. The desktop applications are all extended by adding new commands and tools. In a similar way, developers can build applications with rich functionality using any of the four ArcGIS Engine APIs.
The COM and .NET APIs are only supported on the Microsoft Windows platform.