Presentation is loading. Please wait.

Presentation is loading. Please wait.

Advanced ArcObjects Component Development II (C++)

Similar presentations


Presentation on theme: "Advanced ArcObjects Component Development II (C++)"— Presentation transcript:

1 Advanced ArcObjects Component Development II (C++)

2 Advanced ArcObjects Component Development II (C++)
Welcome Instructor introduction Student introductions Name Organization Role in organization Programming experience VB, VC++ (ATL and MFC) Goals and expectations for this class Prerequisites AACD I, VC++, MFC, ATL Advanced ArcObjects Component Development II (C++) Welcome to Advanced ArcObjects Component Development II (C++). This course is designed to teach developers how to work with ArcObjects and VC++ to create advanced ArcGIS™ applications and extensions. It builds on the theories and concepts covered in Advanced ArcObjects Component Development I (AACD I), but in the context of VC++. Also covered are some advanced customizations that require the strength of the VC++ language such as using aggregation to develop custom features. ATL and MFC are used to write various ArcObjects extensions. Advanced ArcObjects Component Development II (AACD II) builds on all of the fundamentals learned in AACD I, and therefore, it is expected that all attendees are familiar with the underlying architecture and development framework of ArcObjects. It also assumes developers are comfortable with Visual Studio and the VC++ development environment; in both client and server-side areas. The course prerequisites are as follows: Completed Advanced ArcObjects Component Development I (AACD I) Understand the ArcObjects development framework Write custom framework components and extensions Understand component categories and application initialization Know resources: OMDs, help system… VC++ programming experience Client and server development (MFC and ATL) C++ and COM theory Advanced ArcObjects Component Development II (C++)

3 Quick questionnaire How many people have:
Written implementations of ICommand or IExtension? Used ArcObjects Online, developer help, OMDs, Exploring AO? Used smart types (smart pointers)? Understand smart types? Used source-sinks for outbound interfaces in VC++? Written ArcObjects-ATL components? Written geodatabase extensions? Used aggregation to write custom features for the geodatabase? Advanced ArcObjects Component Development II (C++)

4 Logistics Daily schedule Facilities Start _______________
Lunch _______________ Finish _______________ Facilities Refreshments and break area Restrooms Telephones and messages Internet access Student ID badges Parking Daily schedule Under normal conditions, the class will begin each morning at 8:30 a.m. and continue until 5:00 p.m. There will be at least one break in the morning and one in the afternoon. You will generally be given one hour for lunch. Facilities Your instructor will provide information regarding the facilities. Internet access Some training facilities provide Internet access for your use during class. ESRI regards Internet access as an essential business resource for classroom demos, exercises, arranging travel, and maintaining contact with your office. Please limit your use of the Internet to business activities only and, as a courtesy to your classmates, refrain from typing or surfing during lecture presentations. Advanced ArcObjects Component Development II (C++)

5 Course materials Books CDs Online course evaluation
Lecture Exercise CDs Course data Online course evaluation Course Identification Number: _______________ Software evaluation enhancement requests to product teams Teaching methods Research indicates that students learn differently. To maximize your learning experience, a variety of methods are used in teaching this course: instructor-led lectures and discussions, demonstrations, computer-based exercises, and review questions. Class materials Your class materials include lecture and exercise course books. These are yours to take home, so feel free to write in them. The class data CD contains all the project files and the data sets you will work with during class. Course evaluation Your feedback improves ESRI’s courses. At the end of the week, please evaluate the following: • Instructor • Course materials • Teaching facilities • Overall course Software evaluation If you have access to a Web-based account during class, you can send comments about the software directly to the product development teams. Your comments directly influence enhancements to ESRI products, so please let us know what you think. Advanced ArcObjects Component Development II (C++)

6 Development directions Geodatabase customization
Course timeline Product review C++/COM review Advanced ATL MFC applications Development directions ATL applications Geodatabase customization Advanced ArcObjects Component Development II (C++)

7 Course objectives Write ArcObjects applications with VC++
Build on concepts introduced in Advanced ArcObjects Component Development I (AACD I) Understand multi-component integration Learn more about the ArcObjects development framework Ask questions and participate in discussions Course objectives In this course, you will write ArcObjects/VC++ applications starting with simple console applications to more complex implementations of ATL components. Most applications focus on the concept of multi-component integration that closely model real-world development scenarios. By the end of the course, you will know how to build a range of VC++/ArcObjects applications. Advanced ArcObjects Component Development II (C++)

8 Enterprise geodatabase
ArcGIS overview Web browser ArcGIS Server ArcInfo ArcIMS Web server ArcEditor ArcView ArcSDE ArcMap ArcCatalog ArcToolbox Workstation Extensions RDBMS server ArcObjects Data Enterprise geodatabase Personal geodatabase ArcGIS is the name used to identify ESRI’s flagship family of GIS products. ArcGIS includes client software, server software, and data components. ArcGIS itself is not a GIS application; rather, it is a system of software products, each servicing a specific need. Software products and applications When someone purchases an ArcGIS system, they license software products which include one or more software applications. Understanding the difference between products and applications is important in understanding how ArcGIS is structured, and how the topics covered in this training class relate to the system as a whole. For example, one group may license the ArcView software product, which includes the ArcMap, ArcCatalog, and ArcToolbox applications. Another group may license the ArcEditor software product, which includes the same three applications. After installing their respective products, both groups would find icons for the ArcMap, ArcCatalog, and ArcToolbox applications in their Start menus; neither would find an ArcView or ArcEditor icon. But upon running the applications, the ArcEditor group would find more useful buttons and menu choices than the ArcView group. All of the desktop products mentioned above are built with ArcObjects. ArcObjects provides the foundation and the development framework required to extend the architecture of each application. Developers can use the internal VBA development environment or write custom components in the form of DLLs to build custom applications on top of these applications. In another example, a group who licenses the ArcSDE software product may install and use the ArcSDE, ArcSDE CAD Client, and ArcSDE for Coverages applications. Coverage Grid Image Shapefile TIN CAD Advanced ArcObjects Component Development II (C++)

9 Modularity and scalability
ArcGIS overview ArcGIS comprises two major categories of software: client and server. Each software application can create, manage, analyze, or serve data stored in one or more formats. Modularity and scalability ArcGIS is both modular and scalable. This means that a small workgroup can deploy an ArcView-based system and manage their data in files. If that workgroup subsequently needs to visualize three-dimensional data, they can add the 3D Analyst extension to their ArcView software. If they grow, they can migrate their data into a multi-user ArcSDE database. If they need to serve their data on the Web, they can add the ArcIMS server component to their system. Integration The ArcGIS system uses common software applications, data formats, and communication methods. For example, a macro written for ArcView can be run in ArcInfo. This macro can read and write data in an ArcSDE geodatabase that is being served on the Web through ArcIMS. A simple data viewer running in a web browser uses the same language, ArcXML, as the ArcEditor software. ArcGIS client software The ArcGIS client software comprises three software products: ArcView, ArcEditor, and ArcInfo. Each of these products includes three common applications: ArcMap, ArcCatalog, and ArcToolbox. These applications are collectively referred to as ArcGIS Desktop which, like ArcGIS, is not a product or application itself, but is a name for a related group of software. The ArcInfo product comprises additional software, collectively termed ArcInfo Workstation. ArcInfo Workstation includes a host of applications, such as Arc, ArcEdit, ArcPlot, Tables, and several analytical extensions. The ArcGIS Desktop applications provide the same core mapping, editing, and analysis functionality when licensed as either the ArcView, ArcEditor, or ArcInfo product. But, while the ArcEditor product includes all of the functionality of ArcView, it adds more tools for advanced data modeling, editing, and analysis. Likewise, ArcInfo includes all of the ArcEditor functionality, plus additional capabilities available only with the ArcInfo license. The core technology that binds ArcView, ArcEditor, and ArcInfo is called ArcObjects. ArcObjects is a collection of COM (component object model) based software objects from which the ArcMap, ArcCatalog, and parts of the ArcToolbox applications are built. You can customize these applications using a common VBA (Visual Basic for Applications) environment. Application developers can also write highly-customized and standalone applications based on the ArcObjects software components. Organizations may employ any combination of ArcView, ArcEditor, and ArcInfo licenses—based on the needs and skills of individual users—while maintaining a common graphical user interface, customization environment, and data storage model. Advanced ArcObjects Component Development II (C++)

