ArcGIS Pro SDK Development Series, Part 2: Learning the Pro SDK

4267
0
06-10-2016 04:20 PM
by Anonymous User
Not applicable
4 0 4,267

Original Author: @ChristopherZent 

 

ArcGIS Pro logo white background.pngIn our last post in this series, we discussed the importance of first learning how ArcGIS Pro

works when approaching the Pro SDK.  When you first understand how you can use Pro in a general way, you’ll be making better decisions about how you can best extend Pro.  If you’re coming from years of working with ArcMap, this will be even more important and practical, so as to not make any design assumptions you might need to change later.  In addition to the online resources, there are a number of introductory ArcGIS Pro books out there now, including some from Esri Press, along with other training options such as introductory courses.

 

Update February 2018 For additional information and resources, see the ProConcepts Migrating to ArcGIS Prodocument.

 

As mentioned in the last post, we know making the move to a new SDK can be challenging, and we want to help you find the resources you need quickly and easily to make good progress with the Pro SDK – this includes comprehensive documentation and educational resources.  Currently, all of the SDK resources are available online and available for you to get started with, we'll describe all these below.  Also, with regard to formal training, Esri Educational Services is currently working on a new instructor-led training course on the Pro SDK which we're happy to announce will be available later this year.  As with our other instructor-led courses, it will be available online as well.  The course will provide an excellent introduction to the Pro SDK for developers.  We’ll be keeping you informed on this news and we’ll have a post when the course is available.

 

The Online Resources

So, after getting equipped with a good understanding of Pro and your potential new Pro workflows, you’re ready to start exploring the Pro SDK in detail.  There is a wealth of SDK learning resources to help you get going right from the Pro SDK landing page

Pro SDK Landing Page.pngWhether you’re an experienced ArcObjects developer, or entirely new to GIS development, there is documentation available to help you get started.  Let’s walk through all of these common resource links:

  • Pro SDK landing page – Again, this is the Pro SDK page which is seen as a "tab" off the main ArcGIS Pro page. This is where you’ll find this list of links available and more.
  • Pro SDK Wiki on GitHub – This is the primary Pro SDK documentation site with concept and guide docs, code snippets, full code samples with Visual Studio solutions, and much more.  This starting page is quite extensive, and you’ll want to take the time to familiarize yourself, especially with the format of the sitemap / page menu which runs along the right margin (screenshot below).  It provides you with access to all of the main SDK topics and functional areas.

Pro SDK Wiki Home.png

  • Community Samples – These samples are all provided in the form of fully-functional, ready to compile Visual Studio solutions.  They’re categorized by Pro functional area – Framework, Content, Editing, Geodatabase, Map Exploration and so on.
  • Pro SDK Snippets – This is the full listing of code snippets, again by the Pro functional area.  These are meant to assist you with examples of some common coding practices which you can copy and paste into your code and then modify.
  • GeoNet Pro SDK Group – This is where you are seeing this post!  It’s the Pro SDK developer community space here on GeoNet.  Here you can ask an SDK-related question and also search for answers to questions from previous posts.  You’ve likely already been using GeoNet for years, so consider joining this group for SDK updates, etc., we look forward to your participation!
  • API Reference – This is the full ArcGIS Pro API reference with information on how the Pro API is organized.  The format should be familiar for many Esri SDK developers.
  • FAQ – Answers to many common questions.  You can usually save yourself some time by doing a quick search on this FAQ page and on previous GeoNet group posts, and then if you can’t find an answer, post the question to the GeoNet Pro SDK Group.

 

Pro SDK Samples.pngIn general, spending some time checking out each of the above sites can really help you to familiarize yourself with the content and on how to get around.   One important note on the SDK community samples – these are free and ready to be integrated into your own solutions.  They’re a key important resource for understanding the concepts and stepping through code as you look to try out the many capabilities in Pro.  There is a helpful guide on how to begin to use them found here.   Also, don’t forget to download the accompanying sample dataset for use with the samples which is located here – https://github.com/Esri/arcgis-pro-sdk-community-samples/releases   You’ll see these sample projects and datasets referred to in the walk-through’s for each of the samples.

 

For working with the samples, remember that the free Visual Studio Community edition, both 2013 and 2015, work with the Pro SDK.  Also, if you’re in need of a free trial of ArcGIS for Desktop to get started with Pro, you can register for a 60-day trial here.

 

For online training video resources, this recent post provides links to each of the most recent videos available this year.  Two key resources were mentioned:

  • A general introduction to creating Pro SDK add-ins is found in a recent Live Training Seminar (LTS), titled “Extend ArcGIS Pro Functionality with Add-Ins”, and it provides a very helpful introduction to asynchronous programming with the SDK. 
  • Also, the above post lists the recordings from the Pro SDK technical sessions at the 2016 Developer Summit which are available on the Esri video site, E360.

