Avid developer who has a passion for | 

Learn more about myself and what makes me so passionate about various forms of software development.

Why I Like Xamarin

Posted On 2019-09-21

In the mobile development realm, I'm still pretty new to the scene, but I'm starting to get my sea legs, and I figured I'd use this time to explain why I like Xamarin Native, which going forward will be mentioned as just Xamarin.

Sharable code

So to begin, I like the idea of sharable code no matter what I'm developing on, but for mobile this is doubly true. Nothing to me is worse than writing logic twice for the same app, and xamarin gives you that ability to share code, allowing you to just focus on that once and allowing you to spend more time on the individual UIs.

Bare metal feel

Xamarin is not the only game in town for cross platform mobile development, but they are the one who's giving the best bare metal feel without touching native code.

Flutter and Xamarin.Forms for example offer up widget controls that are generic to both iOS and Android, and code wise, you have it all in a central layer that the UIs can draw from. This path is great for those want to make native feeling apps but are on a time crunch or low on resources to learn the native bindings.

You then have the various web-based frameworks, like ionic and cordova, that let you use web technologies to make a mobile app, if you're a web developer, this is a very tempting way to go as you already know the code to get started. In my experience, this way offers the worst experience to the end user, the end result is usually clunky feeling and if you're not careful the app can look and feel too web-like.

Xamarin Native on the other hand is giving you access to the native code and UI, but with a singular language that you already know (if you're a C# developer that is) that compiles to the native code. This method of mobile development is how I wish Apple and Google went instead of them making us rewrite the same app in a different language AND different UI.

Using a language I already know and enjoy

I've been developing apps in .NET since 2005, I feel comfortable with it and I generally enjoy it, minus web forms, that was awful. I really like C#, my enjoyment of C# is topped only by PHP, which is still my favorite language.

Being able to just use C# is really great as I don't have to worry about getting tripped up trying to remember both java and swift syntax as well as how iOS and Android wants their app lifecycle and UI laid out. With Xamarin, I just need to focus on the individual app lifecycle and UI practices.

Better understanding of each platform's documentation

The key benefit of xamarin native is that it's a wrapper of the actual native code, this setup makes it really nice to follow along with each platform's documentation, while other frameworks make it so that you don't need to know this, it does really come in handy to know how Android and iOS work.

When I was deciding between using xamarin native and xamarin forms for a project at work, I initially liked the quickness of xamarin forms, it let me get running quick, but I then started to stumble when I was trying to do some complex tasks.

I also found myself trying to use nuget packages that seemed clunky and often had me enter in platform-specific code, which seemed to defeat the purpose of xamarin forms in my opinion.

When I tried xamarin native, I was able to understand the flow of the app better, and I got more range of support in terms of looking for questions on stack overflow, I can look at the native code and generally be able to figure out how to make it work with C#.


Those are my main reasons for liking Xamarin Native, I do think if Xamarin Native has too much of a learning curve for you that the frameworks I mentioned above will be just fine, but if you're writing a fairly complex app, or you want to really dive deep into mobile development and understand how iOS and Android work without learning their preferred language, Xamarin Native will be the best choice.