arcgis runtime sdk for .net: building windows apps › content › dam › esrisites › en-us ›...

38
Mike Branscomb Morten Nielsen ArcGIS Runtime SDK for .NET Building Windows Apps

Upload: others

Post on 07-Jul-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ArcGIS Runtime SDK for .NET: Building Windows Apps › content › dam › esrisites › en-us › events › ...• Match the UI and UX conventions of the platform on which the app

Mike BranscombMorten Nielsen

ArcGIS Runtime SDK for .NETBuilding Windows Apps

Page 2: ArcGIS Runtime SDK for .NET: Building Windows Apps › content › dam › esrisites › en-us › events › ...• Match the UI and UX conventions of the platform on which the app

Agenda

• Overview• ArcGIS Runtime Architecture• Getting Started• Enhancements

• Toolkit• Performance• .NET Core• Advanced Symbology

• Road Ahead

Page 3: ArcGIS Runtime SDK for .NET: Building Windows Apps › content › dam › esrisites › en-us › events › ...• Match the UI and UX conventions of the platform on which the app

ArcGIS Runtime SDK for .NETOverview

Page 4: ArcGIS Runtime SDK for .NET: Building Windows Apps › content › dam › esrisites › en-us › events › ...• Match the UI and UX conventions of the platform on which the app

• Develop native mapping and location analysis apps with .NET• 2D and 3D Visualization• Ready to use maps and data• Search and geocode• Directions and routing• Demographic data• Spatial analysis• Hosted data• Offline workflows

Overview: ArcGIS Runtime SDK for .NET

Apps

DesktopAPIs

Online

Enterprise

Page 5: ArcGIS Runtime SDK for .NET: Building Windows Apps › content › dam › esrisites › en-us › events › ...• Match the UI and UX conventions of the platform on which the app

• Build native apps for popular platforms and devices- Standalone map-centric apps- Integrate GIS into your line-of-business apps

• Match the UI and UX conventions of the platform on which the app runs• Access native device capabilities e.g. GPS• Connected to ArcGIS Online or ArcGIS Enterprise• Offline with local data• Distribute through an app store

Overview: Why use ArcGIS Runtime?

Page 6: ArcGIS Runtime SDK for .NET: Building Windows Apps › content › dam › esrisites › en-us › events › ...• Match the UI and UX conventions of the platform on which the app

• APIs- Windows Presentation Foundation (WPF)

- .NET Framework- .NET Core 3.1

- Universal Windows Platform (UWP)- Xamarin.Android- Xamarin.iOS- Xamarin.Forms (Android, iOS, and UWP)

• SDK- Templates, Toolkit controls, Doc, Sample code, Tutorials, Open Source Apps

• Cross-platform- Share your .NET C# business logic code across Android, iOS, and Windows

Overview

Page 7: ArcGIS Runtime SDK for .NET: Building Windows Apps › content › dam › esrisites › en-us › events › ...• Match the UI and UX conventions of the platform on which the app

ArcGIS Runtime SDK for .NETArcGIS Runtime Architecture

Page 8: ArcGIS Runtime SDK for .NET: Building Windows Apps › content › dam › esrisites › en-us › events › ...• Match the UI and UX conventions of the platform on which the app

Overview – ArcGIS Runtime SDK for .NETAn Architecture Designed to Maximize Performance and Reuse

C++ runtime core

WinLinux macOSAndroid iOS UWP

x86 x64 ARM64DirectXOpenGLOpenGL ES

Page 9: ArcGIS Runtime SDK for .NET: Building Windows Apps › content › dam › esrisites › en-us › events › ...• Match the UI and UX conventions of the platform on which the app

Overview – ArcGIS Runtime SDK for .NETAn Architecture Designed to Maximize Performance and Reuse

C++ runtime core

x86 x64 ARM64DirectXOpenGLOpenGL ES

WPFUWPiOSAndroid

Xamarin.Forms

WinAndroid iOS UWP

Page 10: ArcGIS Runtime SDK for .NET: Building Windows Apps › content › dam › esrisites › en-us › events › ...• Match the UI and UX conventions of the platform on which the app

ArcGIS Runtime SDK for .NETGetting Started

Page 11: ArcGIS Runtime SDK for .NET: Building Windows Apps › content › dam › esrisites › en-us › events › ...• Match the UI and UX conventions of the platform on which the app

