Develop a high-quality, lower cost Android and iOS mobile app with Xamarin and Microsoft Azure

I wrote this article for 123Presta in order to present Xamarin and Microsoft Azure to his clients. I have the pleasure to share it on my blog. Enjoy your reading 🙂

 

Today, create a mobile app is almost essential for any project. You have a e-commerce website ? Associate to it a mobile app will boost sales thanks to a better user experience. It’s true for all projects : websites, B2C or B2B services, or only mobile app.

However, developing a mobile application is complex and can be very expansive. You have to adapt to Android, iOS, and / or Windows Phone, small screens or tablets. Sometimes you even need to connect to a remote server to exchange data over the Internet.

There are dozens of technologies to develop mobile applications, each with its advantages and disadvantages. In this article I will talk about a solution proposed by Microsoft. It allows to respond in a very suitable way to all these constraints: Xamarin and Microsoft Azure.

 

Need a mobile app ? Three must be created !

Today, according to the firm of Kantar, more than 73% of the smartphones owned by the French are Android. 24% are iOS and only 2.5% Windows Phone. That’s why it is important, for any mobile application project, to target at least the Android and iOS operating systems.

xamarin microsoft azure ios android

Android and iOS are two different systems. As a result, mobile application development does not take place with the same technologies, nor in the same way. In addition, the design of applications are also different between Android and iOS. An Android user usually has the main action button of the current page at the bottom right. On the contrary, the iOS user used to have it in the top right. Similarly, an Android user has the habit to see the tabs displayed at the top. While they are displayed at the bottom on iOS.

There are many differences, both in the location of controls and in the choice of colors and appearances. Moreover, Google and iOS have their own Guidelines (Material Design for Android vs. HIG for iOS). And to ensure the best user experience for 100% of your users, you must respect these Guidelines. The following image presents the same application, with a design adapted to each platform :

xamarin microsoft azure ios android

 

A mobile application is rarely sufficient on its own

A mobile application must usually go with a server. It will store data and allows applications (mobile or web) to access and modify this data. For example, a “wake-up” mobile application doesn’t need a server and internet access to operate. But an application associated with an e-commerce site, or a news site will need a server. Indeed, it is this server that will send the articles, via internet, that the mobile application must display to the user.

xamarin microsoft azure ios android

Let’s summarize. For a mobile project, you must:

  • design and develop the application on Android,
  • design and develop the application on iOS,
  • Set up and develop the server.

All these different actions require different knowledge and technical know-how. They represent different professions: designer, Android developer, iOS developer, system and network engineer and back-end developer for the server.

 

What skills and know-how to create a mobile application?

The technology to develop a native Android mobile application is Java. For iOS, it is Swift. For the server, you need knowledge about computer security, infrastructure and hardware. It is also necessary to know the databases and a programming language such as PHP for example. When you are an entrepreneur, you can not afford three teams with all these skills. Fortunately, there are many ways to proceed. I will present one that I consider to be excellent for entrepreneurs, SMEs and large groups.

This technology is called Xamarin. It allows to code only once to have a native mobile application on Android, iOS, and Windows Phone. Add to this Microsoft Azure for your server and you meet all the criteria. The bonus is that you are using only one technology: Microsoft’s and its C # .NET programming language.

 

Xamarin: a unique development technology for your mobile applications

Xamarin was born from the project Mono. It is a US company founded in 2011 and was acquired by Microsoft in 2016. This purchase made Xamarin completely free, whereas a $ 2000 / year license was required before. Therefore, Xamarin has the advantage of being free, mature, enriched and maintained by teams of advanced engineers.

The principle of Xamarin is to allow the development of native mobile applications with a single technology and by writing code once. To do that, Xamarin’s offer is divided into two principles: Xamarin, and Xamarin.Forms. With Xamarin, 80% of the code is shared between Android, iOS, and other projects. The remaining 20% are to be produced specifically for each platform and concern the graphical interface of the application. With Xamarin.Forms, 100% of the code is shared.

xamarin microsoft azure ios android

