Main mobile product (codename=“Project A”) of our partners, that we are working on, is built with Xamarin.Forms and it is in Beta now. And I think we did right decision in the beginning when we selected Xamarin.Forms as main development platform.
Let’s go back to definitions and learn basics:
Xamarin: platform, that was built by the developers behind Mono, an open source development platform based on the .NET Framework, led by Miguel de Icaza and first introduced in 2001.
Xamarin.Forms: cross-platform UI toolkit, based on Xamarin. It allows to describe UI once and get platform-specific UX/UI.
Supported platforms: iOS, Android, UWP, MacOS, Tizen, Windows (WPF is coming), Linux.
Main pros of Xamarin platform:
- You are using part of existing .NET world.
- You can use existing tools and services from .NET. Perfect integration with Microsoft ecosystem.
- Very similar to native development process, since you have 100% access to all platforms native API.
- Native UX/UI per platform (tools like Phonegap doesn’t provide this).
- You can share code between platforms.
- You get nearly native performance.
- There are a lot of partners, like Telerik that have built wonderful toolkits for Xamarin and Xamarin.Forms.
- Now it is part of Microsoft, which means that future is bright.
- You can reuse any existing native library.
And if we are talking about Xamarin.Forms:
- Shared UI between platforms (you write once and get platform-specific UI). You can cover multiple platforms with the same code and get native UX/UI.This means that in general you write 70–80% shared code and 20–30% platform-specific code. So it is great impact on budget and time.
- Open source.
Why are we using Xamarin.Forms for Project A and other apps:
- It is applications for business, that allow to automate business flows and consume data from multiple sources. So our goal is provide native experience to users. For example, using XF for games it not a right choice, because you don’t get any benefits.
- We are delivering custom flows very quickly to new customers and they are able to use platform and identify benefits for their business.
- Part of our team has great experience in .NET development (web, desktop, mobile), so they are able to reuse this knowledge.
- Developers that have experience with native development also can easily switch to Xamarin and reuse all their knowledge as it is. And this works really great. Especially now, when Swift and Kotlin appeared.
- We can continue using Visual Studio and other well-known tools.
- We are using VSTS for CI/CD, HockeyApp (plan to switch to AppCenter later) and it works really smooth: as soon as developer makes change, build in VSTS is running, tests are checked, QA gets new build and can check the feature.
- Now we are in progress with building automated UI tests, that will be run on our local build machines via simulators and in Test Cloud - means that we can cover most of flows with automated tests. We are building it using Xamarin.UITest framework.
Of course every platform and tools have disadvantages and issues, so I should cover this also:
- Package size: bigger than for apps, that are built with native tools. With each update Xamarin reduces it, but it is still big. More details: https://developer.xamarin.com/guides/android/advanced_topics/application_package_sizes.
- You can have performance issues with Android in specific cases. With latest 2.5 update situation is much better, so I expect great improvements in next release.
- Weird bugs happens, as in every library/tool, but they are quickly resolved and delivered.
- Compilation speed is slower, than with native tools. But things go better with each release.
So each time when you plan to build mobile app - think carefully about platforms, requirements and your users - maybe Xamarin.Forms is a perfect choice for you.
Feel free to contact me if you need any help for selecting right framework for your application!
For more details, please, see presentation about Xamarin and Xamarin.Forms that I did recently: