Take .Net cross-platform with Xamarin

For Microsoft developers fluent in .Net, Xamarin delivers on the promise of cross-platform coding, complete with a cloud-hosted test service that includes 2,000 devices

Take .Net cross-platform with Xamarin
Mitya Ilyinov via Wikimedia Commons

One of the biggest issues facing any modern development project is the number of endpoints that need to be targeted.

Not long ago all we needed was a Windows Forms app, a set of Web pages, and maybe some WAP if we were feeling ambitious. Then along came mobile apps, and suddenly we had to produce native endpoint code for iPhones, iPads, Windows Phones, Android phones, and so on -- an explosion of code and an ever-growing collection of development tools.

Native applications are fast and efficient, and they access key device features in a way that’s impossible for Web apps. But if you’re building an application in C# for Windows devices, in Objective-C for iOS, and in Java for Android, there’s very little you can share among the different versions of your code, apart from graphical assets.

True, you could build a hybrid HTML5 app using tools like Apache Cordova, wrapping HTML and JavaScript in a native runtime. But there’s an alternative approach: Xamarin’s cross-platform native development tooling, which builds on the open source Mono implementation of Microsoft’s .Net framework.

Using Mono and the now open .Net, Xamarin is able to deliver a cross-platform development environment that uses either its own IDE or a Visual Studio plug-in. Code is written in either C# or F# and can be quickly shared across applications with support for Microsoft’s portable class libraries.

Building code using Xamarin’s tooling is much like building any application in any development environment. You write code, then compile and deliver it to test devices before deployment. You don’t even need to have a full set of test hardware: One advantage of Xamarin’s platform is its cloud-hosted test service, which lets you debug code running on devices hosted by Xamarin. With more than 2,000 devices currently in the Test Cloud, you’re likely to find your target device and OS combination ready to run. Calabash, an automated test framework, handles your applications, acting exactly like a user, and with access to low-level device features.

To continue reading this article register now

How to choose a low-code development platform