Choose Xamarin.Forms if your mobile application does not require much customization on the GUI. Typically, these are applications for professionals, whose value is not in the “wow !” effect but in the displayed data. On the contrary, if your application requires an advanced GUI customization, choose Classic Xamarin. Here is an example of an application created with Xamarin.Forms: 1 code, 3 platforms, 3 different and adapted displays:

xamarin microsoft azure ios android

 

Xamarin for high-performance applications

With one technology and one code, you can produce an application for Android, iOS, and Window Phone. The cost of development and maintenance is therefore reduced, almost halved. And unlike hybrid technologies, mobile applications created with Xamarin are native applications. Indeed, Ionic or React Nativ embed an overlay in the mobile application to function. Whereas Xamarin applies its overlay at the time of compilation in order to “translate” the Xamarin code into native code. Thanks to that, the result is the same as a natively coded application. The application fluidity and performance are not impacted and are optimal.

Xamarin still has a disadvantage. In order to function, Microsoft engineers must link Xamarin code to the native code of each platform. This sometimes creates technical problems for developers. For instance for features still not managed by Xamarin but existing in Android or iOS. However, over the time this disadvantage fades and it is very rare to fall into such a case today.

 

Azure: connect your mobile apps to the cloud at a lower cost

We have just seen how to develop a multi-platform mobile application at a lower cost. Let’s see how to connect this application to a server, or to the Cloud. The solution I would like to introduce to you is to use Microsoft Azure. Azure is the cloud of Microsoft. With Azure, you can host websites or databases. Also, you can access pre-built features such as user identification or voice recognition. Finally, Azure allows you to create your own functionalities to answer your business problem.

Microsoft Azure can be used for free, and offers paid services to improve the power and capabilities of leased servers. This is very practical: during the development of your project, you do not have any traffic, so you don’t need powerful servers. Once your project is finished and is having a great success, you can choose to increase the power of the servers. This makes your sites or applications more robust to handle the hundreds or thousands of simultaneous uses.

Xamarin optimized to interface with Azure

Xamarin and Azure are two different technologies, but owned by Microsoft. With this, a Xamarin developer can integrate Azure features into its mobile application with a few clicks. And without having to learn another programming language! Push notifications, user identification via several social networks, or pagination of data for faster transfers are some examples of features that cost a few clicks to implement, against several hours of development with native applications.

One feature I particularly enjoy is the synchronization of data between the server and the mobile application. Azure and Xamarin allow you to easily manage the offline operation of applications. It is possible to configure a database on the server that will be partially or fully duplicated on the mobile application and synchronized automatically. This allows your users to browse the application without an internet connection. All of this with a few clicks for your developer, against whole days of work in native code.

 

Implementation and experience feedback with the Moovenow project

The Moovenow application, aimed at the general public, was developed with Xamarin classic. This is an Android and iOS app, which makes social networking, directory, and events organizer dedicated to sportsmen. The application was developed internally by a start-up from Grenoble in 400 man/days. The server does not use Azure.

The choice was to use classic Xamarin because the graphical interfaces had to be very personalized. Indeed, the design required specific colors or shapes, and animations. The start-up had little means. That’s why it was not conceivable to recruit an Android developer and an iOS developer for these projects. Neither was it possible to pay training for a developer for either platform.

A successful project thanks to Xamarin

Here are one screenshot of Moovenow on iOS, and two screenshot of Moovenow on Android. We can notice the graphic interfaces completely customized for an enhanced brand image. The app still follow Android and iOS guidelines.

   xamarin microsoft azure ios android

The project was successful, although the iOS application development time was exceeded . This delay was due to the lack of knowledge of the iOS platform by the developer. The technology is the same for all platforms. Despite everything, a key success factor is a good general culture of each platform for the developer.

If it were to be done again, it would have to make sure that the customer really needs an elaborate design justifying the use of Xamarin instead of Xamarin.Forms. Indeed, it increases about ¼ the development time, and so the production costs. It should also ensure the experience of the developer(s) with the Microsoft C # .NET technology and their general culture on each targeted platform (Android, iOS, …).

 

 

And you, what are your mobile app projects?