Xamarin.Forms Pros and Cons

Wednesday, January 04, 2017


Xamarin.Forms is my new passion in mobile app development. When I was starting my mobile development career I was Android and Java guy, I made some small apps and one of them is counting over 250K downloads on Google Play Store. That was back in the high school and now I consider myself as .NET guy and .NET developer on web and mobile using Visual Studio and other great development stuff from Microsoft.

In the period between using Android and now Xamarin.Forms I was playing with Windows Phone and Universal Windows Platform and I made couple of app including one for Tuzla Film Festival 2015 (movie festival in our country) for Windows Phone 8.1 and for our local MS Community conference.

At the start of the summer I started to playing and developing with Xamarin.Forms and first thing that I liked is simplicity of write one code base and Ui and sharing it on three or more platforms without any changes.

If you are familiar with Windows Phone or UWP you will be able to "learn" Xamarin.Forms very fast, with your knowledge of C# and on plus side if you are familiar with MVVM in small amount of time you will be able to create some basic-medium apps.

It is important to write that I am using Xamarin.Forms not Xamarin.Android or Xamarin.OS if you don't know the difference you should check official documentation here.

Reason why I write this post is because I was very suspicious about Xamarin in the past about performance and other stuff (I will write about Xamarin performance in some future blog posts), but if you are making some "simple" apps for your clients and if you want to speed up your development most probably that with Xamarin.Forms you can achieve all app needs with negligible performance result. And there is a main

Your client will be "happy" for faster development time and you and your team will be more effective looking at results with much smaller amount of time.

This is what I like most about Xamarin.Forms and that is you write one code base and if you need to make app that does not have any special needs in the implementation using some special platform specific APIs.

Xamarin.Forms is the best solution in that area of interests.

So this blog post is about pros and cons so I will write some of my thoughts about it. These are results from my half year experience with it and some online research.

Pros:

You write one UI with one code base and without any changes it work on every single platform (Android, iOS, WP, UWP...), when we talk about UI we have all familiar and common UI controls. C# is for code base for all platforms. Smaller amount of time is spent in developing process. You have ability to make custom renders in case you need to customize UI controls for some specific platform. And it is free with Visual Studio. It is perfect for apps that require little platform-specific functionality. Community and platform is growing, many cool stuff we will be see in the future about Xamarin.Forms! Xamarin is now part of Microsoft and I am sure that this will be a big part for future improvements on Xamarin.Forms.

Cons:

It is not perfect platform, don't take me wrong, documentation on official web site is excellent but there is no a lot of books, tutorials and samples outhere. This platform is growing and in that process you will face a lot of problems (in my case with nuget packages dependencies), but you are not able to create apps that need special interactions and app that need high polished UI designs. You don't have full power to create UI for specific platforms, some elements that are specific to that platform that you want to imitate. With Xamarin.Forms you use common controls that these platforms share. Community is growing and I am sure there will be a lot of libraries for help in that area. In this moment when I write this blog post you don't have UI XAML preview for layout... but with Visual Studio 2017 RC we will get preview version of that feature.


Conclusion:

If your app don't need to have perfect UI design, it need to be available at multiple platforms, that app is low-medium complex, hight performance is not the most important thing (although Xamarin.Forms apps have very good performance)... and you want to use smaller team and less time in development process than the best choice for you is Xamarin.Forms. My opinion is that Xamarin.Forms are the best cross-platforms solution for developers that are familiar with .NET.

Resources for getting started with Xamarin.Forms:

XamarinShow Channel 9: https://channel9.msdn.com/Shows/XamarinShow


GitHub for samples: https://github.com/xamarin/Xamarin.Forms


I hope this blog post was helpful for you. Best regards! Almir Vuk

You Might Also Like

0 comments