10 ArcGIS server software
The ArcGIS server software comprises two software products: ArcSDE and ArcIMS. Each server product contains one primary software application of the same name, plus supplementary applications and optional extensions. The ArcSDE application provides an interface between the other ArcGIS applications and an industry-standard RDBMS (relational database management system) such as IBM DB2, Informix, Microsoft SQL Server, or Oracle. Depending on the platform, ArcSDE can enable an otherwise non-spatial database, such as road networks and satellite images, to store GIS data or it can translate between the native spatial data types of the host RDBMS and a generic format used by other ArcGIS applications. ArcSDE provides support for multi-user editing and sophisticated transaction management through a built-in technology called versioning. ArcSDE is typically employed by organizations with large data holdings and large numbers of concurrent GIS users. The ArcIMS application interfaces between GIS data stored in files and ArcSDE databases, and client applications running on a remote computer over the Internet or an intranet. ArcIMS can serve pre-configured map graphics for simple display, or can stream live GIS data for more advanced display and analysis. ArcIMS also enables remote users to communicate data updates to the ArcIMS administrator for review. Many ArcIMS clients are light-weight applications that run in a web browser; others, like ArcMap, are fully-functional GIS applications. ArcIMS can serve descriptive metadata to both types of client to help them quickly locate the data they need. ArcGIS data formats The native data format for ArcGIS is called the geodatabase. A geodatabase is a relational database that includes spatial data types—in addition to standard data types like numbers, characters, and dates—and a rich set of tools for modeling relationships between GIS data and maintaining its integrity during editing. Two types of geodatabase exist: a personal geodatabase and an enterprise geodatabase. A personal geodatabase is stored in a Microsoft Access-formatted .mdb file and supports individual users and workgroup-sized teams operating on moderate amounts of data. An enterprise geodatabase is hosted in an underlying RDBMS, accessed through ArcSDE, typically runs on a dedicated server computer, and can scale to support numerous users and abundant data. Both geodatabase formats support non-spatial tabular data and vector GIS data. The enterprise geodatabase can also store raster GIS data, and can support concurrent users. ArcGIS client and server applications can interact with other GIS formats, such as ESRI coverages, shapefiles, grids, and TINs, as well as industry-standard images and CAD (computer aided design) files. For more information For more information about ArcGIS, refer to the What_Is_ArcGIS.pdf document stored on the training data CD in the back of your exercise course book. You can either install this document on your hard drive during Exercise 1, or you can access it directly from the CD at any time. Advanced ArcObjects Component Development II (C++)

