Flutter vs Xamarin: Which Cross-Platform is Better for Mobile App Development in 2021?

As you already know if you’ve been reading our blog, we’ve been focusing on Flutter these last couple of weeks.

First, we wrote a post that explained what is Flutter and why you should care about it. Then we published a comparison post where we put Flutter against its main rival, React Native.

Today, we’re going to continue with Flutter for two main reasons:

  1. It’s an amazing solution and we’ve been enjoying using it
  2. There is so much more to tell about it and the unique set of benefits it brings to the development world.

As the title suggests, today’s article is about Flutter and Xamarin.

The goal of this post is to provide developers with a basic understanding of both technologies and the differences between them so they can intelligently opt for the solution that better suits their needs.

Flutter, The Basics

2.png

In case you haven’t had the chance to read our first piece on Flutter, here’s the TL;DR version of the fundamentals:

Flutter is an open-source tool for developing native apps on Android and iOS. It was launched by Google in Q4 of 2018.

Flutter consists of two main components:

  • An SDK (Software Development Kit) - a collection of tools that are going to help you develop your applications. This includes tools to compile your code into native machine code (code for iOS and Android).
  • A Framework (UI Library based on widgets) - a collection of reusable UI elements (buttons, text inputs, sliders, and so on) meant to help you personalize your work.

Flutter has its own programming language called Dart.

Dart was created with the goal to replace JavaScript. It is a language for front-end development. It can be used for the creation of both mobile and web apps, but it’s far more used for building mobile apps than web-based projects.

Xamarin, The Basics

3.png

Xamarin was created by the same San Francisco-based company that created Mono. The solution has been around since 2011. Just like Flutter, Xamarin is a cross-platform for mobile app development. However, what makes this solution different is its implementation of Microsoft’s .NET.

The tech giant that stands behind the whole 365 productivity suite, has acquired Xamarin back in 2016.

The first thing Microsoft did when it got its hands on Xamarin was: integrate it into the .NET platform.

The framework now belongs to the C#/.NET/Visual Studio group of software products.

With the integration, Xamarin now extends the capabilities of .NET by providing:

  • A base framework to access native platform features;
  • XAML (Extensible Markup Language) to create dynamic mobile apps using C#;
  • Libraries for common architectural patterns like Model-View-View-Model (MVVM);
  • Editor extensions that highlight syntax, help to finish coding and more.

So, What are the Key Sellers for Both of These Solutions?

Once again, we’re going to refer to our first article about Flutter. Here are some of the biggest reasons why developers go for Flutter:

  • Cross-platform development. As mentioned above, Flutter makes it easy to build apps that run both on iOS and Android
  • Flutter is super easy to use. Unlike Java, Flutter simplifies everything and makes it easy for developers to create working mobile apps with very little code
  • Flutter gives developers the option to introduce changes to their code and see how their latest updates perform in real-time. This function is called Hot-Reload
  • Flutter is great for MVPs. If you’re a developer who quickly needs to build MVPs and deliver them to your employer - this is the tech for you. With Flutter, you can build MVPs easily and cheaply because you don’t need to create and maintain two mobile apps (one for iOS and one for Android)
  • Flutter comes with lots of awesome documentation which makes it super easy to learn. Flutter's official documentation website is a true goldmine. The information that is shared there is very detailed and full of actionable examples.

For Xamarin, the following perks usually stand behind the decision to choose this solution over the others:

  • Cross-platform development. Just like Flutter, Xamarin enables developers to create a single app that runs on both Android and iOS
  • Supported by Microsoft which means that you get very good documentation. This helps developers to learn how to master a piece of tech and build what they envision. As a developer, you can take the advantage of tools like the Xamarin Test Cloud. Microsoft takes really good care of this product. The company makes sure that it’s always 100% up-to-date and free of any bugs
  • Xamarin uses C# and .NET which gives developers a powerful toy with lots of flexibility to play around. Additional perk: lots of developers already know C# and .NET, which is why they tend to go for Xamarin.

Cons

4.png

If you’re thinking about opting for Flutter, there are a couple of things that you need to know first:

  • UX limitations: yes, Flutter helps developers create near-native apps, but the look-and-feel of those apps can’t fully match the solutions that were created specifically for each platform with native tech.
  • Maturity issues: Flutter is still new and, like every new solution, it suffers from the same type of problem - stability. Lots of libraries are still in the early stage of development, and Flutter lacks some of the advanced features that utilize the power of native mobile operating systems.
  • Dart: Flutters programming language is great, but it has some areas that need improvements. It lacks the maturity of native platform-specific development languages like Swift or Kotlin. It doesn’t offer lots of powerful features like the previously mentioned languages do.
  • App size: Flutter apps tend to be large. Downloading and updating them can take more time than native apps.
  • Maintenance: Both Flutter and Dart are undergoing frequent changes. This could make it hard to maintain the codebase.

Xamarin has different problematic areas that developers should know about before choosing to build their app with the help of this solution:

  • Licensing: Yes, Xamarin is a free, open-source framework, but only to a certain extent. If you’re developing large, commercial applications, you’ll need to reserve some cash for Microsoft’s Visual Studio IDE. When we say “some cash”, we mean a lot. This is an expensive license that most developers are not always prepared to pay for.
  • UX issues: Just like Flutter, Xamarin has the firepower needed to deliver a near-native experience, but its UX is just as problematic as Flutter’s. Both Android and iOS development come with certain limitations. For instance, it supports limited generics for iOS. For Android, the dynamic language support is limited.
  • Not enough help online: Xamarin developers’ community is small and there’s not enough content to use for learning how to deal with specific use cases.
  • .NET only: The code you write in Xamarin can only be used within the .NET development stack. Reusing it on any other tech stack is impossible, which is a major issue.

So, Which One Should You Opt For?

It depends. Both solutions are good and they come with many advantages and a handful of limitations. Your choice here, bluntly speaking, boils down to your project requirements.

If you’re looking to quickly build a complex solution that requires you to heavily focus on development and testing, you should go with Flutter as your framework. Flutter has excellent tools for testing and CI/CD also helps in these specific case.

Xamarin is a great option for any type of smaller development. Especially if you already know .NET. However, Microsoft’s Visual Studio IDE license is just too expensive for most teams out there, so our vote goes to Flutter.

Over to You

If you’re looking to learn more about Flutter and how you build a great mobile app with the help of this framework, feel free to reach out to us. We at Share IT do a lot of work in Flutter these days and we have the bandwidth to take on more projects and build a mobile app for your business that will impress your customers!