Let’s be honest, expecting a single solution to conquer the challenge of cross-platform mobile development is like asking for the impossible - a holy trinity of mobile development!
The reality is that building mobile apps for various platforms is expensive without shared code. Apple demands Objective-C or Swift, Android requires Java, and WinPhone relies on .NET, often with C#. Moreover, each platform offers a plethora of libraries for handling maps, graphics, images, and GPS, necessitating extensive time and expertise to create a single app.

It’s clear that most startups can’t afford to triple their development costs, and even established companies may struggle to justify the price of entering the mobile arena.
This article explores how Xamarin Forms, together with MVVMCross and SkiaSharp, can be a practical solution for building cross-platform mobile apps without sacrificing familiarity, performance, or uniqueness. We’ll delve into these technologies and how they can reduce development expenses by maximizing code reuse across different mobile platforms.
A Significant Challenge
The demand for cross-platform mobile development is undeniable, leading to the emergence of numerous solutions over the years aiming to minimize development costs through code sharing between platforms. In the gaming world, for instance, all major game engines, including Unreal and Unity, provide cross-platform support, targeting mobile phones and tablets.
On the app development front, there have been several attempts to dominate the cross-platform market. While many have faded away, a few persist after years of competition. Among these is Xamarin, the sole .NET solution offering comprehensive support for all three major mobile platforms.
Native or Not, That is the Question
A battle rages between different solutions, and what’s a battle without a bit of propaganda!
The heart of this battle lies in the elusive concept of “native.” Beware of this word, as its meaning is far from clear. Despite being a buzzword in mobile development, there’s no consensus on its true definition.
When evaluating cross-platform frameworks, remember that all “native” options are not created equal. Some define it by the programming language, others by the ability to utilize hardware features or platform APIs/UI, and many simply use it to distinguish from web apps.
Arguments abound on all sides, but delving deeper is futile. Why? Because, and this might be hard to swallow, your end users don’t care!
You read that right. Only programmers get caught up in the “native” debate. End users choose apps that solve their problems and offer a satisfying experience, not based on the underlying technology.
So, instead of arguing semantics, let’s explore how Xamarin provides an effective way to deliver what truly matters to your users.
The Trifecta: Xamarin, SkiaSharp, and MVVMCross
Before we proceed, let’s clarify the three components forming our solution to the cross-platform development puzzle.
Xamarin: The Foundation
As mentioned earlier, Xamarin, a .NET solution for mobile and desktop development, was acquired by Microsoft in 2016 but originated around four years prior with the Mono project. Today, it comprises three main solutions: Xamarin.iOS, Xamarin.Android, and Xamarin.Mac. Other platforms, being Microsoft products, already handle .NET apps natively. In essence, Xamarin provides direct access to platform APIs within .NET, enabling the use of native features in .NET apps. It also includes an extension module called Forms, which offers an abstraction layer for the user interface.
SkiaSharp: The Visual Enhancer
SkiaSharp acts as a .NET wrapper for Google’s Skia vector graphics library, the native rendering engine for Android, Chrome, ChromeOS, and Firefox. By integrating SkiaSharp, you can leverage this library in your .NET apps, making them truly cross-platform. This means those fancy shadows your designer insists will elevate your app can be coded once instead of repeatedly for each platform. Its standout feature is the ability to render SVG graphics, preventing duplication for various form factors while maintaining sharp, pixel-perfect visuals.
MVVMCross: The Architect
To ensure separation of concerns and loose coupling, our solution relies on MVVMCross. This framework implements an MVVM (Model-View-ViewModel) architecture, keeping everything independent. In simple terms, apps are generally divided into three parts:
- The Model: Represents data in memory.
- The View: Represents the UI, presenting data and actions to users.
- The ViewModel: Acts as the intermediary, binding the Model to the View and vice versa.
In software engineering, keeping the view separate from the ViewModel is crucial, allowing the application logic within the ViewModel to be reused even if the visual presentation changes. MVVMCross facilitates this by handling data bindings and providing patterns and tools for platform abstraction.
What Matters to End Users
To reiterate, several factors differentiate successful apps from failures. A successful app:
- Addresses a genuine problem.
- Provides an enjoyable user experience.
While point one is unrelated to framework choice, let’s focus on the second point. Three key aspects contribute to an enjoyable app experience:
- Familiarity
- Performance
- Uniqueness
Familiarity
Familiarity boils down to ease of use and intuitive navigation within the app. It’s about adhering to platform-specific user interface paradigms consistently. For instance, button placement, list context actions, and navigation patterns all contribute to an app’s familiarity.
Web apps or frameworks relying on web interfaces often struggle with familiarity. Xamarin Forms, on the other hand, provides cross-platform mappings to native UI elements, ensuring your users experience a look and feel consistent with the platform, leading to an intuitive and comfortable experience.
Performance
Let’s be blunt: touting “native” in marketing means little. Take Jasonette for example, which boasts being “native over HTTP.” With the UI residing on a web server, round trips and potential slowdowns are inevitable, debunking the myth that “native” inherently equates to superior performance.
Real-world benchmarks demonstrate that Xamarin delivers the most well rounded solution with regards to performance performance. Xamarin Forms, without introducing significant context switches, offers comparable performance to native language apps performance.
The takeaway? Your implementation choices often have a greater impact on app speed than the Xamarin vs. native language debate. Other solutions fall short in the performance arena.
Uniqueness
The ability to craft a distinctive visual identity is paramount for user experience and differentiation.
Uniqueness often involves creating custom controls, animations, or gestures. When Xamarin’s out-of-the-box features are insufficient, SkiaSharp (a wrapper for Google’s Skia vector graphics rendering library) steps in. Coupled with Xamarin Forms’ custom renderer concept, it allows developers to achieve near-native performance without sacrificing the benefits of coding in a single language, a feat other solutions struggle to match.
Business Considerations
By now, you’re likely realizing that framework choice is a business decision. Besides factors beyond this article’s scope, such as available talent, Xamarin offers compelling advantages, especially when combined with MVVMCross. Let’s examine four key aspects:
- Cost-Effectiveness
- Code Reusability
- Component Ecosystem
- Support and Community
Price and Development Costs
Let’s address the elephant in the room. Since earlier this year, Xamarin is free for freelancers and small businesses, including startups (with Visual Studio Community Edition). For larger organizations, it’s bundled with Visual Studio licenses, which you may already possess. Moreover, Xamarin Forms, MVVMCross, and SkiaSharp are all free and open source!
Opting for the .NET path with Xamarin allows you to develop apps entirely in C#. In contrast, many other solutions require proficiency in multiple languages. For instance, Cordova necessitates fluency in HTML, JavaScript, CSS, and potentially Objective-C, Java, and/or C# to access vendor APIs lacking plugins.
Juggling multiple languages leads to context switching and increased cognitive load, hindering efficiency. Xamarin provides an all-in-one solution: build, deploy, and debug on all platforms from within Visual Studio.
While not exclusive to Xamarin, C# offers features that expedite development, such as simplified multithreading with async/await, closures, and reflection, all contributing to increased productivity.
Code Reuse
You’ve likely considered code reuse, assuming all solutions offer comparable capabilities. However, that assumption might be misguided!
For those wondering why MVVMCross is favored over Forms’ built-in MVVM layer, consider this: are mobile apps your sole focus?
MVVMCross, through inversion of control, allows maximum code reuse not only across mobile platforms but also on Windows and Mac, thanks to Xamarin.Mac.
This approach not only saves money but also promotes good engineering practices, reducing long-term code maintenance costs.
Component Availability
Reinventing the wheel is rarely efficient. Access to existing components for easy integration is crucial for faster time-to-market and reduced development expenses.
Xamarin and MVVMCross offer two avenues for component acquisition. Firstly, Xamarin’s component ecosystem is rapidly expanding, with a dedicated Component Store integrated within Visual Studio, offering solutions to common app development challenges. Many companies also sell components directly, so thorough research is recommended before building from scratch (or consider selling your own creations).
Secondly, NuGet, the .NET package manager, hosts a vast collection of packages, including cross-platform MVVMCross plugins for common tasks like email, GPS, and localization.
If you’re already comfortable with C#, you can even create bindings for your favorite existing components and use them seamlessly within Xamarin, even in Forms, with a little help from custom renderers.
Speaking of which, exploring the Xamarin bindings Github repository before building your own is always advisable.
Support and Community
Access to support and resources is paramount when choosing a framework. Xamarin boasts a mature and active community.
Google searches usually yield numerous relevant results (don’t forget to try searches for “monotouch” and “monodroid,” Xamarin’s predecessors). Xamarin also provides comprehensive documentation and examples on its website.
Furthermore, since Xamarin essentially wraps vendor APIs, Apple and Google’s documentation remains relevant and valuable. You can create your own MVVMCross services to abstract these APIs within your shared codebase.
Regarding Xamarin’s future, its acquisition by Microsoft signals a bright future. Since the acquisition and the shift towards a more accessible pricing model, the community has flourished, support has improved, and product development has accelerated.
Xamarin’s future appears promising.
Ready to Rumble?
This article might spark debate, and that’s okay. Other viable options exist, and your priorities might differ.
However, remember that missed deadlines and blown budgets are detrimental to any project. If your six-week timeline stretches into months without a functional app, it’s time to reassess. Insisting on a purely “native” approach at that point could jeopardize your project’s success.
Xamarin and its accompanying technologies deliver what matters to your users and your business. This article aims to equip you with the knowledge to make an informed decision about the best framework for your next mobile app.