11 GIS in the enterprise Developer interface ArcSDE & ArcIMS ArcInfo
Data management and distribution ArcSDE & ArcIMS Advanced modeling and analysis ArcInfo Data editing and maintenance Extensions ArcEditor & ArcPad General analysis and visualization ArcView 8 & ArcView 3 The graphic above illustrates the number of users in an enterprise environment performing various GIS tasks with ESRI software. Internet-based map viewing Internet-based mapping, enabled by ArcIMS, can share GIS information with traditionally non-GIS users. Using a standard web browser, people on an intranet or the Internet can display live maps for simple viewing or more sophisticated analysis. Desktop-based map viewing The free ArcReader application enables people to view pre-configured maps published with the ArcGIS Publisher extension to ArcMap. Browse data using an ArcMap-like graphic interface while referencing live file, ArcSDE, and ArcIMS data sources. ArcView 8 and ArcView 3 Two ArcView products provide more substantial GIS functionality, including data analysis and advanced cartographic display. ArcView 8, part of the ArcGIS Desktop family, includes the ArcCatalog, ArcMap, and ArcToolbox applications, as well as many optional extensions for specialized tasks such as raster processing, 3D modeling, and network analysis. ArcView 3, its predecessor built on a different software architecture, offers much of the same functionality, including extensions. A large, experienced user community and millions of lines of customized code continue to make ArcView 3 a popular choice for GIS professionals. Desktop-based map viewing ArcReader Internet-based map viewing Web browser Number of users Advanced ArcObjects Component Development II (C++)

12 ArcEditor and ArcPad The ArcEditor software product includes the same applications and functionality as ArcView 8, plus the capability to edit coverages and ArcSDE geodatabases. ArcPad is software designed for handheld computers used to collect data in the field. ArcEditor and ArcPad work well together to maintain the contents of enterprise geodatabases hosted by ArcSDE. ArcInfo ArcInfo is ESRI’s most robust GIS product. With it you can edit, model, and analyze vector, raster, 3D, and network data on all ESRI file-based and RDBMS data sources. Like with ArcView and ArcEditor, you can enhance the ArcInfo applications with software extensions. ArcSDE and ArcIMS Data administrators can use ArcSDE and ArcIMS applications to manage GIS data storage and sharing. In some organizations, the GIS department directly maintains these server-side software products and their data. In others, this is the responsibility of the IT (information technology) department. Often, both groups collaborate to ensure that data is readily available, safe from hardware and software failure, and protected from attacks and unauthorized access. Developer interfaces Whatever the GIS tasks and applications, software developers can customize the software to meet their specific needs. Add or remove pre-configured buttons on the ArcView 3 interface, generate custom ArcXML requests using JavaScript functions, build a standalone GIS program with ArcObjects, and more. In addition to native customization environments, other products such as MapObjects and NetEngine help software developers create new applications. Advanced ArcObjects Component Development II (C++)

13 Customization / Programming
Learning paths Customization / Programming Foundation Introduction to ArcGIS I i Learning ArcGIS I W Introduction to Visual Basic for ESRI software W Introduction to Programming ArcObjects with VBA i Proficiency Extensions Introduction to ArcGIS II Learning ArcGIS II: Presenting information W (more) i Advanced ArcObjects Component Development I i Depending on which ESRI software your organization has licensed, your skills, and your plans for upcoming projects, you may benefit from additional training on advanced topics, on specialized software, or on background topics to refine your understanding of GIS and related technologies. The diagram above illustrates the position of this training course in the ESRI Education Solutions curriculum, along with its most closely-related companion courses. Courses identified with the symbol occur in a classroom with an instructor. The symbol indicates web-based courses available on the ESRI Virtual Campus at Detailed information about instructor-led and web-based courses—including a list of topics covered, intended audience, duration, schedules, and pricing—is available in the ESRI Course Catalog. You can access this catalog on the Web at: From this main training page, follow the ESRI Instructor-led Training link, then click the link for the newest course catalog. On the ESRI Training web site, you can also find information about new courses developed since the course catalog was printed. Web-based courses offer convenience and savings. Also, many ESRI Virtual Campus courses include a free lesson, called a module. You can create a free account and begin training with these free modules within minutes at Database Design / Development Creating and Managing Geodatabases i Geodatabase Design Concepts i Creating, Editing, and Managing Geodatabases W Advanced ArcObjects Component Development II i W i (more) Advanced ArcObjects Component Development II (C++)

