ArcGIS Runtime and Xamarin

Over the last year there have been a number of requests from developers for information regarding Xamarin technology in relation to the ArcGIS Runtime.

Xamarin is attractive to many of our developers because it allows them to leverage their existing Microsoft .NET development skills when building Android, iOS, Mac, Windows and Windows Phone apps.

What is Xamarin?

Xamarin is an evolution of the Mono project, which is a cross platform open source .NET development framework.

When Microsoft created the .NET technology they did two things; they defined a specification and then implemented that specification for the Windows Operating System. The specification they defined and subsequently published was in fact composed of several specifications. Microsoft implemented these and released them to the world as the Microsoft .NET Framework. Microsoft, Intel and Hewlett Packard then worked to standardize the specifications.   This was achieved in 2003.

Xamarin Implementation

The situation with User Interface components is more complex.   Xamarin Forms, released in May 2014, is a technology similar to Microsoft’s XAML to allow developers to capture a form layout within a visual designer.  Xamarin will bind these UI components of the layout to native UI widgets appropriate for the platform the UI is executing on.   Since the various platforms that Xamarin supports have very different UI capabilities, only a subset of UI controls are supported by Xamarin Forms. Xamarin Forms can coexist with native UI controls which are also accessible through Xamarin, although when using the native controls the UI code is not portable between platforms.

3rd party components that extend the capabilities of the operating system, for example the ArcGIS Runtime, can expose their capabilities to Xamarin by creating Xamarin bindings.  These bindings allow the Xamarin runtime to be extended so that developers can work with the capabilities of the 3rd party library using C# as if they were coding against the 3rd party library using the native language.

Using Xamarin binding technology it is possible (through the effort of generating the bindings) to access 3rd party libraries and OS APIs not exposed by default through Xamarin.   While possible it does mean that any code written will not be portable to other platforms.

ArcGIS Runtime and Xamarin in Practice

In order to expose the capabilities of the ArcGIS Runtime to the Xamarin developer Xamarin bindings would need to be created.   These Xamarin bindings must be created for each platform by binding onto the appropriate ArcGIS Runtime API for the respective platform.   The diagram below illustrates this architecture.

Xamarin ArcGIS Runtime

While this architecture allows Xamarin developers to access the ArcGIS Runtime, it does not present the developer with a way to easily write cross platform code since the differences in the ArcGIS Runtime APIs are exposed directly to the developer.   The developer must learn the specific ArcGIS Runtime API and then with that knowledge they can code against that API using C#.

We have prototyped a set of Xamarin bindings to confirm that the theory actually works.   The results of these tests are that this architecture does work.  However, we also learned that the creation of these bindings is a non-trivial task.   In addition, since the bindings map very closely to the underlying API, as the API evolves the bindings must be maintained, which is a process that can result in a brittle API.

Current ArcGIS Runtime and Xamarin Status

At this point, we have no plans to release Xamarin bindings for our native APIs.    There are a number of factors that have gone into this decision.

  • Sub-standard developer experience when coding against more than one ArcGIS Runtime API due their differences
  • Does not easily support cross platform code development, due to the binding requirements
  • Xamarin technology evolving rapidly

ArcGIS Runtime Cross Platform Development

We do support cross platform development with the ArcGIS Runtime.  Currently the JavaSE and Qt APIs support cross platform development, but only for Windows and Linux desktop systems.  The Qt API is currently being extended to support QML.

The Qt QML API will support cross platform development for all the runtime platforms.   Code written against the Qt QML API must still be compiled targeting the native platform, but code written for one platform just works when compiled for a second platform.   There are no differences in the Qt QML API between platforms, making cross platform App development with a single code-base possible.

To achieve this there are some compromises, for example, the UI controls available must exist on all platforms, meaning specific UI components that only exist on one platform cannot be used when building cross platform code.   However, for a large percentage of use cases the Qt QML API will be a good choice.

So while we do offer cross platform development options with the ArcGIS Runtime today, we would like to hear from you regarding you development needs with respect to Xamarin.  If Xamarin was provided as an option, would you use it?  How are you managing your cross platform development needs currently?   Do you use Xamarin today, and if so, how?


