Why consider Xamarin Forms for a mobile application?

Why consider Xamarin Forms for a mobile application developed with an Agile approach?

Several aspects have to be considered when starting a project, Agile or not. Among them, there is obvioulsy the technology that will be used. In the case of a mobile application, there are many possible choices : to develop natively on Android and iOS or else to use a multi-platforms solution, like for example, React Native or Xamarin (several others are available).

Let’s look at the benefis a platform like Xamarin Forms can provide to developers, as well as to the Product Owner.

For those who are not familiar with Xamarin, it allows you to do native C# development for Android, iOS and Windows, while having access to the specific APIs of each platform and therefore to all the functionalities that they offer. Furthermore, all of this is done in order to share the code through a library common to all the projects. Xamarin Forms is an abstract layer that enables the development of the user interfaces to share them over all the platforms.

In an Agile project, one of the goals is to quickly deliver value to the client through short iterations. For a mobile application, Xamarin Forms facilitates this thanks to the fact that most of the code and interfaces are developed only once for all the platforms. This will help the team to welcome the changes more easily since they will not imply reopening the code in several places.

Let’s take the example of a project where the sprints have a one week duration. In regard to the progression of the functionalities, it might take several weeks for a functionality to be completed on the many platforms supported. Thanks to a code that is mostly shared, this measure should be done over shorter intervals.

Because of its single programming language (C#), the simplicity brought by Xamarin Forms in a project of this kind is a key element to take into consideration. Essentially, it’s unecessary to think and code in accordance with two platforms and two different languages.

All of this seems very interesting, but do we have reasons NOT to consider Xamarin Forms?

When there is a need for distinct visual experiences on each platform, or when a lot of APIs and elements specific to Android or iOS are being used, it would not be beneficial to use Forms. Xamarin.Android and Xamarin.iOS offer a complete implementation of their respective APIs. Consequently, there is no limit to what is implemented by Forms and there’s total control of what is being used. Also, since Xamarin Forms is an abstract layer over what’s offered by Xamarin (Android and iOS), it adds the risk of having implementation problems that would force to fall back on the complete implementation of a feature on each of the platforms.

We should not choose Xamarin Forms thinking that the development time will automatically be shortened by half. Despite the fact that a lot of code is written only once, certain portions will have to be written differently for the supported platforms. It’s also possible that the code share is not critical to the production of the project. For example, if most of the project is based on a visual experience unique to each platform, there will be no gain, as much for the client as for the developer, in using Forms. On the contrary, on top of defining each feature specifically on each platform, it would be necessary to define our own abstract interface to make it usable in our Forms project.

Every project is different and Xamarin Forms will not be the solution for every mobile application needs. On the other hand, in order to focus on a single technology and shorten the development time and costs to finally deliver value to your clients more rapidly, it’s a more than interesting platform to help you carry out your projects.

5 responses to “Why consider Xamarin Forms for a mobile application?

  1. I would like to thank you for this amazing article, I am a .net developer who recently chooses xamarin.form to do my first application, actually, Xamarin is an extremely powerful and flexible tool
    Your blog is really a guidance to people who are learning more on this topic. Thanks

Leave a Reply

Your email address will not be published. Required fields are marked *