Pros and Cons of Mobile Development with Xamarin
Learn about the pros and cons of using Xamarin as your main mobile development tool. Some food for thoughts, plus Xamarin development tips and tricks. Cross-platform app development is a great way of improving the velocity and quality of app development for any enterprise. Learn how Xamarin can help with that.
There are plenty of choices when it comes to mobile development tools. Some tools are there just to facilitate the process and make your life easier. But there are tools that become virtually irreplaceable during the development process. These are the juggernauts of the app development world and include, but are not limited to, Xamarin, Cordova and React Native.
Last year Microsoft acquired Xamarin, blatantly hinting app developers at the basket where they should be putting all their eggs. But why exactly should you pick this software over its alternatives? Maybe it’s not exactly your cup of tea?
Let’s dive deeper into the specifics of Xamarin and see what makes this product unique and worth the learning curve, if you’re about to embark on a lifelong journey of mobile app development. This post should also be useful for developers who are looking for an alternative to their current app development stack.
Pro: App Development Dream Team
We all like to hate corporations from time to time, but the reality sometimes goes against our expectations. The fact that Xamarin is now part of Microsoft’s software bundle puts it above its competitors. With Xamarin, you’re getting:
- Developer support
- Learning opportunities
- Stability and performance, especially for products like Test Cloud
All of this is possible because Xamarin has the backing of one of the biggest tech giants in the world.
Pro: Flexibility of C#
Xamarin utilizes C# as its main programming language. If you’re a development company that has its hands in many pies at the same time, this is absolutely invaluable. Given the nature of C#, your team can easily switch between developing apps for various platforms, since C# is the shared language for all of the apps developed via Xamarin.
Over 70% of code is reusable between iOS, Android and other platforms in Xamarin, and that means lower development costs and more flexibility for your team. Not to mention that these days practically all enterprise-level development companies have a couple of C# devs on board, so switching to Xamarin gets much easier.
Pro: Minimal TTM
Time to market is essential when you’re developing a highly competitive app or when you’re on a tight deadline. With Xamarin’s Test Cloud, you can easily run tests through 2,000 devices and quickly learn about all possible code inconsistencies within your app. Don’t underestimate the importance of testing, especially when you have limited hardware and human resources.
Pro: If It Quacks Like a Duck…
With Xamarin you’re getting practically the same level of performance as from a natively developed app. In fact, Xamarin’s Mono implementation is often more efficient than Java code, as was proved by various tests a long time ago.
Pro: Houston, We Don’t Have a Problem
With Xamarin Insights you know everything about your app crashes, user interactions, user devices and much more. With this tool, your QA process becomes more effortless and fluid.
Pro: Xamarin Forms
If your apps require little platform-specific functionality, then Xamarin Forms is the right tool for you. It’s currently one of the simplest ways of building cross-platform user interfaces, without having to worry about any specific platform. This tool is essentially the ultimate code sharing experience that any developer who is not very good at at UI will appreciate.
Pro: Code Maintenance
Maintaining an app in a working condition is especially tricky when you have more than one platform involved. Every little functional change has to be propagated through other platforms. Xamarin is at a definite advantage here, given interchangeability of code between iOS, Android, and other platforms.
This directly influences the time required to maintain the code, debug or update its logic when the need arises. The cross-platform experience enabled by Xamarin can save you hundreds of hours that could have been spent upgrading each app for each platform. And that, in turn, translates into thousands of dollars saved, especially if you’re using a third-party developer.
Pro: RMAD and .NET Embedding
Rapid Mobile App Development (RMAD) is a relatively new concept that incorporates tools and products which significantly decrease the time required to develop an app, and additionally enable non-tech or less code-savvy users to participate in the development process. Xamarin was made for RMAD, but one specific feature of Xamarin Forms stands out - .NET embedding.
It allows you to feed your production .NET code (like C#, F#, etc.) into other programming languages. So if you already have an app, you can port its code to a different app through Xamarin, given that this code supports .NET embedding. For example, you can ‘consume’ .NET code from your Android Java app. This significantly improves the interchangeability and versatility of code that you produce.
Pro: Xamarin University
One thing that defines the longevity of a platform is its ability to consistently and systematically educate its users. Xamarin University is a perfect example of a robust educational ecosystem for users of any skill level. A lot of the courses are self-paced, so your developers can quickly fill the gaps in their expertise with Xamarin on a custom schedule. And it’s cheap, starting at roughly $90/per month per developer for live courses.
But it’s not all rainbows and daffodils when it comes to Xamarin…
If you feel like there’s a stack of cash burning through your wallet, Xamarin might be the right choice for you. With a business license starting at $999, Xamarin development becomes pretty much unsustainable for many development companies. Not to mention that such pricing severely limits collaboration options, since only the Business package allows you to create multiple developer accounts.
Con: Component Limitations
Xamarin only supports specific technological components that are available within its library. Yes, the list of available elements is pretty extensive, but you may run into a situation when a specific template or a graph is not available, especially if you’re working on custom development projects.
This also means that there are limitations for multi-touch functionality and certain platform-specific gestures. These have been observed for the longest time, so the developers took it into their own hands given Xamarin’s open-source nature. You’ll find lots of missing functionality available from developers who got tired of waiting for Xamarin to release support. On the one hand, this is great as the community members are expanding the library. On the other hand, if there’s a function that you need in the app and it’s not supported - you’ll have to ‘take care’ of it yourself.
Con: Ghost Town
Probably the biggest disadvantage of all hybrid app development products is the community, or rather its absence. It’s an obvious fact - Android and iOS, on their own, have great, vivid and elaborate communities. But tools like Xamarin aren’t that overwhelmingly popular, since the number of developers working with ALL major platforms at the same time is significantly smaller than the number of developers dedicating their time and efforts to a single platform. Specialization is the key to success in many app development niches, so communities for Xamarin and other similar tools are pretty limited. At the same time, things are improving in terms of the ecosystem and API robustness, which should give the community a boost it desperately needs.
Con: Code Reusability
If suddenly your team switches to a different tool or you add more people coding for a different platform, you’re in for some rough times. Any code written in Xamarin can only be used within this platform. This means that you can’t reuse it for a native app or for any HTML5 apps, which severely limits code longevity and usability.
Con: Code Overhead
Xamarin has to work with various platforms at the same time, which means that apps created through Xamarin have an overhead. To put it simply, they’re overcomplicated to allow that smooth integration. The downside of this is the fact that Xamarin-built apps are ‘heavier’ and may take up more space than native apps. Simply because native apps don’t need that shared functionality.
Con: API Lag
It still takes time for Xamarin’s API to be updated. So, for example, when a new SDK for a platform with all the latest features is released, Xamarin needs to properly integrate it into its ecosystem to maintain the code-sharing capabilities. This means that your devs can’t start working on new features for your apps until that support is enabled. With the current pace of updates and all the various technologies that are being introduced for Android and iOS, this might be a competitive bottleneck.
Specifically, Android support usually lags behind iOS (APIs for new Android SDKs usually take longer to be introduced). If your focus is on Android, you might want to keep this limitation in mind.
Con: UI + Graphics
If you’re not using Xamarin.Forms, you’ll still need to develop UI for each of the platforms separately. There’s no single framework that can be shared between them. Yes, the elements can be extracted and duplicated, but not the whole UI. This means that your development team should still be experienced with Objective-C, Java, Swift, and Kotlin to properly build a foundation for all the UI elements.
On average, an app built with Xamarin shares around 35% of the code, the rest is platform-specific. The remaining 65% includes UI that has to be built separately. It does depend on the libraries that you’re using, as more of them become available through community support that we mentioned above. So you can get the margin of reusable code higher, but that requires some ingenuity from your development team.
This same limitation makes the development of complex apps, like games, pointless in Xamarin. Essentially, it’s useless to utilize Xamarin for these specific applications, as the UI for each platform will have to be built from scratch. This is a monumental task for game apps with all their variety of interactive UI elements. So code sharing doesn’t provide you with any meaningful productivity gains. Same is true for even less complicated apps, where you’d just want to add specialized platform controls, like a custom view in iOS.
With all its flaws and certain limitations, Xamarin remains one of the most robust, extensive and productive hybrid app development environments. Many of its flaws are being taken care of, given that Microsoft has the necessary resources and experience to pull such a multifaceted project.
WANT TO START A PROJECT?