All of these videos can help you to understand different aspects of programming with the Pro SDK, such as the main patterns, design, and help you to understand the different functional areas of the Pro API.

 


Big Picture Concepts

One of the key features of the Pro SDK as mentioned before is asynchronous development.  This pattern is still new for many GIS developers.  It’s an important place to get started in learning the capabilities of Pro, and how you can keep the UI responsive, building a great user experience. The videos mentioned above provide some introductions to the pattern, like this Dev Summit presentation on programming patterns and the Pro SDK LTS.  There are some resources on the Pro SDK wiki, as well, like this concept page, the second-half of which is dedicated to working with multithreading in Pro.  Also, Microsoft has a number of resources including this article on asynchronous programming which has samples and additional links. 

 

As with all of these new concepts, take a look at the community samples and see how things are done with the different Pro API functional areas.  Also, take a good look at the different SDK templates that are available, and learn how and when to use each, one of the best ways to do this is to go through each of the ProGuide docs under the “Framework – Customization” topic found on the margin of the SDK wiki page, as seen here to the right.

 

Pro SDK Framework.png

The Pro SDK uses the add-in extensibility model first introduced with ArcGIS Desktop 10.0.  As with traditional 10.x add-ins, the Pro SDK add-in UI components are defined within an XML file, and for the Pro SDK the filename is Config.daml, the .daml extension is for Desktop Application Markup Language (DAML).  In the Config.daml you declare the buttons, tools, menus, dockpanes, tabs, etc. that your add-in contains and will be used to customize the Pro UI.  Most of these classes will then have their respective data and logic components implemented in a separate file.  For the most part, however, you can use one of the ArcGIS Pro SDK item templates to automate the DAML updates as well as adding the code behind files.

 

ArcGIS Pro SDK also takes advantage of Windows Presentation Foundation (WPF), Model-View-ViewModel (MVVM), and XAML.  MVVM is a popular design pattern for XAML-based development and helps you to separate the UI components of your add-in from the data and logic components.  Use MVVM in Pro to define custom content for your add-in dockpanes, dialogs, property sheets, and embedded controls. You can use the ArcGIS Pro SDK item templates to generate much of the required boiler plate code for the MVVM pattern.  A good introduction is provided in this Microsoft doc, which describes how MVVM makes applications easier to test, maintain, and improves code re-use opportunities.  There are other good sources of information on the MVVM pattern on the web, and the ProConcept Framework doc provides some important considerations for the SDK.

 

Get Started, Get Creative

We’ve seen some great work being done by different organizations this year with the Pro SDK. Some are getting creative on how they approach the new material, which is always impressive. One of the ways we’ve seen some large GIS development teams get started is by putting together their own internal Pro SDK workshops and hackathons. 

Pro SDK Hackathon.pngFrom what we’ve seen, including organizations that manage large ArcObjects codebases, these can lead to focused and faster learning, providing the opportunity to quickly become familiar with and try out the Pro SDK.  Some aspects of successful hackathon efforts we’ve seen:

  • Scheduling a hackathon immediately after some SDK training allows the group to engage more actively in the material and apply it right away in a small project
  • Dividing into teams with different projects allows for better coverage of different functional areas in the SDK and to present the results to the group for discussion and feedback
  • Sharing results in small project presentations allows the whole group to provide guidance and tips to other participants on particular functions, for faster learning

 

Overall, these types of learning exercises can help you and your team ramp up more quickly on the SDK and its scope, and help the whole organization to begin to define next steps and plans for extending Pro.

Your team may already be well-versed with these practices and have other ideas for fast-tracking your development learning. We encourage you to get started soon with the SDK.  As always, it helps to try and get a simple add-in rolling and then build on it.  Another note on scope, the sooner you can get started actively working with the SDK, the sooner you determine whether a capability you require in the Pro API is available for all the workflows you design. As mentioned in our last post, this we’re growing the Pro SDK based on user requirements, and the sooner we receive your input, the sooner we’ll be able to try and plan and prioritize efforts to address those needs in growing the SDK.

 

Bottom Line:   There is a comprehensive set of online resources available to help you learn the Pro SDK, and lots of ways your development team can creatively move ahead together and make great strides with it.  We know the Pro SDK is a big step for many Desktop developers, it’s definitely not ArcObjects… it’s new, it’s different, and lighter-weight. The many features of Pro and the Pro SDK will hopefully make it an exciting and interesting learning experience which you’ll enjoy.  We want you to be successful with both Pro and the Pro SDK.

 

So what other resources would you like to see offered which might help you with the Pro SDK?