14 Software support resources
Online Support Center is gateway to resources Downloads Software upgrades Technical papers ArcScripts User-to-user resources Discussion forums lists Technical archives Knowledge base Documentation System requirements ESRI’s primary resource for software support is the Online Support Center (OSC) at From the OSC you can request assistance from ESRI Technical Support, interact with other ESRI software users, and even help yourself to technical information and downloads. Support resources are grouped by software product. When you click the name of a software product, a list of available resources expands below the name. In the graphic above, clicking the ArcGIS Desktop product name reveals links to technical articles, downloads, system requirements, and more. Downloads Downloads from the OSC fall into three main categories. Software upgrades—also called service packs, patches, updates, and utilities—are ESRI-provided enhancements. These upgrades range from handy tools that facilitate common tasks to systemwide upgrades that resolve bugs, improve performance, and add support for additional platforms. Unless otherwise stated in their descriptions, software upgrades are fully supported by ESRI Technical Support. In-depth technical papers discuss topics like system design, performance, and integration. Documents available through the Technical papers link are written by ESRI, and the recommendations they make are fully supported by ESRI Technical Support. The ArcScripts site is a repository of software utilities (scripts) supplied by the ESRI user community for the benefit of its peers. Here you will find ArcScripts, as these utilities are called, for most ESRI software products and customization environments, including ArcGIS VBA, Avenue, and AML. Download scripts anonymously, and create a free account to post tools to the archive. ArcScripts are provided as-is and are not supported by ESRI Technical Support. You may, however, purchase technical support for a per-incident fee. ESRI Technical Support Request support online Find phone and fax numbers Available to support subscribers Advanced ArcObjects Component Development II (C++)

15 User-to-user resources
The OSC hosts two resources for ESRI software users to discuss questions and answers among themselves. Software and special interest discussion forums are web-based tools where you can post, browse, and reply to messages. Messages soliciting opinions and experiences with ESRI software, and those requesting non-urgent technical support are appropriate for the forums. Two lists, moderated by ESRI, are available through the OSC. Use ARCVIEW-L and ESRI-L to discuss ESRI software among the group of subscribers. You can subscribe to either list and browse previous postings through the OSC. Technical archives Look for answers to your questions in one of several self-help resources on the OSC. The Knowledge Base is a searchable database of focused technical articles. It includes answers to frequently-asked questions, step-by-step directions for performing common tasks, and workarounds for known software limitations. Enter keywords for your search in the text box. Browse selected software documentation on the Web, and download documentation updates with some software upgrades. Click the system requirements link on the software pages to verify a list of supported operating systems, databases, and hardware configuration for use with your ESRI software. ESRI Technical Support Users subscribing to ESRI Technical Support can get responsive help online by clicking the Request support link on the main OSC page. Request help with a problem, report software and documentation glitches, or request enhancements to the software. ESRI phone and fax numbers are also listed on the main OSC page. Technical support services vary by software product and optional support contracts. Support is available either for continuous service, for a fixed time period, or for a per-incident fee. Click on the Support Services Brochures link on the main OSC page to learn more about Technical Support, Developer Support, and Premium Support options. Advanced ArcObjects Component Development II (C++)

16 ArcObjects: The foundation
Development platform for all ArcGIS applications Three main products: ArcInfo, ArcEditor, and ArcView Applications: ArcMap, ArcCatalog, ArcToolbox, ArcScene Application extensions: 3D Analyst, ArcPress… Available license controls the objects that are available No reinstall required Developers use ArcObjects to write custom COM objects to extend and customize applications ArcObjects is the foundation for all ArcGIS desktop products and applications. The license available to a system determines the product and application that can be run. Objects are license-checked at run-time to ensure they can be instantiated on the client system. Changing the product license is all that is required to change the product for that system and reinstalling the software is not necessary. Developers use ArcObjects to customize and extend the software to their needs. Advanced ArcObjects Component Development II (C++)

