ArcGIS Runtime SDK for .NET: Building Windows Apps

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome to this session in which we'll talk about the development product art jets runtime SDK for dotnet here will be specifically talking about using the SDK for building apps for Windows but remember this is an SDK content that contains dotnet API is for Windows Android and iOS so many of the concepts that we'll talk about in this session for applicable across these platforms my name is Mike Brandt's CIM I'm a product engineer on the ArcGIS runtime SDK for dotnet team I'm joined by my colleague Morton nielsen yeah that's me and I'm working as a development leap for the runtime it's taking four done net and we'll be taking you through the session today so our agenda for the session then is to look at an overview of the arcgis runtime sdk for dotnet will introduce the RGS runtime architecture and that helps you understand how the API is built and the ways in which you work with it will show you several of the key resources you use when getting started with the SDK and we'll look at both enhancements that we've made specifically to the dotnet SDK but also an enhancement who've made more broadly across the ArcGIS a long time over the last year since the last dev summit in our support for dotnet core and advanced symbology toolkit and performance and finally we'll wrap up with a look at what we'll be working on throughout 2020 so first up we'll take a look at an overview of the arch s runtime SDK for dotnet so rgeous runtime sdk vennett is a collection of dotnet api's and sdk resources that enable you to build native apps with mapping and location analysis capabilities the apps you build can include rich 2d and 3d visualization but Jeff's runtime provides access to ready to use maps and data they can come from our chess online with base maps elevation imagery feature data and more the API includes functionality for searching data and to retrieve features and also geocoding to find addresses and using their locations a powerful search and geocoding capabilities in the applications you build you can also perform analysis on transportation networks for routing and network analysis including finding the closest facility or finding the service area of a specific facility or facilities without just run time you can access demographic data layers coming from ArcGIS online and you can integrate them with your data the API supports advanced spatial analysis operations you can use the software or platform as a surface concept to have your data hosted in the cloud without GIS and crucially arcgis runtime provides great support for offline workflows where your application will be used in environments without any network where they're disconnected so that was an overview of the capabilities about Geoff's runtime SDK for dotnet I spend a moment just thinking about why you would use out just run time so I just run time is intended for building native apps for popular platforms and devices today you can build standalone Maps centric applications and you can integrate GIS into your line of business applications what are the key benefits of RJ's runtime is building these native apps that allow you to match the user interface and user experience conventions of the platform that you target for example Windows Android or iOS as we see the screenshot there you also have access to the native device capabilities such as GPS or other sensors of course you can be connected to our chess online or your art jazz enterprise but also our chats runtime provides support for being offline or disconnected from the network and using local data on the device and you can also build applications with our jeff's runtime that you distribute if you look through an app store as well so some of these items here that I've covered differentiate the reason why you would use out just runtime from other AP is that as we provide such as the artists API for JavaScript which is intended for web applications and the arcgis sdk for for arcgis Pro which is a dotnet SDK but that's specifically for customizing our chess pro so I just run time SDK for dotnet LED is about building native apps let's dive into a bit more detail about the SDK itself then so Jess SDK for net includes multiple api's includes API is for building applications for Windows desktops with WPF or windows presentation foundation an important note to call out here is it supports both dotnet framework and dotnet core 3-1 you can also build applications using the universal Windows platform API and also you can build applications for Android and IRS with Sam Urick with the xamarin api's we also support some written forms allowing you to build more cross-platform abstracted applications for Android iOS and UWP and of course as well as the api's we've talked about how this is an SDK we provide greatest SDK resources to make you more productive as a developer that includes IDE integration with project templates in Visual Studio toolkits with a set of toolkit controls and components documentation both guide concept document documentation and also API reference we've writes sample code and then building up through tutorials to help you get started quickly right through two fully fledged open-source apps and one of the highlights of the RHS longtime SDK for net is because we provide support for multiple api's and multiple platforms you can share your dotnet c-sharp business logic across Android iOS and Windows okay so after we've taken a look at an overview now let's dive into a bit more detail about the architecture of our chest one time so what I'd like to do on this slide is really provide you with an understanding of the context of the overall hot jazz runtime architecture and how the dotnet SDK fits in we build ArcGIS runtime functionality such as rendering data access analysis layers Maps symbols in a C++ library that we referred to as the runtime core it's architected and built support multiple architectures so 32-bit or x86 64 bit or x64 and also arm 64 as well we currently have a long-running project underway to support the new generation of rendering api's as well with an active project working on support for metal for iOS the resulting library in each case is then built for specific platforms Android iOS Linux Mac OS pwp and win32 as well so that's the RHS runtime core and then we wrap that runtime core in specific SDKs that provide you with a public API that you code against in the environment you would expect one of the key things to emphasize about this is that if we're working for example with the dotnet API and you're targeting Android iOS UWP that there's essentially the same logic that's running in that runtime core but exposed through the different platforms let's focus in on the dotnet SDK des and so I've talked about a number of the platforms that we support Android iOS ewp um windows and that means we're building or compiling the runtime core for 32-bit 64-bit and also arm 64 and both thought directx and opengl rendering point ones and then on top of that runtime core we expose that capability through through to you for a dotnet api's so those are for Android iOS ewp and WPF and then xamarin form builds on top of the Android iOS and UWP api's provide that abstraction there for you okay so we talked about an overview of the SDK and also taken a look a bit more detail about the architecture of the SDK so how do you get started but The Archers runtime SDK for dotnet well it's a bit provided to you as a visual studio extension or a v6 and you can install that directly into Visual Studio through the manage extensions dialog you can search the extensions that are available online you will find the arch s longtime SDK for net install that directly into Visual Studio and that provides you with project templates for each of the supported platforms those project templates reference the API find uka packages that are hosted on nuga to org you can also download the Visual Studio extension from the developers website our chess developer's website and it contains the same project templates for each supported platform but the difference between the two extensions is that the one you download from the art chess developer's website actually contains the nougat packages and will create a logo local nougat repo for you for offline development so the nougat packages that are hosted on nougat to org or the WPF API you wp7 Android salmon and iOS xamarin forms which has a dependency on the the previous nougat packages Android iOS and you WP we also probably the ArcGIS runtime SDK for net toolkit nougat package underdog org and the augmented reality toolkit a good package as well okay so we've talked about how you we talked about an overview of the API so they were included let's take a look a bit further of getting started so here I am within Visual Studio and I'll go to the extensions menu the manage extensions option and I'll set its retrieve the list of extensions are online and if I search for ESRI this is actually searching the visual studio marketplace and it's returned some of the key some of the extension that I already have installed so we can see I have the arch s runtime SDK for net augmented reality templates extension and also I just want um SDK for dotnet templates extension so you can see with that green checkmark I've actually already got this installed but I could install that directly now going through to create a new project then we'll see the project templates that are that are available and I can filter these by different categories so first I want to filter by heart GIS and then because we're specifically talking about windows in this session I have also filtered by Windows and we can see the three project templates that are included with the SDK that allow me to target Windows specifically so that's WPF it's on eight core though if you had on that framework and Universal Windows platform I'm going to pick the WPF for dotnet core project template and then just create a brand new application all that Visual Studio just open up that template and we'll see within the solution Explorer that initially there's a little exclamation mark next to the dependencies it's just resolving those houses resolve the ESRI ArcGIS runtime intoa PF API and it's resolved the extensions to dotnet core and windows donít call for Windows desktop perhaps taking a look at the what can what's contained within the template then in the main windows amel we can see that we have a simple framework for an application here but it's using a map view model that contains the map and we're binding to that if we take a look at the map view model then we can see the instantiation of that and that'll it'll return our map to allow the window to bind to that if I just run the application we'll see that it contains at this point just the streets vector base map so a simple application basic mvvm framework in the template but a great point to get started as you start your development the next place I would always go to think about getting started is the arch s for developers site if we take a look under the documentation we can see here our JS runtime SDK for dotnet and this site is you should really think about your starting point for development many resources are available here for you through getting started but also ongoing in your development as a reference for you to come back to so if we go to the getting started item here we can see a number of tutorials that are available for you and there's a really nice set of 10 to 15 minutes maybe up to 25 minutes for the new augmented reality tutorial that we added recently and these provide an overview of many of the common workflows that you'll go through when working with the API other content that's available on the out deferred developers site of the guide so this provides you with conceptual information about how you work with the SDK and the workflows that you'll go through and how the SDK interacts with the rest of the ArcGIS platform the API reference is available for you for each of the supported platforms and the sample code tab provides you with a description and the ability to view the sample code but also links to the sample code that we publish in a public github repo there's also a link here to the sump of your itself and that will jump out to the sample viewer that's actually within the Microsoft Store and we can download and install that if I get to the store application and just search as we we can see the ArcGIS runtime SDK for dotnet samples here and we can download the compiled sample application or I've just launched it because it knows I've already got it installed so launching the sample application then this is the sample viewer for the DOE PF API but essentially the same samples are available to you across all of the API supported by the SD okay if we take a look at one of the specific samples then the distance measurement sample and you can see 3d data coming in here this is a really nice 3d analysis sample you can see it allows me to measure distances in 3d there's many samples contained within here but a lot of what I want to highlight within this specific sample and it's the same pattern for all their samples is there's a nice description which tells you about the yeast case that this sample solves how to use the sample and relevant API types and also the source code so I can view the source code here within the sample viewer and explore all of the samples that are available to me this source code is essentially the same source code that's within the public repo and then finally the one last thing to highlight is just the support tab within the developer site and that contains links to discussions on GeoNet and also other avenues for support when working with the SDK the one one thing to mention included on the are chairs for developers site in that net SDK area are the system requirements of your development when you're installing Visual Studio one of the things you want to make sure is that you have the right workloads installed so these depend on the applications you plan to build but when installing for the first time hey why not just install every option you have and for the working with the.net SDK that would be dotnet desktop development allowing you to build OVF apps the universal Windows platform development workload for u WP apps mobile development with net that allows you to target the xamarin API and then dotnet core cross-platform development as well so installing those four workloads would allow you to build apps for all of the supported platforms that the ArcGIS runtime STK Fernet supports okay so we've talked about an overview the architecture getting started now we want to dive into some of the enhancements that we've made to the SDK over the last year so first up is a look at the toolkit the toolkit is a really popular component that many of our users like to work with it's been released we've had successive releases in parallel with releases of the API but we had a major release of the toolkit just in February this year 107 release and some of the highlights that were included with that our support for dotnet core with WPF so in parallel with our support for dotnet core with WPF in the API we enhanced the toolkit for that we added a new bookmarks control so in building out their functionality within the toolkit with that new bookmarks control we actually undertook a complete rewrite of the legend control and also the table of contents control that's currently in preview we added support for dark mode on iOS and we added a new dock effects based website with API reference and concept documentation so this was in response to direct feedback from you our users that you wanted additional documentation about the toolkit and we'll take a look at that in a second over time we're planning to migrate that same content to the ArcGIS for developers website but because it was based on your feedback we wanted to provide that content to you as quickly as we could in the best way we could we also as past the toolkit we enhanced and provided an augmented reality toolkit so that's a separate extension when I initially looked in Visual Studio at these extensions that are available in the visual studio marketplace there were two one was the ArcGIS runtime SDK for dotnet templates and then there was a similar extension but specifically including the augmented reality templates okay so let's dive out and just take a quick look at that documentation website on the toolkit so this is the toolkit repo public in the within the ESRI organization on github and we can see here there's a nice link at the top which would let me jump straight to the documentation and there's other links provided within the readme there if I go straight to the documentation here's the doc effects based website and one of the things you might want to do is look at the API reference and if we for example look at the dotnet core API reference and I'll drill down into one of the controls so perhaps I'll choose the new bookmarks view control that we just added here we can see the API reference for this control one of the really nice aspects about this documentation that we're really excited about is the fact that over here on the right hand side there's two links one is view source and if I click that these source link that actually jumps straight to the specific line in the source code in this public a repo for the source code for the bookmarks view if I spotted a problem in the documentation I wanted to provide some feedback I could click improve this doc and actually that would start a new PR with a with a proposed change or a proposed update to the documentation so you could actually can't help us contribute to the documentation okay so that was an overview of the the toolkit enhancements that we've made now let's move on to look at performance so in in in the past year we spent a lot of time on really trying to focus on the performance of of the runtime for net and and so we've seen some huge improvements over time and we kind of want to share a little bit about what we're working on especially looked at like key key features that was was causing performance issues for people like when they want to work with hundreds and thousands of features and try and squeeze as much performance and memory memory reduction as possible especially when working with something like meta has a garbage collector is quite important let me don't actually allocate too much cuz it just gives the garbage collector more work to do and every time it needs to clean up it actually stops all processes and while it's if you only take milliseconds they can kind of affect your performance of your app so we have some graphs that I kind of want to just share to give you an idea of like the the improvements been doing over the last few years and so here's just a set of graphs and work on the graphics and what you're looking at is that the the green the green bars represents execution time as a relative value so one means basically what we the the reference like the first release and then the light green ones are allocation so if it's lower than one that means it's faster for the green one or less memory allocations for the light green one and for instance our value 0.5 mean is twice as fast or half the memory and so you can only see like over time especially in the last few releases these values really start dropping down like getting attributes is more efficient memories going down and you see a few numbers your opinion for updates of having shipped yet so these are preliminary numbers we actually have some stuff in progress that might even prove these even more so we're very excited about these you have another example here of just working with geometry and you can for instance see like how creating points went down pretty quick in the early on and now also allocations for creating a point has gone down by around 60 percent you would even see something like in the first charge to see that it looks like there's a whole part missing with update 8 but it's actually because we went completely allocation free so there's no memory allocation for setting graphics geometry apart from of course crane and geometry same thing for spatial reference it also looks like charge I'm missing but reaction what we did was made it 400 times faster so the bar is not even visible here and it's also went completely allocation free so while this was a very very very fast operation already it does have a small impact across the board for anything that was working with geometry and use spatial references just here's another example of of currying feature tables again querying lots and lots of features we get reduced memory increased performance by a good 60% or adding 40 to 40 thousand features of the kind of extreme but not uncommon again we have made this a lot about twice as fast and the memory consumption is going down as well it's an instantly one - like just pure mat startup time like how long does it take from you add your map tribute to is X percent on the screen every one dove of course it's the services service tired of time and again here you see like we in this specific case we went from half a second to quarter of a second on this specific machine so about twice as fast as it used to be so something that's a performance improvements we are really excited about and will continue to do throughout the year the next thing we like to talk about is is done in core and so for update 6 we added a previous support for dotnet core and by update Sam and we would kind of finalize that and hello full support for dotnet core so don't even live in more into this a little bit more so one thing to note about done the core is it's sort of like a new version of.net framework it's built completely open-source and it's cross platform and it's been around for a little while for a Russian one and two but this mainly been focused on on stuff like HP donut websites and so on so mostly for server types of things and could run on Linux and so on we did with dotnet cores 3 and now 31 there's been added support for building EF and windows forms apps as well and one thing to note though that even though done in core is cross-platform the dollar Kevin WinForms pieces to that are desktop only so they only work on Windows and so the same thing goes for our support it doesn't mean that we have cross-platform support here but what's really exciting about this is if you're working with a customer who is currently limited by updating the dotnet framework they might be oh I'm still running on net four six one that means that you as a developer can't use any of the new features in dotnet framework and you're kind of forced to be an older version because it's it's can be tricky to ask a customer to upgrade all their machines to the latest greatest because it actually affects all the other apps on that machine and until you might have certified all those different apps to run on that framework you can't just go and update this a definite course salt solves this by actually allowing full side by side so you can install them in course 3 1 + 300 + 2 1 and so on is for side by side and any apps that are friends it's built for dotnet core 300 would not be affected about you installed on the core 3-1 because it was still running trail runtime and so it gives us an ability to kind of actually pick as a developer the best platform for our application rather than worry about what the customers have and actually you don't even have to worry about whether your customers have done the core install because you can actually do these completely self-contained applications where that Nick or and WPF that gets shipped with your app so there is actually no dependency whatsoever on the customers computers except just having windows on it one thing to note if you do that though if you deployed Nick or with it you also take a little responsibility of updating dotnet core so if there are security issues and so on you have to also take that on if your installed on the core server install this stuff will be serviced through Windows Update but they also done the core has a lot of performance improvements really an example of just depends what we did this is a very simple things - just creates a point and this one is actually mostly meant to like just hitting our interrupts amigos calling into native code and we're seeing about it improvement of 52% of the specific use I was about twice as fast for interrupts : and while these members are in microseconds so overall that probably doesn't matter too much for you to have but it does add up when you start having a lot it can add up because you have a lot of entropy of code but there's also lots of other places where it doesn't core is improve performance another thing for technique or is that we have a new way to activate single file executables so instead of having a folder full of dll's and the exceeds and images and so on you can actually compile you have down to one single file just money exit you double-click and you're up and running and that file can also still include all technic or almost double here all of the actors runtime and so far and it's just one file it's a pretty cool thing to do one thing to consider this is shipping with everything and on the core and runtime as a single UC is about 250 megabytes so it does add a little bit of a size but had you done it's not really much different action than doing self-contained ever you also get full Shi sha rate support and so what that means is dotnet framework today does not have full C shop-made support which is the latest all the latest language I have some of the features but not all of them we're done in core you get all of it and that also means you drill out to create more more performant apps or you some more or better cleaner code as well and again dotnet core is gonna continue getting enhancements doesn't it core 3 ones the next version is like to call dotnet 5 they're skipping forward to avoid confusion with dotnet framework but it's essentially the next version if you expect in November 2020 it'll also want to write ahead of time compilation that are encroachers and clean increases just startup time and so on but why would you use done make or like should I move my up to doesn't in core and one thing to consider is a dotnet framework for 8 which is the latest version is also the last version of.net framework it does not mean that it is out of support or anything it won't be supported as long as Windows is supported so it's not going anywhere but it's also not going anywhere in the sense that you're not getting anything really new you'll still submit security figure that you'll get security fixes and critical bug fixes but it's kind of like almost parked add like just a maintenance mode at this point and you'll already see that the core has several features that you just don't have an inductive framework here's a quote from the from the from Microsoft themselves that is saying like if you haven't haven't done it framework continually listening it's fine we fully support you but if you build a new app please consider using doesn't accord this is where things are going you might also want us to consider moving your existing out to dotnet core if you're planning on maintaining this app and expanding on it for a long time and so you can get all those latest improvements another thing I actually like about done of course is fully open source and that actually allows you to use some a physical source linking that so the the symbols that you get has actually reference straight to the code on github and so if you want to step into the code it'll actually autonomically download that code from github and you can better understand how to the core is working understand why you're a besson it's something that we have had a lot of benefit of to better understand like why our code not behaving the way we expect it to behave making kind of better understand well what cost it to behave this way in the underlying framework of net or WPF we also see that because there's open source they take community contributions and the last thing I would have to leave the number of contributions from the community was about 30 percent of everything that's going into dotnet core so it's very rapidly developing that way and so a small about that is maybe not important the highest priority for Microsoft to fix it might be important for a specific customer and they might go and make that fix and take the time to do that so it's very very exciting but what if I do want to move my habit I go have it done in frame recap and I'm maintaining this for a long time and I want to get some of these cool new features or maybe there's some ability to improve performance so one thing you can do is start with this you can go to the marketplace and install this thing called the dotnet portability analyzer and that'll give you an idea of how easy it's going to be to port your app to dotnet core that's the first step you would be doing and so when you do that you actually get this little context menu on your project that you can see analyze project portability and it'll give you a little report you can also do this API port tool and this is more of a command-line tool and you can run against an already compiled app and analyze all the dll next season you have and basically view and a similar report for whether your app is easily portable to your done the core here's an example of such a report that I ran against a specific app and most of those like guys typically support it but in this specific case for instance stuff like the Geo coordinate watch it was we use for forgetting a GPS locations were not supportive and the reason for that was actually it's based on around some deprecated Windows ApS from getting location and this is something that the runtime actually hit then we were trying to move you can actually see in the column that it says that doc just runs on dealers the one that had that problem so so we had to of course to move support on the core we had to actually change our location display to use some new location you guys you might hit a little bit of this where there's a little bit of work involved in importing but for the most part of be finding most things working getting for the runtime this was actually the only big thing hit it was this thing and we using some old web focused ap and I said I've been cleaned up so there's typically other new AP eyes that are better to use for that scenario another thing you can start considering doing now is if you have a class libraries make those classes class languages that use Dutton standard we do support the understander with the runtime as well so anything non UI is fully done in standard compatible and so the more of you do that the easier it's going to be to move and a site Pinner for having some of your business logic and type in the standard libraries you also get to use it with our samurai offering so you can build serán apps and reuse some of your business logging in your iOS and Android apps which is a really neat feature to have I want to call out a little link to this this blog post here literally talk about how to do some of those things to do up to a port of your app so we're gonna talk a little bit about do a little demo of this so I have a little app right here and this is a total done in framework app there's nothing special about it if I look at the project file here's the the wrong project file you've probably seen something like this it's a lot of gunk of all sorts of stuff information yeah that's kind of hard to maintain you Tim would maintain is inside Visual Studio instead but you can see that it's for 72 Evan case and so the first thing I'm gonna do is the ones you cannot actually port this at so I'll just right-click and say portability and less portability and this will actually then analyze everything that might have is using and generating myself a little Excel report that I can open here and this was given it here how what what problems we might hit and so in this case it's actually saying that Doug lecour Plus platform extension is 100 incompatible and duck neck or who's actually in southern course 3-1 it's a little misleading name it's also hundreds incompatible without the platform extensions and I'm a little over 80% compatible doesn't standard which is ok because I didn't plan on moving it under standard but it does tell me that maybe I should consider moving 80% of my coding so it doesn't send the class library and then get some details in here what was it that was not supported on the standard so typically this is we look at all these API is it's calling out these $1 kpi's which are not supported by dot in the standard but you see for instance that doesn't in core 3 1 plus is fully supportive dot Nick or 300 plus platform instead of a 3 ourselves was reported at this point 300 is actually not even in support anymore so it really just focus on the 3-1 and that's also what we require with the run time so what would it take to actually port does that and there's a little command-line tool we can use and it's called try convert hello i'm install this is a direct tool and i have that on slide how to install it but i'll basis say try convert and i was a project my map and I always said hit enter and it's gonna go through and actually basically me just touch my project file and so if I go back here it should say real Oh yep and at this point hopefully my app will be done the core app and I can actually now right click here and say edit project file which you cannot do with a dozen affirming project like it edited here live and and I'm not having to reload your whole project and I so here's the new project flashy it's much more succinct I actually know for a fact that I you don't need these I'm sorry the try camera does the best guess I do have to know this actually converts by TiVo to done the course through 300 and as we require 3 1 I'm going to go to three or so you might this yeah there's a little warning but if I had saved this should hopefully go away and just sexy at that point that okay now we're fully compatible and I should now be able to run Miami stud Nicole and that is really all of us are quiet of course I was logging in this case I didn't hit any if as it wasn't supported but I'm generally finding it hasn't been much issue and so here they have us running and one thing I want to show you is that I put a breakpoint in right here and I can see all this sam'l stuff here so what I can do is I'm say maybe I want to load these symbols so I might click this system sam'l one and understand why did this get here and now I can double click any of these messages and when I double click hey do you want to go download the source and debug this and I pulls it right from github in this this is what I was talking about early like your act because it's open source I can now actually see the code that was used to generate this is not decompile code this is the actual code that was used to compile and it's pulled straight from github on demand so I can start stepping through and click another one it's gonna ask me again a really cool feature that that I really love having able to do alright just continue to run and I should hopefully just have my app running on down the corner like that so another thing you can do if we're done the core app is I can publish it and if I click my click publish it is also a slightly new feature it'll take me through this publish workflow say do you want to get I'm gonna create a 3-1 prior profile here and so I can go and change some of these settings so first I wanted to a release of course and target if that name core app of course but then the deployment mode is sort of interesting so if I have Doug lecour installed on my useless machines I will just pick framework dependent and it'll just deploy with the ABA's and reliant on the cores already installed but I can also so self-contained and so what self-contained is going to do is take all of that in the core that is needed and I'll get as well and copied all to the output folder of the publish folder I can choose with architecture and kid only these two will work because I'm using WPF so I can't really use the other ones at this point but I also get a few more options here I was talking about how you can make a single exe and you do that right here your basic chip that one and it takes everything it compiles it into a single I think in this case 250 megabyte file of course we don't do self-contained it's a lot smaller Akkineni providing to run which is actually based on pre jetting so should improve your startup kind of time significantly and it's also a preview feature here that trims your assemblies and and what it basically does is that the compiler tries to figure out which assemblies are using which simply that you're not using and then tries to strip out anything that's not in use it might make a mistake I have not seen it do that yet but that's probably why it says in preview so of course test your ab really thought really that it didn't but in my my test case this typically cuts a good 60 megabytes off your deployment so a really neat feature so I I'm not gonna do this here because this takes a little bit of it takes a few minutes to run this whole publication you say except especially if you do linking ready to run and produce it it adds the time I wanna do want to cover is a slightly different way of deploying your apps so I want to cover a new type of project and so when I'm wondering to apply my app one of the things I often struggle with is how do I get this app installer my machines on how do I update it and for those of us who we used to work a lot with Silverlight was one of the great things as you went to the website and the app is always up to date because that was that single place it was it was build against and with the new Windows application planning project you can actually get some of those same features so I'm gonna create this project I'm gonna call it maybe mine Matt that I'm going that this is also referred to as Emma's I actually probably familiar with MSI installers so in as I exit sort of an evolution of that and so it crazed this new project and I'm gonna add my application to that so I'm gonna pick they had a reference to it and that means that this installer should be installing that application I get a package manifest where I can set all my app icons app names and so on and so forth but I got to go to publish here and I can create app packages and if those have done a UDP app you're probably already familiar with the app manifest and the publishing but detector so it's very very similar workflow that you get with them in psychics but in this case I'm doing it doesn't accord this however does also work down this framework but so here I get to up into a mixer story if I'm planning on put is in store I can create a store app or I can create side loading and I want to call out the attention to the enable automatic updates it's a really nice little feature that you get with more recent versions of Windows another thing we have to do is we actually have to coach sign these applications if you don't cosign you get kind of a warning and it might make a little tricky for you users try to install these app so the best thing is also get a co-signing certificate to to sign your apps but again you should always be citing all apps anyway right so now we know we can guarantee that this this app was built by me and so here's again here's what my apps gonna be I'm just gonna copy this location for use in a minute and maybe I want to build just a 32-bit release I can do both if I want it and then we can just install the actual specific application but this will install a self-contained app for you and so the next point is because I chose to have auto update installed I can actually say I'm planning to publish this app on maybe my server calm slash apps and so the app can then say every time the app runs check that location and see if there's a new version available I can also change the tool and check every check every hour for instance or so on I can also just if I'm on an internet and it's just for internal users I might want to set a website up I can't really just say like my servers laps less something why I was going to be and so you can also do it as a network share for internal use which is all the neat way to intuitive deploy and update your apps lastly I can exit just put in the folder where the publish is going to happen so the apps going to go there and I could create however in the interest of time again it's gonna take a few minutes I basically already flicked the create button and the output actually comes something like this here's my my app I install and here's the app installer if I double click this the app will install there's also an HTML file that you can put on your website so something like this and I can they just get the app of course you can change what this looks like if you want machines to layout a little bit but this is gonna create this installer experience and it's even a trusted app because I signed it and so I'm gonna take install and what this apps going to do is just installed it in you know in a single location and something that's really special about these apps they're sort of virtualized and where they're being put in what they can do to your system so let's say this app makes rights to registry it's something that can kind of really mess up your system and so what it can read anything from the registry that this apps allow to read from but if write to it is actually written to an overlay so any any rights but I cannot go into the real registry and go into sort of like a fake overlay that just this app read sense so it can't actually miss any other apps off so it's a very secure so here's my app running and I like to get a nice little new app cons caught my AK my mother and like want to change my icon it's not the prettiest one but that's the default you get and so if I were to go here I'm gonna right-click this and I hit uninstall this app will remove anything it did to the registry anything it tried to write you like you're a Windows folder which it probably shouldn't be doing but if it did they won't miss that up so it's safe to uninstall I've heard of cases where the companies are not allowed to uninstall any app because it could risk breaking other apps because they remove some shared component so this actually solves the solution in this problem but let's say I had I want a new version I didn't really like the base map so I kind of prepared a new compilation version 10.1 and I'm just gonna copy that to my update location so imagine that I just build the app and I published it again to my my location to that folder and so because that set the app to update every time I I run the app so I don't click on I run these app that's gonna go and check that locations like hey do you have any updates and you might know that no notice that the map doesn't actually look any different it's still there like great base map but at this point it knows that the ethanol has updates so if I do it one more time and I want you to pay - change - right under the my map app what's gonna happen when I click it you're gonna see a little progress bar right there real quick and it just updated the only thing I did was to copy the new version into that folder and the app automatic did it so you just put that update on your website or in your intranet server and you can instantly have everyone in your organization having the new version and again you get you can set it to just update every hour in stats instead of every time you run but if you get prices really neat way of updating apps to your with your customers so I can really really recommend doing something like that so just a few resources I want to share again there was a done net portability analyser that's a little shortcut link here to it but you can also find that in the marketplace I'm used that try convert tool it's a dotnet tool so you would go in a command line I'm busy just write dotnet tool installed hg try convert and after that you get this try convert command line tool again there is this link to this blog post I want to recommend you read that we'll talk more about how you port your apps to Dante core from dotnet framework and I also want to call out this the special that this session that was recently published on YouTube and it really talks and much more about modernizing your apps by moving sonic or doing this this packaging go much more into detail in that and as well as building like your continuous integration there's a really great session to learn if you're more interested in some of those things excellent so we've just talked about some really great enhancements that we've made specifically to the dotnet SDK over the last year we took a look at the toolkit specifically the 107 release and including the new documentation site for the toolkit we took a look at performance improvements that we've made to the dotnet api's and we just took a look at dotnet core support with the OPF API next we'd like to move on to a topic that applies across all of the ArcGIS or on top SDKs but we felt it was really underused and under-recognized new aspect of the API that we've been working on over the last year not just in the runtime but actually across our TAS and that is the area of advanced symbology so what do we mean when we talk about advanced symbology well really it's just the symbology model for arcgis but it's more advanced than say picture marker symbols that you might be using today with the api and all of this and symbology is based on the cartographic information model also known as sim so this is a public publish specification for content cartographic content these used to persist so save and transfer these kata graphic descriptions we talk about cartographic descriptions because it refers to maps two layers and two symbols and so specifically we want to talk about symbols today but it's important to remember it works across the ArcGIS platform whether using runtime art just Pro or you're using services or even the JavaScript API and it's represented as JSON and you'll see some examples of that as we go through the next section of the session so I mentioned symbols based on this cartographic information model so I'll talk about sim symbols and these symbols are contained within style files so style files are a database of symbols that allow you to store manage and share collections of these Styles Archers pro allows you to create styles enough just runtime can consume these styles the symbols are composed from one or more symbol layers an each symbol layer has visual properties and a house geometry so we care about the symbol layer having geometry and the symbol having geometry is that we can vectorize the rendering of that which means we get really beautiful crisp rendering of the symbols on any device any resolution the runtime api contains api types for working with these new these new symbol layers as I mentioned the multi-layer symbol type on the slide there there's a range of API t.i types under that area from working with different types of symbol layers and one way to think about this is the replacement for the composite symbol so for example in the past where people have tried to display some text with a circular background perhaps they've used the composite symbol to provide a marker symbol of a specific size and then a text symbol as part of that and assign that single symbol to a graphic or a feature and the multi layers symbol approach is really the replacement for composite symbols and the nice thing as I said about the multi layer symbol approach is that it works across the artists platform composite symbol was something that was only available in RJ's runtime there's another note on the slide there that these concepts support the dictionary renderer so that's really an advanced version of of the sim and the style file and the symbols that are in their dictionary renderer contained additional logic that allows you to assemble individual symbol layers into one of these multi layer symbols that are specific to a set of criteria so now let's take a look at a demonstration of creating a symbol style picker without just runtime but first we're going to start off in our chest Pro so to provide you some context for the demonstration we're going to start in our jazz Pro here so I've got a relatively empty project I've just got one layer within my project and it's currently symbolized with the default symbology when I added this shapefile to Pro here if I right-click and get on the context menu choose symbology instead of this default marker symbol on the symbol dialog I can see a number of different symbol options that I can choose from crucially these are from the ArcGIS 2d style in our chess Pro and I could obviously apply one of these styles to that so where where is this style and not just pray well if I switch to the catalog pane under the Styles here we can see the ArcGIS 2d style in our chest Pro and if I right click and manage that style we can see that same list of styles here and looking at the square that I applied to my cities there on the right hand side once I've selected that you start to see some of the properties for this I switch to the properties tab we can see the appearance if I select the layers actually you can see that this single symbol is comprised of two of these symbol layers so there's the red background and then there's the black outline and the central marker so these are symbols within a style in our chest Pro how would I grip how would I get those two out just one time well what I can do is in my style item in the catalog window here I'll choose new and their new mobile style so here I'm going to create a new style called Mike I've already got one that's called Morton there so within my Mike style if I manage that style currently it's empty it's a brand new mobile style if I switch back to the my art chest 2d style within our chest Pro and select all of those symbols right click and copy and then I'm just going to paste those into it might stolen now I'll accept that in some cases there may be some subtle differences between our chests Pro not just run time and there may be some subtle aspects that are downgraded during that transfer but you can see it's pasted in all 266 symbols from the arch s2d started not just pro to my art Jess runtime low bar style and I'll just now share that with my colleague Wharton and he can continue the demonstration right so I have a little project here and I renamed his mic style into something a little more meaningful for my scenario sorry Mike but it's better just the same file and as I just added this as content to my existing app and I'd like to try to use this so I have this very simple app it has like a feature layer with a symbol renderer and just a base map so the first thing I want to do is actually try and load this I'm just gonna paste a little bit of code in here I'll walk through this real quick so I have this load simple method which gonna load almost symbol so in my constructor I'm just gonna make sure that happens and so it basically just points that file and I just have in my solution Explorer and the first thing I'm gonna do is from that style I'm gonna just get the default search parameters and so these search parameters if they don't modify these it base is gonna give me every single symbol in my my simple style and so I'm just gonna search it with that phasing these query parameters and I'm gonna get this collection of symbols that I assigned to this little this time here of symbol style search results and I'm just gonna raise the property change notification that I change this Oh myyou I would realize hey there's new symbols available I should probably refresh my view I also add a little selective property like the symbol properties so if I want to select a symbol I could then set this a value and then if there is if I said show Saval you set the render or symbol that I have in my feature layer to that symbol and so I'm just gonna switch to my to my view here where you're already set up it can already set up my view with two columns so I'm gonna in the first column here I'm just gonna add a little bit of zamel and so here's just a list view and the list view binds to that collection of symbols that I just defined and also have a selected item that sets the selected symbol and this is two-way so it goes back and if I select something on the list you by clicking it it goes and sets it on my view model that then sets it on the render and hopefully my mental update for each symbol I'm gonna render the name so that I know this search result has a name property so I'm gonna bind that and I'm also gonna use a little control this is vice from the the toolkit that we talked about earlier and it has a nice little control that just takes a symbol and allows me to render like a restaurant version of that simple so I can see what does it look like and so considers more like an image control that that takes a symbol and then renders it okay so I'm gonna run this sample real quick yeah it's compiling it's gonna start up and hopefully you will see my map with my feature layer my beautiful red dots but now I also have all these symbols right here and you might recognize some of these symbols that here is the one that Mike was using earlier it's a sec same symbol so I can now change and change the different symbols in fact let me go over or and my select a symbol and just set a break phone right here and click one of those and you now see there is a value which is the search result and it has name that were just playing a key in has a category called shapes there's a symbol itself where you can say it's a multi layer point symbol and there's also some tags it's black and red so this tells me various information about the symbol I can actually use some of this to search and and actually think this category is quite interesting because my list I feel like it's kind of big it's a lot of a lot of symbols to to try and find so I'm gonna try and refine this a little bit and so for my for my next little magic trick here I'm gonna change this little bit of code you can delete this and load my symbols a little bit differently so I'm gonna just paste a new bit of code you know it's basically the same method so again I'm still doing the open async on getting the search parameters but in this case I'm just gonna get the categories from parameters and so when I get these default search parameters this property is there's basically a list of strings that represents all the category that are available in my style and I'm gonna sign this to that to this property I have again notify my v-model that have changed and then I have a new project called select a category and so I'm just gonna set that to the first category that I got back so in my selected property I'm basically just set that buddy's know the right change but I'm also gonna initiate a load of that category and so this code is essentially identical to what we had first for finding all the symbols but in this case I'm getting the default parameters I'm gonna clear all the categories because I don't want all the categories back and then I'm just gonna add that one category that I selected and then this is actually the sex same code I'm gonna select the symbols and just raise that probably changed it's the only thing that's left to do is to add a little combo box so I'm gonna is here I already set this up for two rows so I'm just gonna paste it in a little combo box and this combo box is just gonna bind to all the categories and again selected item just advise back to the selected category this is two-way binding and with a little luck I will now have a category picker as well so now we see a combobox here and this is shape and this list is a lot shorter and though I can pick a different category and it's gonna trigger that code set in the category load the symbols for just that category and you see them right here and then I can take different symbols so let's say for instance you set a breakpoint here let's take a little bit closer look at this symbol and let's say I'm gonna pick this campground which is based kind of a sharp gray circle my background with green tent and so if I go and inspect this quick lunch and open it so I gotta get my campground symbol and let's drill into the semblance he was in here so I see it has a color which appears to look like something that's green something about right it has a size it has some rotation and stuff but you also see those symbol layers that Michael showed a pro is actually represented right here there's two layers so that's probably my circle and my tent and so grant Dillion more I can start seeing stuff like I know this simpler that's mark assemble elements it has a victim artists simple element so it's a whole geometry you actually gets the geometry that is most likely just a circle that it represents and also see something like is color locked I'll get back to that a minute but that kind of controls whether this color up here on the actual symbol applies to the layers below so if it's not color locked this color would kind of force its way through all the sub layers so if I go to a different layer I need to go to that to that tent I'm assuming it's a tent you see this is called a lock the false which means that if I were to change this come up here it would apply it to college down below here so it gives you an easy way to actually just change the color of some of the symbol but not all of it and but of course you can also change the color at each symbol level so this got me an idea if I can create symbols like this and there's a whole object model I don't necessarily have to use Pro Pro is a great way for creating a set of symbols like this to have as kind of a set of resources for your app but you might want to be doing something more dynamically on the fly in your app so I created a new app where I call this later and I just see the how much kind of actually added runtime in real time so I built this little simple app and I basically just have your in case there's a little clash break render so I can right click this and this is using the table of contents control right from the toolkit and I'm just gonna view the symbology and so here's my it's a unique values render and let's say I want to change the red one here I want to look at that one and so here's base mess and MOSI that's a red and white that's the two layers and I have this symbol right here and this is actually nice little trick I'm using the map view control to do this but just rendering a simple feature and I turned on reference scale so when i zoom in the feature halls assumes and gets nice and crispy you can see you know and assuming this much it's still nice and crisp it doesn't get blurry at all of course I can change I can change the size right here and rotate it a little bit I can also drill into these layers and so let's say it changed the color here to blue nothing actually happens so the way to do that is I will go into this things that you can actually notice that this layer is color locked so I'm just gonna change that and I believe if anything pull further down there's more color looking I'm gonna turn all that color looking off I know if I said this the color you should change so now I can actually get just the simple problem she changed my my symbology here's the house maybe I want to make that a little bit bigger smaller maybe I wonder because it's kind of a damaged house maybe I want to tilt it a little bit because it looks like it's now destroyed house if I really want to destroy it I can actually go all the way to the geometry over here and so here's another little trick this is actually a map control with a white background and I'm using the sketch editor to allow me to freehand style my own kind of broken house oh this this seems like a kind of broken house good except and now here's my new symbol so I better just you sketch in order to draw a new polygon that I then using my symbol I can accept that accept that and then it's apply and here's my beautiful new collection I might want to change this one and so I could also go and say I want to load it from a symbol style so here is essentially the symbol that I have it seems to actually just crash there's probably a bug in here but it would basically do the same simple simple layout or one that was not the app move and try again I'm not sure why that happened so let's try and modify this this time nope that is still crushing it's open source and I'll share the source code a minute we can try and we can fix that I keep going the wrong way I do want to show one a little more feature this little app that you might find useful so I can try click this simple I'm gonna save you Jason so this actually gives me basically just called to Jason on the same line and give you the full JSON representation on someone you'll see the marker graphics you'll see the geometry in here all the information that I can copy that I can even copy his code and go back to my app and say I actually want to define my symbol like that and I actually have C sharp code I can use right there and there's no symbol then I it's a simple way I could do is I can go and actually do a search for place in some of these maladies and actually quickly modify a symbol on the flight just by actually modifying my JSON so it's a quick little way to actually do much more advanced symbology and in control yeah I'm more dynamically this way all right so again the source code is available right here it looks like I need to make a few improvements for a little bot right there but you can go and download it from github today there's actually a bunch of demos in this repo that I recommend you checking out simply there's just one of them there are stuff like doing indoor routing and measurements and so on so forth that I can recommend you looking at I even publish this as an MSI X so you can just like I've showed earlier you can actually go right here and just install the app but I recommend due process source code there's a lot of controls in there for doing simple editing if you need something like this as well and just to finish up we want to talk a little bit about what we're probably gonna be working on this coming year and this is of course all preliminary but we do want to give you a little heads-up and something that we want to welcome talk about and hopefully next year to have something you will probably see some of this in action but the first thing we actually work on hard and we always started a lot of work on is the ability to call nullable annotate all our API and so what that means is there's a new C sharp feature or this part understanded to one so you can see this internet core as well as G sharp 8 and it allows us to basically tell you whether we allow you to pass in a null or not so you might have hit the thing we get an all roses exception or I commit no exception because you got a note from somewhere and that null got sent into your code into our code and it didn't like it very much so we'll be able to tell you whether we allow nails but also whether we were returned miles and so this kind of lot of work but here's a great example of this how this could happen like you might have some breathing code like this is like it's basically sumed to a layer I get the full extent of a layer and it's a assumed to that then that code looks great and a lot of my testing this works great and then your customer in one day calls and say hey we have a time I click this zoom to layer it goes boom I have crashes and you didn't haven't seen this in your case but might what actually really happened was that this layer didn't have a full extent maybe because it didn't load there is a network issue or something so we can actually annotate it and if you had a null ability turned on your compiler would actually told you hey you were getting something that might be no but you're passing something that might be null into something that does not ever allow it all and so you have a potential of crashing here so you might know this whenever being all and you can then force that through but it forces you to think about all these different edge cases and so the way you would typically fix this is you would pay to just add an old chick and the code analyzer in in.net is smart enough to realize well at this point we already did a null check so we know it's not going to be null and your code is fine you might want to write your code slightly different you might know we want to have a zoom to layer option if it's null but it it sort of forces you to have much better code quality and so at this point we've been doing this a lot internally in our internal source code and we are starting to do this on the public API it's gonna be a long process it's a lot of API for us to annotate so it's gonna probably take us all year so in the next few releases you might start seeing nullable annotations in our API so if you were to turn this on in your app you might see some of it it is not complete it's not it's you consider that premium like go with the journey with us it's gonna take us a while and it's gonna take a while for all the other class libraries out there you might be using to do the same thing and it's not really super useful until all your dependencies actually supports it so but Nikora has this full support but not all maybe not all the class level you might be using has it so this is a work in progress we are finding so far we're finding weird it's case if we never thought about could happen and so it is improving our insurance source code and you would already see the benefit of that an update that we should see more stable just because of this is pointing out its cases that hasn't been thought about and then same thing will be for you that'll probably help that later this year we expect up at five to be shipped and this is a very very exciting assignment for us our announcement for us what that means it's gonna take mono that be used for Sam run iOS and Android it's gonna take detonate core and also in the future hopefully the uwp platform and they all gonna be running on the same version of.net it's not all these different flavors that might behave and act slightly different it is just one net and is referred to as dotnet five the one way to think of time to five is the next version of time in the core three one plus a lot of the stuff that mono has to offer merge into one new four work so this is very exciting and something we hope to be able to support hopefully shortly after it chips actually at this point we don't even see a reason why the occurrence update seven wouldn't work on it but there's Stefan something we're tracking and but until we actually have it in our hands we might not be able to fully support it yet but I know that's something we definitely are tracking right now another thing you find really interesting that's coming this year is this cause of a new you when you ia P I and so this is basically the UI firming and that is new WP personally I really like that ap I feel like it's a much more cleaned up version of WPF it's much more performant it also it's better for your memory on your devices so if you have people on tablets up in the field like the best memory our battery performs you get it can feel really important but you know P has this slight disadvantages is that it also runs in the sandbox and that's actually an advantage in many cases but for some people it might not be but it also means if you only use the latest version of you WP again you're requiring your users to be on the latest version of Windows and so when you eye is taking the entire UI framework and you don't be and pulling it out of windows and be independent of which version of Windows you're running as long as it's been doze 10 but it doesn't have to be a specific version of Windows 10 but it also allows you to to run it on top of dotnet core as the win32 app and not as a sand bar graph so you get to choose where you want to put it so it's something that looks like to be the future of UI and Windows in general one thing to consider gif is 15 or 20 years old at this point and it's based on a much older DirectX technology so this is very exciting for us we're also looking at adding support for metal in iOS so that's a OpenGL is essentially deprecated on iOS so we were working on that tour this year and hopefully later this year will fully support a metal on iOS as well that our salmon SDKs so that's some of the stuff we will keep us busy for this coming year and when that we're just gonna end it we encourage you to just continue discussion on Geo net and post any yummy questions there or even on Twitter I'm pretty active there if you want to reach out but that unit is also a great place to post your questions check out the tool kit github pull sure bugs there as well if it's specific to those we all the entire team is trying to be very active in both on Geo net and Stack Overflow and on Caleb as well so yep and yeah with that we'll wrap up the session thank you very much for listening there's also a note there about another recommended session that's is really a partner to this session that today we've talked about booting Windows apps this session talks about building xamarin apps for Android and iOS with the dotnet SDK thank you very much thank you
Info
Channel: Esri Events
Views: 2,514
Rating: 5 out of 5
Keywords: Esri, ArcGIS, GIS, Esri Events, Geographic Information System
Id: m6ZR1DuYlrQ
Channel Id: undefined
Length: 72min 30sec (4350 seconds)
Published: Tue Apr 07 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.