• Visual Studio extension (VSIX)- Install directly in Visual Studio

- Project templates for each supported platform- Download from developers.arcgis.com/downloads

- Project templates for each supported platform- Plus local NuGet packages for offline development

• NuGet packages on NuGet.org - WPF - UWP - Xamarin.Android- Xamarin.iOS- Xamarin.Forms (Android, iOS, UWP)- Toolkit- AR Toolkit

Installing ArcGIS Runtime SDK for .NET

Page 12: ArcGIS Runtime SDK for .NET: Building Windows Apps › content › dam › esrisites › en-us › events › ...• Match the UI and UX conventions of the platform on which the app

Getting StartedDemo

Page 13: ArcGIS Runtime SDK for .NET: Building Windows Apps › content › dam › esrisites › en-us › events › ...• Match the UI and UX conventions of the platform on which the app

• System requirements depend on the apps you plan to build

Prerequisites for development

Page 14: ArcGIS Runtime SDK for .NET: Building Windows Apps › content › dam › esrisites › en-us › events › ...• Match the UI and UX conventions of the platform on which the app

• Toolkit• Performance• .NET Core• Modernizing Symbology

Enhancements

Page 15: ArcGIS Runtime SDK for .NET: Building Windows Apps › content › dam › esrisites › en-us › events › ...• Match the UI and UX conventions of the platform on which the app

ToolkitArcGIS Runtime SDK for .NET

Page 16: ArcGIS Runtime SDK for .NET: Building Windows Apps › content › dam › esrisites › en-us › events › ...• Match the UI and UX conventions of the platform on which the app

• Toolkit 100.7 – Released February 2020• Support for .NET Core with WPF• New Bookmarks control• Complete rewrite of Legend control and TableOfContents controls

- TableOfContents is currently in Preview

• Dark Mode support for iOS• New DocFX-based website with API reference and concept documentation

- Over time this will migrate to the ArcGIS Developers site

• Augmented Reality Toolkit incl. new project templates

Toolkit

Page 17: ArcGIS Runtime SDK for .NET: Building Windows Apps › content › dam › esrisites › en-us › events › ...• Match the UI and UX conventions of the platform on which the app

PerformanceArcGIS Runtime SDK for .NET

Page 18: ArcGIS Runtime SDK for .NET: Building Windows Apps › content › dam › esrisites › en-us › events › ...• Match the UI and UX conventions of the platform on which the app

• The dev team analyzed where time is spent and where memory is allocated• Reducing time

- = Faster response times

• Reducing allocations- = Fewer out-of-memory events - = Less work for the Garbage Collector

• Main focus has been on common customer scenarios e.g.- Creating and updating many Graphics, Features, and Geometries- Querying many Features and Graphics- Accessing and setting Feature and Graphic Attribute values

Performance Improvements

Page 19: ArcGIS Runtime SDK for .NET: Building Windows Apps › content › dam › esrisites › en-us › events › ...• Match the UI and UX conventions of the platform on which the app

Performance Improvements - Graphics

0

0.2

0.4

0.6

0.8

1

1.2

100.1.0 100.2.0 100.2.1 100.3.0 100.4.0 100.5.0 100.6.0 100.7.0 100.8.0

Get Graphics Attributes

Relative execution time Allocations

0

0.2

0.4

0.6

0.8

1

1.2

100.1.0 100.2.0 100.2.1 100.3.0 100.4.0 100.5.0 100.6.0 100.7.0 100.8.0

Set Graphics Attributes

Relative execution time Allocations

0

0.2

0.4

0.6

0.8

1

1.2

100.1.0 100.2.0 100.2.1 100.3.0 100.4.0 100.5.0 100.6.0 100.7.0

Add 20000 Graphics

Relative execution time Allocations

0

0.2

0.4

0.6

0.8

1

1.2

1.4

100.1.0 100.2.0 100.2.1 100.3.0 100.4.0 100.5.0 100.6.0 100.7.0 100.8.0

Update 20000 Graphics Attributes

Relative execution time Allocations

Page 20: ArcGIS Runtime SDK for .NET: Building Windows Apps › content › dam › esrisites › en-us › events › ...• Match the UI and UX conventions of the platform on which the app

Performance Improvements - Geometry

0

0.2

0.4

0.6

0.8

1

1.2

1.4

100.0.0 100.1.0 100.2.0 100.2.1 100.3.0 100.4.0 100.5.0 100.6.0 100.7.0 100.8.0

Set Graphics Geometry

Relative execution time Allocations

0

0.2

0.4

0.6

0.8

1

1.2

100.0.0 100.1.0 100.2.0 100.2.1 100.3.0 100.4.0 100.5.0 100.6.0 100.7.0

Create Spatial Reference

Relative execution time Allocations

0

0.2

0.4

0.6

0.8

1

1.2

Create Point

Relative execution time Allocations

0

0.2

0.4

0.6

0.8

1

1.2

100.0.0 100.1.0 100.2.0 100.2.1 100.3.0 100.4.0 100.6.0 100.7.0

Create Polygon

Relative execution time Allocations

Page 21: ArcGIS Runtime SDK for .NET: Building Windows Apps › content › dam › esrisites › en-us › events › ...• Match the UI and UX conventions of the platform on which the app

Performance Improvements - Geometry

0

0.2

0.4

0.6

0.8

1

1.2

1.4

100.0.0 100.1.0 100.2.0 100.2.1 100.3.0 100.4.0 100.5.0 100.6.0 100.7.0 100.8.0

Set Graphics Geometry

Relative execution time Allocations

0

0.2

0.4

0.6

0.8

1

1.2

100.0.0 100.1.0 100.2.0 100.2.1 100.3.0 100.4.0 100.5.0 100.6.0 100.7.0

Create Spatial Reference

Relative execution time Allocations

0

0.2

0.4

0.6

0.8

1

1.2

Create Point

Relative execution time Allocations

0

0.2

0.4

0.6

0.8

1

1.2

100.0.0 100.1.0 100.2.0 100.2.1 100.3.0 100.4.0 100.6.0 100.7.0

Create Polygon

Relative execution time Allocations

Page 22: ArcGIS Runtime SDK for .NET: Building Windows Apps › content › dam › esrisites › en-us › events › ...• Match the UI and UX conventions of the platform on which the app

Performance Improvements – Feature Tables

0

0.2

0.4

0.6

0.8

1

1.2

100.0.0 100.1.0 100.2.0 100.2.1 100.3.0 100.4.0 100.5.0 100.6.0 100.7.0 100.8.0

Query Feature Table

Relative execution time Allocations

0

0.2

0.4

0.6

0.8

1

1.2

100.0.0 100.1.0 100.2.0 100.2.1 100.3.0 100.4.0 100.5.0 100.6.0 100.7.0 100.8.0

Add 40000 Features To Table

Relative execution time Allocations

Page 23: ArcGIS Runtime SDK for .NET: Building Windows Apps › content › dam › esrisites › en-us › events › ...• Match the UI and UX conventions of the platform on which the app

Performance Improvements – MapView

0

100

200

300

400

500

600

100.0.0 100.1.0 100.2.0 100.2.1 100.3.0 100.4.0 100.5.0 100.6.0 100.7.0

MapView Control Load time (ms)

Page 24: ArcGIS Runtime SDK for .NET: Building Windows Apps › content › dam › esrisites › en-us › events › ...• Match the UI and UX conventions of the platform on which the app

.NET CoreArcGIS Runtime SDK for .NET

Page 25: ArcGIS Runtime SDK for .NET: Building Windows Apps › content › dam › esrisites › en-us › events › ...• Match the UI and UX conventions of the platform on which the app

• ArcGIS Runtime 100.7 supports .NET Core 3.1 with *WPF* for Windows Desktop apps• Removes dependency on system-wide .NET Framework

- Self-contained app folders- Deploys .NET Core to your app publish folder

• Benefit from .NET Core performance improvements

WPF & .NET Core 3.1

Page 26: ArcGIS Runtime SDK for .NET: Building Windows Apps › content › dam › esrisites › en-us › events › ...• Match the UI and UX conventions of the platform on which the app

WPF & .NET Core 3.1

• Single File executables- Tooling packages your app- Includes .NET Core- Includes native libraries (e.g. ArcGIS Runtime)

• Full C#8 Support• Future enhancements with .NET 5, AOT compilation, etc.

