So, you want to build an app. Well, there’s always that question: iOS or Android?
You probably want to cover them both, simultaneously, and maybe even Windows devices for good measure.
But, creating so many different apps is expensive, time-consuming, and it takes a lot of engineering effort.
Unless you’re using Xamarin. Xamarin is a whole ecosystem of tools that
helps you create apps for all platforms with just one technology stack – C# language
running on .Net framework.
Xamarin apps, while created for different operating systems, share all business logic, database access, and network communication.
Only user interface is designed separately, to maintain the native look and feel of each platform.
Here’s why you should consider Xamarin when building your app:
First, C#, .Net, and Visual Studio with installed Xamarin – these are the only three components
required to create apps for all operating systems. There are emulators available for
all mobile platforms, but if you’re a Mac fan, feel free to create iPhone apps on your
machine as well. You also have several options for debugging: whether from desktop, emulator, or directly on a device.
Xamarin apps also boast an unmatched performance
level compared to hybrid or other cross-platform development tools.
For instance, image loading in native apps is only 14 percent faster than using Xamarin
and even a more significant difference in image-saving speed is simply unrecognizable by a mere human.
Let’s also not forget that different operating systems have elements that drastically distinguish
them from each other and obviously you want to fit in. For an Android user, it’s natural
to use the menu tabs on top of the screen while iOS users enjoy different patterns.
Xamarin allows you to achieve this native look and feel by two methods.
The easier, quicker, and more contained way is using Xamarin.Forms.
Xamarin.Forms is a library of templates that helps you use standard interface elements and reach 100 percent of that longed-for, oft-promised code reuse.
If you want more creative freedom, use Xamarin.iOS and Xamarin.Android – built-in tools for manual customization.
And finally, Xamarin is open source, meaning free. It comes gratis with Microsoft’s development environment Visual Studio.
This means, if you’ve already bought and use that tool, you can start experimenting with Xamarin and its tools right away.
Create Mac apps using Xamarin.Mac, run automated testing with Xamarin Test Cloud,
even make use of analytics using Xamarin.Insights.
But now the rest of the Xamarin story – the downside. Are there pitfalls?
Yes, let’s talk about them. You already know that if you’re building
an app with heavy UI, you’ll have to manually rewrite some parts of platform-specific code
using the required language – Swift or Objective-C on iOS and Kotlin/Java for Android.
Of course, Xamarin will update your business logic and Xamarin.Forms elements automatically,
but there’s always a delayed reaction to a new platform version.
Imagine, if a new version of Android dropped today, you’d have to wait a few days before the Xamarin
team updates the tools so you can update your app.
Finally, the population of Xamarin professionals in the labor pool is still quite low.
About 10 percent of all members of the mobile development community are Xamarin developers.
You’ll find way more developers working exclusively with iOS or Android than people versed in Xamarin.
But don’t give up. The Xamarin community is growing strong.
With the abundance of tutorials and the official online Xamarin University, any C#/.Net engineer can acquire
the needed skills to build cross-platform apps.
Considering all that, let’s quickly recap under what circumstances you should consider Xamarin.
To be honest, building games, complex animations,
or custom user experience is pointless with Xamarin.
Yes, you get the code reuse, but you still have to spend a lot of time wiring UI to each platform.
So, you lose the main benefit Xamarin provides – the “Write Once Run Anywhere” approach.
If you’ve got tight deadlines, you can skip a lot of development stages with Xamarin.
Without heavy UI customization, you can quickly write one code, share it across platforms,
and have a whole lineup of apps ready for download in less than six months.
Not many small and midsize businesses have separate development teams for both iOS and Android.
With Xamarin, you can enter the market on low budget with a small team of in-house
or outsourced engineers for support.
Xamarin is one of the tools that make app development more accessible to businesses.
Of course, there’s still a gap when we’re talking about graphics-packed apps.
But Xamarin takes mobile-first out of the concept arena and into reality for many companies.