Why You Should Choose Xamarin As Your Cross-Platform Development Tool

Over the years many businesses have invested heavily in using Microsoft throughout their organizations. Those with in-house development departments and custom software solutions more than likely chose to develop their software with a Microsoft language. Sharpening development skills can take years of dedication from the developer as well as a substantial investment from their employer. Many of these organizations realized that they could benefit from a native mobile solution beyond the Microsoft platform. This left them with quite a dilemma, since they were so heavily invested in the Microsoft platform. Xamarin, a San Francisco based software development company, offers a solution to this problem. Several of their products allow for the native development of both Android and iOS applications using Microsoft’s C# language. These products are named Xamarin.Android and Xamarin.iOS respectively.

Benefits of Xamarin

One of the most obvious benefits of using Xamarin products is that an organization does not have to retrain their current workforce on an entirely new programming language. The way that Xamarin allows developers to create native applications using C# is by proving a C# version of the platform API. For example, in iOS there is an UIImageView class. Xamarin has created a C# version of this class with all of the same methods and properties available. Since the APIs Xamarin has created for both Android and iOS are mapped 100% between their native language and C#, engineers need to be familiar with the individual platforms and nuances therein. Xamarin has historically done a fantastic job with releasing updates to their APIs in lock-step with iOS and Android updates. Another benefit is that there is an opportunity to re-use existing code as well as share code across multiple platforms. This means that you can drop that awesome snippet you created right in. Xamarin.Forms even allows for user interface code to be shared between the different platforms, including Windows Phone.

One of the most popular frameworks for building service oriented applications on the Microsoft platform is Windows Communication Foundation (WCF). WCF allows data to be sent from one service endpoint to another. The service is usually hosted on a server and is always available, but can also be hosted inside an application. A challenge often faced by enterprises is tying into legacy systems. Sure, you can re-write all of your Windows Communication Foundation services to be REST APIs, but with Xamarin, a WCF service can be consumed without having to do so. A developer can do this with a familiar API from Microsoft, such as System.Net. Xamarin also provides access to Microsoft’s LINQ, TPL, and serialization. The developer has the choice of using native APIs for iOS and Android, which are NSUrlSession and OKHttp respectively.

Aside from Xamarin.Android and Xamarin.iOS, Xamarin also offers a slew of different products and services to aid in the development process. Xamarin offers its own IDE, Xamarin studio, as well as a plugin for Visual Studio. The Component Store has a collection of components that can be dropped into a project. These components are both UI and non-UI. They all come with sample code to take the guesswork out. Whether you are developing in Visual Studio or Xamarin Studio, you also have access to a plethora of NuGet packages created by members of the Xamarin community. The community is growing and is a great resource for any challenges one might run into. The Xamarin forums are an excellent resource where developers and Xamarin engineers can share ideas and problems. In addition, Xamarin also offers Insights, a real-time monitoring service, and Xamarin Test Cloud, an automated UI testing platform that tests on actual devices.

Cross-Platform Development

Xamarin is not the only company that provides the tools that allows for cross-platform development in a language outside of the native platform language. Most of these other tools appeal to web developers. For example, PhoneGap offers a set of Javascript APIs used to access native functionality of the device. With PhoneGap you are basically building an HTML5 and Javascript mobile web application. This means all of the code is written using Javascript and HTML, and what the user sees is actually a web page. PhoneGap runs inside of an embedded web browser and allows integration with other mobility Javascript frameworks such as Sencha Touch or jQuery Mobile. When the user opens an app, they can instantly tell if it has a native look and feel, or if it is built on top of a web framework. With Xamarin, the code is actually compiled down to the native language. This means that the button you see on the screen is a native button and not one rendered inside a browser. Since apps built with Xamarin compile down to native code, the apps can be deployed either to a simulator or an actual device. This also means engineers are able to use familiar debugging either through Visual Studio or Xamarin Studio. This is why we choose to use the Xamarin platform over any of the other cross-platform solutions available. Users cannot tell the difference between an app developed with the Xamarin platform and one developed using a native solution. Below are images of apps created with both PhoneGap(left) and Xamarin(right). The source code is available on GitHub.

PGTable XamarinTable


Xamarin is a fantastic ecosystem for developing native mobile applications, while leveraging the C# (or F#) programming language. With their suite of products and services connected to a great community and fantastic support, Xamarin makes native app development in a familiar language a breeze.

Subscribe to
our Newsletter!

Keep up with new insights from industry leaders on digital transformation, mobile app development, enterprise architecture, and tech innovation topics.