Page 27: ArcGIS Runtime SDK for .NET: Building Windows Apps › content › dam › esrisites › en-us › events › ...• Match the UI and UX conventions of the platform on which the app

• .NET Framework 4.8 is the last version of .NET Framework- Fully supported, but bug fixes only- Already several new .NET features not available with .NET Framework

• Open source:- Step right into source-code- Rapid and open development with the help of the community

Why .NET Core?

“While we do recommend that new desktop apps should consider targeting .NET Core, the .NET Framework will keep the high compatibility bar and will provide support for your apps for a very long time to come”

Page 28: ArcGIS Runtime SDK for .NET: Building Windows Apps › content › dam › esrisites › en-us › events › ...• Match the UI and UX conventions of the platform on which the app

Can I move to .NET Core?

• Install the .NET Portability Analyzer Tool• Or run APIPort tool against binaries

- https://github.com/Microsoft/dotnet-apiport

• Move class libraries to .NET Standard if you can• Good porting resource from Microsoft

- http://esriurl.com/NetCorePort

Page 29: ArcGIS Runtime SDK for .NET: Building Windows Apps › content › dam › esrisites › en-us › events › ...• Match the UI and UX conventions of the platform on which the app
Page 30: ArcGIS Runtime SDK for .NET: Building Windows Apps › content › dam › esrisites › en-us › events › ...• Match the UI and UX conventions of the platform on which the app

Building and deploying .NET Core Apps

Demo.NET Core

Page 31: ArcGIS Runtime SDK for .NET: Building Windows Apps › content › dam › esrisites › en-us › events › ...• Match the UI and UX conventions of the platform on which the app

• .NET Portability Analyzer- https://aka.ms/portabilityAnalyzer

• Try-Convert- dotnet tool install –g try-convert

• How to port desktop applications to .NET Core- http://esriurl.com/NetCorePort

• Modernizing the enterprise desktop application- http://esriurl.com/ModernDesktop

.NET Core Resources

Page 32: ArcGIS Runtime SDK for .NET: Building Windows Apps › content › dam › esrisites › en-us › events › ...• Match the UI and UX conventions of the platform on which the app

Modernizing SymbologyArcGIS Runtime SDK for .NET

Page 33: ArcGIS Runtime SDK for .NET: Building Windows Apps › content › dam › esrisites › en-us › events › ...• Match the UI and UX conventions of the platform on which the app

• Cartographic Information Model (CIM) - Published content specification used to persist and transfer cartographic descriptions - Works across the ArcGIS Platform- Represented in JSON

• Style files (.stylx)- Symbols can be stored, managed, and shared in collections called styles- ArcGIS Runtime uses Mobile Styles

• Symbols- Composed from one or more symbol layers with visual properties and geometry- Vectorized for crisp rendering on any device as any resolution

• Runtime API contains MultiLayerSymbol types- Replacement for the CompositeSymbol

• These concepts support the DictionaryRenderer

Modernizing Symbology

Page 34: ArcGIS Runtime SDK for .NET: Building Windows Apps › content › dam › esrisites › en-us › events › ...• Match the UI and UX conventions of the platform on which the app

Symbol EditorDemo

Page 35: ArcGIS Runtime SDK for .NET: Building Windows Apps › content › dam › esrisites › en-us › events › ...• Match the UI and UX conventions of the platform on which the app

• Source Available from:https://github.com/Esri/arcgis-runtime-demos-dotnet/

• Install right now with MSIX:• http://esriurl.com/SymbolEditor

Symbol Editor Sample

Page 36: ArcGIS Runtime SDK for .NET: Building Windows Apps › content › dam › esrisites › en-us › events › ...• Match the UI and UX conventions of the platform on which the app

Road AheadArcGIS Runtime SDK for .NET

Page 37: ArcGIS Runtime SDK for .NET: Building Windows Apps › content › dam › esrisites › en-us › events › ...• Match the UI and UX conventions of the platform on which the app

• Nullability• .NET 5• WinUI• iOS: Metal support

What will we be working in 2020?

Page 38: ArcGIS Runtime SDK for .NET: Building Windows Apps › content › dam › esrisites › en-us › events › ...• Match the UI and UX conventions of the platform on which the app

Thank you!

Recommended session pairing:ArcGIS Runtime SDK for .NET: Building Xamarin Apps

Continue the discussion on: GeoNet: https://community.esri.com/