Building a native mobile app usually begins with a critical decision about whether to develop your app for both Android and iOS and which to develop first. Some apps – called hybrid apps – enable developers to create a single app that works on both Android and iOS. These hybrid apps use web technologies like HTML, CSS and Javascript for their base functionality. They can also use native plugins to extend their functionality, leveraging device features such as GPS, camera, contacts, email and so on.
A new development framework called Xamarin takes a different approach to cross-platform development and is not based on web technologies.
What is Xamarin?
Xamarin is a framework used to develop mobile apps across multiple platforms. Xamarin enables developers to use a single programming language, C#, to build apps for iOS, Android and Windows Phone. Xamarin’s appeal is that, unlike native apps, developers only have to write one version of the majority of the source code.
C# is a long-standing language within the software development community, but that doesn’t negate the learning curve associated with using Xamarin. There are multiple pros and cons to consider when deciding whether to use this framework.
Pros of Xamarin for App Development
1. One Code for Multiple Platforms
Xamarin can provide a near-native experience across multiple platforms, which is a game-changer for businesses that need an app that works on iOS and Android devices (i.e. a cross-platform app). Writing the base code once can cut down on time and cost, over native development.
2. Near-Native Performance and User Experience
Xamarin allows for a platform-specific user interface (UI), which makes the user experience more native. Xamarin Forms can translate simple app elements across platforms, which significantly speeds up the development process. For more complicated apps, Xamarin still allows developers (who know how) to create native code for user experiences in iOS and Android.
3. Excellent Testing and Insights
Xamarin has excellent tools to test for bugs and inconsistencies, which is a major necessity in cross-platform app development. Xamarin’s Test Cloud allows developers to test on 2,000 devices. Xamarin Insights further smooths quality assurance with myriad data about your number of users, the devices they use, session lengths and frequency, app crashes and other events. These capabilities aren’t unique to Xamarin, but they are useful.
4. Microsoft’s Acquisition
Microsoft acquired Xamarin in 2016, signifying its confidence in the tool and that it will be the preferred platform for integration with Microsoft. All of Xamarin’s libraries and tools are now open source and available as part of Visual Studio. With this major corporate backing, it’s a safe bet that Xamarin will become more supported and reliable in the future.
5. Simplified Maintenance
When there’s only one programming language, making updates to a mobile app becomes much easier: you’re updating one app instead of two. Xamarin developers can update a single file to gain functionality with both iOS and Android.
Cons of Xamarin for App Development
1. Newer Platform Means Smaller Community and More Bugs
As a newer tool, Xamarin has a smaller community of developers—less than 10 percent of the global development community. That means finding an experienced developer will be more difficult, and Xamarin developers have fewer resources to rely on. Like all platforms, Xamarin has bugs of its own, but being a newer one means that there are likely more and with a smaller community there are fewer solutions.
2. Limited to Xamarin’s Library of Components
Xamarin only supports elements that are available in its own library. It’s an extensive library, but if your app is highly customized or complex, and you want a truly intuitive UI for both iOS and Android, you might still end up with a lot of native coding. And, any code written in Xamarin can only be used in Xamarin, meaning that any custom element your developers create usually can’t be used for future native app development.
3. A Native User Interface Still Requires Native Coding
Xamarin’s UI and UX are mostly solid across both Android and iOS, but they aren’t the same as native, especially for complex and custom mobile apps. To ensure that a custom Xamarin app truly has the same quality UI as a native app, developers will need to write code specific to iOS and Android. Especially if your app relies heavily on appearance or on creating a high level of user interaction (like graphics that depend on real-time data or leverage live-mapping), you won’t save as much time developing in Xamarin. Nor will you get away with not having knowledge of native technologies for iOS/Android.
4. Larger Size
Xamarin apps are typically twice the size of native-built apps. They contain a package that includes not only the app itself, but also the libraries, Mono runtime and Base Class Library used for Xamarin apps. A larger app means slower build, download and install times.
5. Not-so-simplified Maintenance
The time and effort a Xamarin app saves by maintaining one app instead of two might easily be lost with Apple or Android updates. Apps written in these platforms’ native languages can be updated right away to integrate any new features. Xamarin apps typically have an API lag, meaning developers need to wait for the framework to integrate the iOS or Android update before they can begin updating your app. Xamarin generally updates APIs quickly, but users have reported problematic delays on several occasions. With Android and iOS releasing different updates at different times, you might still end up reworking code twice and experiencing delays both times.
6. Xamarin Has Its Own Learning Curve
Learning Xamarin is slow and cumbersome, even for experienced C# developers. Many developers who have tried it report frustrations in problem solving, mostly due to the smaller community and bugs within the framework.
Xamarin itself creates a whole new learning curve and because it hasn’t been around a long time, finding a developer that won’t have this learning curve will be tough. It’s faulty logic to assume that an experienced and skilled C# developer can hit the ground running to create your next corporate app with Xamarin.
Final Thoughts
Xamarin is a powerful tool that provides an alternative to native development, or hybrid development using web technologies. By leveraging a long-standing language like C# and Microsoft’s technology, it opens the field of mobile app development to a larger pool of software developers. With Microsoft’s backing we are confident it will get better the more it grows.
But for now, it’s not proven enough to be a technology we embrace for our client projects here at Big Fish. For the type of complex, business-critical apps our clients hire us to build, there are simply too many mitigating factors to make it a wise choice at this time. Until it is more established and can be proven not to cause long-term problems and bugs, we recommend a different development approach to avoid a costly rebuild.