Review: Xamarin.Forms for Mobile App Development

Paul Ferrill

Updated · Aug 14, 2014

While the “bring your own device” (BYOD) movement is giving many CIOs headaches over security, it also represents an opportunity to turn what could be problem devices into a corporate advantage. Some organizations have taken to standardizing on a particular vendor platform such as Apple and providing employees with iPads loaded with corporate applications and appropriate security measures. While that approach works, it can be quite costly, especially for a large organization. It also forces employees to possibly carry both personal and work tablets.

Another potential BYOD solution is to use a cross-platform development tool to build applications that will run on any of the popular mobile devices. Xamarin is one company offering just such a product, with support for Android, Apple’s iOS and Windows mobile devices.

Xamarin.Forms is a key part of the most recent release based on the Microsoft-developed XAML user interface description language. Couple that with the C# programming language, and you get the ability to create applications which share a single code base for all but the most platform-specific functionality.

Another problem this solution addresses is the dearth of mobile application developers. Using the Xamarin tools makes it easier for a developer familiar with building enterprise client applications based on Microsoft languages and tools to make the move to mobile apps. Some differences do exist, but the key point here is in the use of C# and Microsoft’s Visual Studio Integrated Development Environment (IDE).

Cross-Platform Development

Xamarin’s tools have a long heritage based upon the open-source Mono project started by founders Miguel de Icaza and Nat Friedman. Mono’s initial premise was built around bringing the C# language and the underlying common language runtime (CLR) to the Linux platform. Microsoft has promoted and supported a small army of enterprise application developers using C# and the CLR. It’s this base of developers that Xamarin has targeted to help them transition from developing apps for the PC to mobiles apps for phones and tablets.

One of the most difficult challenges for any development team looking to build native apps for both Android and iOS is the vast difference in both the programming languages (Java for Android and Objective C for iOS) and the underlying application programming interface (API). Xamarin eliminates this barrier and uses C# (or F#) and a translation process to build a native application for either platform. A dependency service makes it possible to use different code when it becomes necessary to access a platform specific feature. A good example documented on the Xamarin developer site is the code needed to access the text-to-speech API on both Android and iOS.

Xamarin.Forms brings the same commonality to the user interface (UI) development process for both Android and iOS. Developers get to choose between a totally programmatic approach where UI views are created by making calls to specific Xamarin.Forms APIs, or by creating the UI declaratively using XAML. Microsoft has been using XAML as the underlying foundation for their Windows 8 applications, and Xamarin now brings the same development process to mobile applications.

Mobile App Development Tools and Support

One of the ways Microsoft has built a following with the corporate developer community has been through the Microsoft Software Developers Network (MSDN). The msdn.microsoft.com website contains a wealth of documentation, informative articles and sample code. Xamarin has followed this model with their developer resources to include Xamarin University.

If your development team currently uses Microsoft Visual Studio, you’ll want to take a look at the new Xamarin support. Version 3.0 of the product introduced a new Xamarin.iOS for Visual Studio feature making it possible to develop forms-based applications for iOS from within Visual Studio. The iOS Designer for Visual Studio enables the development of applications for the iPhone and iPad on a Windows computer.

Testing is a key step in any software development process, and mobile apps are no exception. The native Android SDK is what enables developers to build and test on a Linux, Mac or Windows PC using a virtual machine to host the target emulator. Xamarin uses this same basic process for testing without a physical device.

Building and testing for iOS requires a Mac host, but that doesn’t mean you can’t still accomplish the testing process from a Windows machine. Xamarin provides a way to connect to a networked Mac to use as a build and deployment host. You can also run Visual Studio directly on a Mac using a virtual instance of Windows should you choose to do your development on a Mac.

Building an enterprise mobile application development team is not an easy undertaking unless you choose a path that utilizes existing developers and familiar tools. Xamarin makes this path a viable option without the need for a huge investment in retraining. You’ll still need to invest in some Mac hardware if you don’t have any, but you won’t have to force your team to completely relearn and retool.

Paul Ferrill has been writing in the IT trade press for over 25 years. He’s written hundreds of articles for publications like Datamation, Federal Computer Week, InfoWorld, Network Computing, Network World and PC Magazine and is the author of two books. He is a regular contributor to ServerWatch.com and several other QuinStreet Enterprise properties.

Paul Ferrill
Paul Ferrill

Paul Ferrill has been writing for over 15 years about computers and network technology. He holds a BS in Electrical Engineering as well as a MS in Electrical Engineering. He is a regular contributor to the computer trade press. He has a specialization in complex data analysis and storage. He has written hundreds of articles and two books for various outlets over the years. His articles have appeared in Enterprise Apps Today and InfoWorld, Network World, PC Magazine, Forbes, and many other publications.

More Posts By Paul Ferrill