Professional Documents
Culture Documents
in ArcGIS 10
a new perspective
July 2010
This technical article describes and explains the changes in the various desktop SDKs at ArcGIS 10 that will impact software development. It doesnt focus on the new features of the APIs but provides key information of the lower level changes to help software implementation.
Architectural changes
Autonomous Nature At version 10 ArcGIS Desktop and ArcGIS Engine can be installed independently. This means that customisation must target either Desktop or Engine. In addition, ESRI have also started to prepare for side by side installation where the ArcGIS product will be installed to an ArcGIS 10 specified folder. On deployment this is completed with a new tool: ESRIRegasm.exe - this takes the place of Regasm.exe (for .NET) and allows you to target the product and version of ArcGIS. Please note, that will these structural changes are in place side by side installs of different core product versions is not yet possible. Policy files removed Due to the separation changes between ArcGIS Desktop and Engine the policy files that were installed into the Global Assembly Cache are no longer installed. These allowed customizations that targeted lower version of ArcGIS Desktop work with newer versions; the policy files redirected calls to previous ArcObjects assemblies to the newer versions. This means that all existing .Net customizations must be recompiled for this release. Note: It is not yet clear whether services packs or future versions of ArcGIS Desktop will require recompiling of Custom Components/Extensions. Add-Ins ESRI has introduced the concept of Add-Ins. Add-Ins are similar to ArcGIS Extensions and Custom commands and tools but they allow registration of these customizations by file as opposed to registry settings. This means that they are easier to deploy. At this release they have not replaced the existing methodology of COM component registration. Therefore, existing .NET extensions and customizations can be migrated to ArcGIS 10. Add-Ins can be authored by .NET or Java along with XML. The XML describes the customization whereas the .NET or Java classes provide the custom behaviour. The SDK includes wizards that integrate with Visual Studio (all versions including free express editions) and Eclipse to aid development.
There is full interactivity between Add-Ins and components created by the traditional COM methods. The Add-In component has an ID value which is used instead of the GUID or ProgIDs in the COM based components. Note: Although deployment of these Add-Ins are non trivial when using xcopy to distribute the customizations, distributing them by Installation script is not. The utility that ESRI recommend to register the files with the application works on a per-user basis, as such an alternative methodology is required for producing "product" based deliverables. COM As stated above COM registration can still be used in extended ArcObjects. The difference in this release is the COM registration and Category Registration is completed by using the utility ESRIRegasm.exe. For existing custom extensions/ components see details below for migration. When creating new components in the Visual Studio IDE and when using the templates provided (e.g. the ArcGIS Project template) the additional steps to register the assemblies are automatically placed within the project file. Java - New VisualBean Mode Architecture In prior releases, the ArcGIS Java-COM interop relied upon COM marshalling to synchronize access to ArcObjects hosted in the ArcGIS STA (single thread apartment) thread for Visual Beans applications. At the release of ArcGIS 10, the internal architecture has been revamped to ensure thread affinity and reentrancy requirements of ArcObjects in multi-threaded visual Java applications without relying upon the services of the COM runtime (in particular, COM marshalling). In the new architecture, Java threads do not enter the process wide COM multi threaded apartment (MTA). Instead, ArcObject creation and method invocation is intercepted in the Java tier and performed in a dedicated STA thread created by the Java interop to house ArcObjects. The advantage of this new architecture is vastly improved performance for fine-grained methods calls on ArcObjects, and ability to create and use ArcObjects that did not have marshalling related infrastructure (i.e. proxy-stub DLLs for components that did not rely upon type library marshalling).
Deprecation of Components
ESRI.ArcGIS.Adf Namespace The ESRI.ArcGIS.Adf namespace has been replaced by ESRI.ArcGIS.Adf.Local. This assembly contained various utility type objects for .Net development. This is to take advantage of enhancements in .NET. Most recent ArcGIS Desktop customizations have made use of the original assembly by default so they would need to migrate. VBA After version 10 of ArcGIS VBA will be deprecated. At ArcGIS VBA is not installed by default. The installation can be called from the main dialog shown when inserting the ArcGIS Desktop DVD - "ArcGIS Desktop VBA resources for developers". This installs the VBA resources as well as VBA for ArcGIS Desktop. VBA is now registered and licensed as an Extension. When registering over the internet the user has to select "Other Extensions" as it is not listed by default and enter the name and separate licence number for the extension. VB6 Microsoft support for VB6 was withdrawn in 2008. At ArcGIS 10 VB6 will not be supported and the SDK for VB6 will not be installable. Refer to the Migrating VB6 Desktop Customisations section for further information.
Deployment using WIX The Windows Installer XML (WIX) is a toolset that builds Windows installation packages from XML source code. The toolset supports a command line environment that developers may integrate into their build processes to build MSI and MSM setup packages. Testing has been conducted around deployment of ArcGIS extensions using Windows Installer XML. It is possible to follow the above stated methodology although the installer class can be removed from the process and the ESRIRegAsm. exe can be called directly from the installation wxs file. The steps are as follows: 1. If this is a migration of an old project remove all com and category registration from the wxs scripts. 2. Remove any installer classes unless they are needed for other reasons. 3. Add a reference to WixUtilExtension 4. Add the *.dll and *.tlb as a component to the install. 5. For each com component add the following lines to the Product tag: <CustomAction Id="InvokeESRIRegAsm" Property="InvokeESRIRegAsm" Value=""C:\Program Files\Common Files\ArcGIS\bin\ESRIRegAsm.exe" "[ProgramFilesFolder]<pathtoinstalleddll>" /p Desktop /v 10.0 /s" Execute="immediate" /> <CustomAction Id="InvokeESRIRegAsm" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="deferred" Return="check" Impersonate="no" /> <CustomAction Id="InvokeESRIRegAsm_CmdUninstall" Property="InvokeESRIRegAsm_Uninstall" Value=""C:\Program Files\Common Files\ArcGIS\bin\ESRIRegAsm.exe" "[ProgramFilesFolder]<pathtoinstalle ddll>" /p Desktop /v 10.0 /s /u" Execute="immediate" /> <CustomAction Id="InvokeESRIRegAsm_Uninstall" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="deferred" Return="check" Impersonate="no" /> 6. For each com component add the following lines to the InstallExecuteSequence: <Custom Action ="InvokeESRIRegAsm_Cmd" After="StartServices">$<component ID>>2</Custom> <Custom Action ="InvokeESRIRegAsm" After="InvokeESRIRegAsm_ CmdCore">$<componentID>>2</Custom> <Custom Action ="InvokeESRIRegAsm_CmdUninstall" After="MsiUnpublishAssemb lies">$<componentID>=2</Custom> <Custom Action ="InvokeESRIRegAsm_Uninstall" After="InvokeESRIRegAsm_ CmdUninstall">$<componentID>=2</Custom>
ESRI (UK ) Ltd Millennium House 65 Walton Street Aylesbury Buckinghamshire HP21 7QG T 01296 745500 F 01296 745544 E info@esriuk.com www.esriuk.com
2006 2010 ESRI (UK) Ltd and its third party licensors. All rights reserved. The ESRI globe and ESRI products, services and trademarks mentioned are trademarks of Environmental Systems Research Institute, Inc. Other companies and products mentioned herein are the property of their respective trademark owners.