With mobile development still in full swing and a plethora of cross-platform frameworks available, is an older Microsoft .Net framework like Xamarin still relevant? A quick Google Trends look shows there is still a good level of interest in Xamarin when compared to other popular frameworks like React Native and Ionic, but that interest does appear to be declining at first glance.
Google Trends is not the most effective way to measure how popular or relevant one framework is over another and trends change all the time. So I am not writing this post to tell you that Xamarin is losing traction and you should skip it. In fact, I am writing this to tell you the opposite: that Xamarin is still very much relevant and you should check it out if you haven’t already.
Now I would like to say that for smaller or simpler apps, you should do your research and chose the framework you are most comfortable with as all the most common/popular frameworks provide quick startup, plenty of example code, and community-driven forums for solving the most common problems. Xamarin falls in line with all the other frameworks in this regard, so it’s hard to recommend it over something else in these cases. I think where Xamarin shines most is when you are developing complex enterprise applications where you have to deliver features consistently and react quickly to business needs. So let’s explore the reasons why I believe this is the case.
Develop Natively With C# and Visual Studio
I’ve been doing mobile development for nine years starting with native Java development on Android and picking up Objective-C for iOS very soon after. I enjoyed these languages to an extent, and it was a great learning experience working natively on each platform. I gained a good understanding of the build and deployment pipelines and became familiar with the internals of the SDK’s. That being said, you aren’t always given the luxury of time in a competitive business market to be able to learn both platforms thoroughly and then develop and maintain two completely separate code bases, builds, and deploys. So when I had to start meeting strict project deadlines while having only a few other developers to work with, it became clear quickly that I needed a cross-platform solution to keep up.
I had become familiar with the Microsoft .Net Framework and C# while developing the web back-ends for my apps and I found the framework, language, and tools to be much more robust than what I was working within Java and Objective-C at the time. Microsoft provides excellent documentation and support, and there are plenty of other free online resources to help you learn the different parts of the .Net Framework. So when Microsoft acquired Xamarin in 2016 and started integrating the Xamarin Visual Studio plugins more with the standard VS features, I knew I had to try and switch over to take advantage of the powerful IDE and language. Some of the immediate benefits I gained from the switch are:
- Simple asynchronous programming
- Access to powerful plugins like ReSharper
- Freedom to work in Windows or OSX
- Access to powerful debugging tools for the Android on Windows (debugging iOS on Mac side is good but can be buggy).
- Access to built in NuGet package management for third party libraries
While Visual Studio on Windows has been around for a while, Visual Studio for Mac is only a couple of years old and still feels like a work in progress. It is still a very robust IDE that I can work with, but it feels lacking when compared to the Windows experience. There is also Visual Studio Code for both Windows and OSX which is a much lighter IDE but still very useful and has many of its own plugins. I recommend using VS Code if you run into issues with Visual Studio for Mac.
There is an Active Open Source Community
Xamarin was built in the open source community, and when Microsoft acquired it, they promised to continue to keep it that way. They have kept true to that promise, and currently, anyone is welcome to make contributions to any of the mainline repositories:
The Xamarin community is still very active and always looking for new projects and improvements to work on. They have developed many NuGet packages for handling the cruft of the development of things such as OAuth, data storage, calling rest API’s, and new packages are being created all the time.
Along with the benefits you get with a project being open source, you also have access to documentation and project samples you would expect from a Microsoft paid product. Microsoft wants to make sure developers have what they need to get started, and they offer many free alternatives to their enterprise software and services.
Backed by World’s Most Valuable Company
Microsoft has been a very successful company for many years now but has only just recently dethroned Apple for the world’s most valuable company (by market cap value). With a significant backer like this, companies should feel comfortable relying on the support and longevity of Xamarin, Visual Studio, and the .Net Framework.
There are many other reasons why I think Xamarin is in it for the long haul, but I think the biggest reason is that Microsoft is betting on this and they are making sure to put adequate time and resources towards Xamarin to ensure its success. They are continually putting out statements and updates on plans for the future of Xamarin and that future looks promising. I highly recommend you keep up with the Xamarin Blog if you want to know what is coming down the pipe.
Check it out
Now that I’m done gushing about why you should believe that Xamarin is here to stay, you should really check it out. To start with I recommend checking out this Xamarin.Forms quick start guide. I plan to go into more detail on what Xamarin.Forms is and what it provides on top of the standard Xamarin libraries in a future post so stay tuned! It is my favorite way to build cross-platform UI’s.