What strategy should we follow when starting a development that involves applications for different clients, such as Android, iOS and Windows Phone? Should we make native applications? Should we choose an hybrid development with Ionic or Cordova? When starting a mobility project, you’ve probably asked on more than one situation this set of questions. As maybe you know, you will find supporters of native development, but also followers of “write once and run everywhere” development.
If they tell you you can write code once and have a platform that will enable a full cross-platform development with native applications for iOS, Android, Windows Phone and Universal Windows applications, it might surprise you, but it is possible by Xamarin.
Xamarin.Forms, the key of cross-platform development
The company, which was acquired by Microsoft earlier this year, has turned much of its effort in developing Xamarin.Forms, abstracting the native controls on each of the platforms to a higher conceptual level. This allows us to carry out generic developments so that the logic is shared between different platforms, which prevents us from having to face similar problems in each one.
How is it possible? Let’s look at the next image.
The “Shared C# App Logic” section identifies where the core platform development will be located, using all the power that .NET framework provides. This common code will run on all platforms.
For interfaces’ development, we can follow choose the option we need. If we want that all the apps follow a similar design, we will focus on having a more standard design that will be multiplatform thanks to Xamarin.Forms, but if we want to have custom interfaces for each platform, we can.
Finally, we can develop our own independent functions into each platform if we need it. All coded on C#. This language allows us to use native features that are specific to each platforms, but with a common language.
To sum up…
As you can see, we have a cross-platform mobile development platform that seems to have an interesting future. In next posts we will tell you how to start the development of a small Xamarin project using this new technology.