In this article we are going to go through all the pros and cons of the Xamarin technology for the purposes of application development. The categories which we are going to use for comparison are the same categories used for the Mobile App Development page.
To learn more about other app development technologies (e.g. Flutter, React Native, Swift etc.) go to the Mobile App Development page.
Xamarin was one of the early hybrid technologies and had its prime era around the same time as the Windows OS was released for mobile platforms.
Given that Xamarin can also be used to develop apps for the Windows OS, this also means that it is the only technology to support not only two native technologies, but three.
As we know today, their OS have not seen any substantial adoption on the market, so its advantage of support for three native systems should perhaps not be considered of high value.
Regardless of that, the Xamarin hybrid technology can and is still being used for creating native iOS and Android apps.
As a hybrid technology, Xamarin automatically gains the cost advantage, when compared with native technologies, since only one code base to some extend will be necessary.
For device-specific functionalities, animations, file- and permissions management it is still required to write native code. This also means that Xamarin requires more coding and thereby more work in comparison to other hybrid technologies. (e.g Flutter and React Native)
Xamarin has been around as a mobile development technology for a long time. However, it have never seem to get its real breakthrough. This is at least what can be concluded from general search volume and query results from respectively Google Trends and Stack Overflow Trends. (see trends section)
This also means that the educational resources for Xamarin are limited in comparison to Flutter and React Native. Though it should be noted that Microsoft is generous when it comes to publishing educational resources themselves.
Finally, it should also be noted that Xamarin’s implementation of the hot reload feature does not compare to several of the competitive technologies. The lack of a fully implemented hot reload feature will on the long run also affect the cost of development.
Xamarin applications are written using C# and .NET, which are both a language and framework which any Microsoft developer should be comfortable with.
All UI development, within the Xamarin.Froms framework, is done with the XAML markup language, which shares many similarities with XML.
Xamarin can access native libraries and it is thereby possible to combine a Xamarin page within a Native project.
In order to achieve this, you would have to create your native parts of the project as an external library and integrate it into the Xamarin project. It has to be implemented this way, since Xamarin requires to be in control of the application’s main method.
When investigating each of the three project’s contributors, it is clear from the network graphs that it is primarily maintained by the Xamarin team (aka. Microsoft).
It would appear that only a few external developers have been permitted to push to the projects.
When looking at Xamarin’s customer and certified consulting partners, there is apparently no other major IT companies on the list. I would therefore personally favor other hybrid technologies over Xamarin if we were to compare their support and adoption rate on the market.
Xamarin is open source. The core Xamarin project’s repository can be found here. This includes the three primary projects: xamarin-android, xamarin-macios, and Xamarin.Forms.
When investigating each of the three project’s contributors, it is clear from the network graphs that it is primarily maintained by the Xamarin team. It would appear that only a few external developers have been permitted to push to the projects.
For device-specific functionalities (e.g. camera and location), animations, file- and permissions management Xamarin still requires native code.
This means that Xamarin requires more coding and thereby more work in comparison to other hybrid technologies. (e.g Flutter and React Native)
Performance achieved by Xamarin, it comparable to Android and iOS since the final app will be written as native.
Allegedly, Xamarin’s core compiled native functionalities are so close to native performance that it is not worth considering it as a disadvantage.
However, some declines in performance might happen when working with native UI components through Xamarin.Forms as there is additional abstraction layers and wrapping being added to the native components.
Xamarin UI design and development is handled within the Xamarin.Forms project. This project is intended to manage all the UI inconsistencies between the different mobile systems. This should in the end also make it possible to only have one code base for the UI.
When using the Xamarin.Forms framework, you will receive three sub-projects to work with: one for android, one for iOS, and one for the shared code. The Android and iOS sub-projects work as bridges between the native APIs and the shared code in the last sub-project. This means that all basic UI components can be managed from the shared code sub.project.
However, in some cases the required feature might be platform specific. In these cases, it is not possible to use the shared code sub-project, and the feature will therefore have to be created within the platform-specific sub-projects (Android and iOS).
All UI development is done with the XAML markup language, which shares many similarities with XML.
The Xamarin.Forms project comes with the hot reload functionality.
However, hot reload only works on UI changed in the XAML files. It is therefore still necessary to recompile and deploy if changes were made to the inner logic of the application.
When compared with several other competitive technologies, Xamarin falls short on their implementation of the hot reload feature. The cost in developer hours of not having this feature will likely be worth considering before choosing Xamarin.
Xamarin requires both the Android and iOS SDK in order for the Xamarin applications to be deployed to the respective native OS.
The Android SDK is by default automatically downloaded as part of the Xamarin workload in Visual Studio.
If you by any chance had an interest in developing applications for Windows smartphones, it would require you to download the Windows Phone SDK. However, given the decline in Windows Phones, I would not consider this SDK a necessity if you are developing apps for the general market.
In order to work with Xamarin it is required to use the Visual Studio IDE with the Xamarin workload installed.
Visual Studio is an IDE owned by Microsoft, and it should therefore come as no shock that Xamarin is built for this IDE.
It should also be noted that the Xamarin workload provides automatic installation of the Android SDK, which is required for deploying a Xamarin application to an Android mobile.
Visual Studio also inherits the Android emulator through the Android SDK. This means that, similar to the Android Studio IDE, it is simple to configure and install any specific Android version on an emulator to quickly deploy and test the application in a virtual environment.
My name is Daniel H. Jacobsen and I’m a dedicated and highly motivated software developer with a masters engineering degree within the field of ICT.
I have through many years of constantly learning and adapting to new challenges, gained a well-rounded understanding of what it takes to stay up to date with new technologies, tools and utilities.
The purpose of this blog is to share both my learnings and knowledge with other likeminded developers as well as illustrating how these topics can be taught in a different and alternative manner.
If you like the idea of that, I would encourage you to sign up for the newsletter.