In my years in mobile development, I’ve seen a number of different technologies emerge that promise to streamline and optimise the development of mobile applications across commonly used mobile devices.

In my opinion the most effective amongst these cross-platform development toolkits is Xamarin, but that doesn’t necessarily mean it is right for every mobile application project. The right choice depends on many factors relating to your business’s needs as well as the technology required.

So, how can you identify whether Xamarin is the best fit for you?

Xamarin in a nutshell

Xamarin enables cross-platform development of mobile applications using C# rather than native languages such as Swift for iOS or Java for Android. Developing mobile applications based on C# provides access to many of the underlying device operating system API functions.

If your application can use a common user interface with identical navigation styles (as well as look and feel) then you can eliminate the need for separate code bases for individual mobile device operating systems through the use of Xamarin Forms.

Xamarin Forms allows the developer to code the entire application in C# and compile the code into separate applications for iOS, Android and Windows Mobile. This saves a lot of time in the coding phase of the project and reduces effort and expenditure in the maintenance and enhancement of the application later on.

Xamarin also provides the ability to include a user interface layer coded in the language native to the separate mobile devices such as Swift for iOS, Java for Android and C# for Windows Mobile. This means you can create high-end interfaces, and even provide a different set of user interface navigation features for each device, whilst leaving the core application code, data models and communication layers in common C# code.

Using a separate user interface layer for each device is a powerful feature, but it does reduce the amount of common shared C# code within the project which increases the time and effort in the coding phase. It also complicates any future maintenance and enhancement of the application. So there is a trade-off between creating a high-end user interface which is native and intuitive to each device and creating an interface with minimal development effort that has a shared code base.

Factors that help us choose the right development tool for a project

When embarking on a new project we ask several questions to help us decide on the right technology toolkit to use. The primary driver for our decision is whether the client has a need for a specific technology.

Other key questions we ask:

Will the client take ownership of the code base once the project is delivered and be responsible for future enhancement and maintenance of this code base? If so, what skills and resources does the client have access to within their own development team?

We don’t want to handover an application that a client may not be able to maintain. Our decision will be shaped by not only what type of application you’re wanting to produce, but also how it will be managed down the line and what you’re capabilities are.

• Will the application be distributed to the general public or only be used by the client’s internal staff? What style of user interface will the application require?

If your application will be used as a business tool it may just need to be functional and efficient, meaning it can share a large amount of common code base. If it’s for customers it may need to be slick and intuitive, meaning we will want to leverage the capabilities of each different operating system.

• Will the application be distributed via the Apple and Google stores or via a corporate mobile device management platform such as MobileIron or AirWatch?

iOS applications must be reviewed and approved by Apple before being released to the public and must pass certain user interface expectations such as approved navigation styles, which will differ from the usual Android navigation styles and methods. This will often demand a larger portion of the code base be built in native Swift and Java code.

• What is the expected date of delivery?

If the code base will be maintained by your mobile development partner in the future and speed is more important than cost to the client, it may be wiser to develop the application in a purely native language.

Things to consider

Even if your development team are highly experienced in C# and .Net, they may not be as experienced in development for specific mobile devices. They may not be aware of best practices for application design and development for both iOS and Android mobile devices.

We’re often asked by clients to fix an application that was built by an inexperienced developer trying to use the same application view-stacking technique on iOS as they would use with their generic C# experience. Competent Xamarin developers must have a similar level of knowledge about native device language development techniques as an iOS or Android developer.

At this stage, C# developers with solid Xamarin experience are harder to find than experienced iOS and Android developers because the technology is younger. For this reason, it can be easier to build and maintain a larger development team of experienced native device language developers than experienced Xamarin developers.

Similarly, if you wish to engage another development partner in the future to maintain and enhance your application, it may be easier to find one with iOS and Android skills rather than Xamarin skills. This could change in the next few years as Xamarin gains popularity.

Though Xamarin lets you save time in the development phase, testing must still be done across all devices so there is no saving in the testing effort. If a single issue is found in the application on all platforms, it can be fixed in common code thus reducing the defect remediation effort. However, an issue found on iOS that does not appear on Android or Windows Mobile introduces the challenge of having to break out of common code to address the issue, again not saving any real time in defect remediation.

In an ideal world, a cross-platform development tool would reduce your development costs and time to market significantly, perhaps even halve it. But given the complex nature of applications and the relative newness of tools like Xamarin, so far these savings have been quite small and sometimes even negligible.

So, is Xamarin the right tool for you?

Xamarin is a great tool and has potential to provide some savings when it comes to time, effort and cost, but it is not a silver bullet and won’t always be the best tool for the job.

The complex demands and time constraints of enterprise and media clients, combined with a lack of experienced developers compared to iOS and Android developers, means that a cross-platform development toolkit like Xamarin may not always be the best fit.

To find out whether or not Xamarin is the right tool for you, speak to your mobile development partner.

Written by Michael Foster, CTO Ansible