17 Difficulty of implementation Recommended progression
Development triangle Embedding ArcObjects Stand-alone applications Custom features and workspaces Custom layers and renderers Document persistence Windows Property pagesViews Geodatabase class extensions Application extensions Editor tools Commands Buttons Tools Menus Toolbars VBA Macros and UIControls 2 Map Control Difficulty of implementation Recommended progression ArcObjects Framework 1 ArcObjects customizations can be broken down into two major areas: Inside the ArcObjects framework Outside of the ArcObjects framework If you are new to ArcObjects, it is recommended to start by experimenting with code at the VBA level until you become more familiar with the objects themselves. More advanced customizations can be accomplished by implementing interfaces to create simple objects such as buttons, tools, and menus. More complex components such as property pages can also be written as your knowledge base grows. In any case, working inside the development framework is encouraged so that you can take advantage of the existing functionality written by ESRI, and simply plug your custom applications into them. Working outside of the framework means that you will either embed ArcObjects functionality into an existing application or write a stand-alone application from scratch. This generally takes more development time and effort. Start here Advanced ArcObjects Component Development II (C++)

18 ArcObjects development with VBA
Learning ArcObjects: Many samples, help system Prototyping, testing, and exploring ArcObjects API For relatively simple application extensions Distribute functionality in an MXD or MXT format Free The best way to start learning ArcObjects is to experiment with VBA. Many samples are available from the help system that can be easily cut, pasted, and run in the VBA development environment. Use this approach to build prototype applications and for testing. If you decide to develop in VBA, then the customizations must be distributed as a MXD or MXT document. Advanced ArcObjects Component Development II (C++)

19 ArcObjects development with VB
Everything possible in VBA Implement interfaces and create custom components Obtain more advanced functionality and extensions Encapsulates COM programming details Very easy to use and fast to write prototypes Many samples Hide code in binary DLLs Migrating from VBA to VB is often required to accomplish more advanced customizations. VB allows you to implement interfaces to create custom COM objects which can be easily plugged into the system. VB is often the language of choice because it it easy use and it hides many of the programming details required to create a COM server. When development is complete, components can be distributed to clients in the form of binary DLLs and OCXs. Advanced ArcObjects Component Development II (C++)

20 ArcObjects development with VC++
Everything possible in VB and VBA More advanced components and extensions options Implement every interface, even those supporting inheritance Other considerations Rich Object Oriented development environment (inheritance) Better debugging environment (no problems like VB 6) Control type library names and GUIDs explicitly Explicit control of COM server design (e.g., custom marshaling) Considered standard for large-scaled software development projects VC++ provides the ability of writing more advanced ArcObjects customizations not possible in VB and VBA. Every interface in the esriCore type library can be implemented in this environment. VC++ also provides a true object-oriented development environment that is often the standard for larger software projects. It also provides a robust debugging environment that does not have the limitations of VB. Advanced ArcObjects Component Development II (C++)

21 Which development environment to use?
Reasons you should avoid using VB Advanced component implementation or interface inheritance Interface members contain IUnknown* argument types Application requires aggregation VB hides implementation details: Is that really bad? Performance concerns? VC++: Fastest VB: Approximately 2% slower VBA: Approximately 4% slower VB versus VC++ development time? Depends on experience level The development environment you choose depends on a number of factors: Your programming experience with the language itself The application functionality required The size of the project The preferred method of distribution Development time allotted Number of developers involved in project Advanced ArcObjects Component Development II (C++)

22 Exercise 1 overview Install the class data
Determine the installation directory for ArcMap Explore the class materials: Data, exercises… Set Visual Studio file paths for: esriCore.olb ArcCATIDs.h Advanced ArcObjects Component Development II (C++)

23 Review What is ArcObjects? What are three main ArcGIS products?
What are the two main levels of customization? What is the best development language to use? What is the most important developer resource? What is the purpose of IExtensionConfig? Advanced ArcObjects Component Development II (C++)

24 Advanced ArcObjects Component Development II (C++)


Download ppt "Advanced ArcObjects Component Development II (C++)"

Similar presentations


Ads by Google