Euan Cameron

CTO, ArcGIS Runtime & APIs 

Posted in App Developers, Developer | Tagged , , | 23 Comments

Esri’s OSCON 2014 Wrap-Up

In July several Esri employees and developers were at OSCON – short for Open Source Conference – in Portland, Oregon. It’s a great conference for anyone interested in open source technology, and we’ve been going since at least 2011.

So, what did Esri do at OSCON this year? Continue reading

Posted in App Developers, Developer | Tagged , | Leave a comment

ArcGIS for Water Utilities – August Release

Esri releases new ArcGIS for Water Utilities solutions or updates existing solutions every month or two. Check out the August release of the ArcGIS for Water Utility Solutions!

Water Inventory Reports - The first release of Water Inventory Reports is a solution used to calculate network information for a utility’s service area or reporting areas. These reports can be created using the Python script provided on an annual or bi-annual basis to inform executives about network infrastructure. The following inventory reports are calculated and published to an ArcGIS Organization:

  • Assets by Material
  • Assets by Decade Installed
  •  Hydrant Status
  • Number of Laterals by Material
  • Miles of Mains by Material
Posted in Local Government, Water Utilities | Tagged , , , , , , , , , , , , | Leave a comment

ArcGIS for Server Administrative Scripting and Automation session at the 2014 User Conference

The ArcGIS for Server Administrative Scripting and Automation session at the 2014 Esri International User Conference provided information on how you can automate the following tasks:

  • Publishing and starting services
  • Applying permissions to services
  • Monitoring services and databases
  • Determining popular extents for the creation of caches
  • Dynamically adding machines to your ArcGIS Server site

You can download sample scripts (.zip) demonstrated in this session from the following link:

http://downloads.esri.com/Blogs/arcgisserver/AdministrativeScriptingAndAutomationScripts.zip

You can also download a PDF of the session slides from the Esri website:

http://proceedings.esri.com/library/userconf/proc14/tech-workshops/tw_1006.pdf

Posted in Web | Tagged , , , , | 3 Comments

What’s new in the ArcGIS for Local Government August release?

Esri logo

Last week the ArcGIS for Local Government released several Water Utilities and Land Records maps and apps. Here is a quick overview of the new maps and apps:

Posted in Local Government | Tagged , , , , , , | 1 Comment

Add a Flickr Gallery to your Story Map Journal

fgallery-0

Flickr is a very popular photo and video sharing site with many millions of users. You can add a Flickr Gallery to your Map Tour by following the steps described below. 1. Create a new gallery and add the photos you … Continue reading

Posted in ArcGIS Online, Story Maps | Tagged , , , | Leave a comment

Add a Flickr Gallery to your Story Map Tour

fgallery-0

Flickr is a very popular photo and video sharing site with many millions of users. In a previous post we covered how you can add a Flickr Album to your Story Map Tour. You can also add a Flickr Gallery … Continue reading

Posted in ArcGIS Online, Story Maps | Tagged , , , | Leave a comment

Setting up your own Profile Service

On-premise elevation Profile service

As some already know, there is an Elevation analysis Ready-To-Use service where you can easily create an elevation Profile for anywhere in the world.  That’s pretty cool, but some have wanted to host and serve their own data to create profiles for. Available … Continue reading

Posted in Analysis & Geoprocessing, Community Maps, Hydro, Water Utilities | Tagged , , , | 3 Comments

ArcGIS Pro software licensing changes in beta 5

License status in ArcGIS Pro

The beta 5 release of ArcGIS Pro is now available. You can download it from the ArcGIS Pro website or check for updates within ArcGIS Pro. This release has some important changes to the way you authorize your software license. … Continue reading

Posted in 3D GIS, Analysis & Geoprocessing, ArcGIS Online, Editing, Geodata, Imagery, Mapping | Tagged , , | 12 Comments

Add a button to your organization home page

button-0

As an Administrator you can easily configure the look and feel of your organization’s home page. Using basic knowledge of HTML and CSS you can customize your home page further, and can add one or more buttons that can open … Continue reading

Posted in ArcGIS Online | Tagged , , , | 5 Comments