Flutter vs Xamarin: Another David and Goliath Story

Kieran McCarthy
Version 1
Published in
8 min readDec 11, 2020

The Battle of Technologies

For years, many developers and evangelists have compared technologies against one another which could stand the test of time. Gathering the masses of like-minded people to weigh up one technology against another, similar to good vs evil, a battle of David vs Goliath or if you should drink your tea with or without milk.

Alas!! This article will be no different!

With the dramatic entrance concluded, I do want to give a comparison, my personal feedback and view after working in both technologies building mobile applications, for myself and for customers. To give context to my professional experience in Version 1, I’ve worked mainly with customers in the Public Sector, the Agriculture Industry and with global companies from the Pharmaceutical Industry. I have product managed 2 MVP’s for a Pharma client internally with our team as well.

I want to talk about points in both frameworks which I find important as a mobile developer and as someone who really enjoys creating things. These points are like rounds in which the ancient fight commentator can compare Flutter and Xamarin in our battle of the ages.

Fighting Rounds:

  • Programming Language
  • Development Speed
  • Development Tools and Documentation
  • Performance
  • Compilation
  • UI
  • App Size

Let’s meet our David and Goliath!

Meet Your Contenders

The Mighty Xamarin

Xamarin was originally founded in 2011 by engineers who created a cross-platform implementation of Xamarin.Android and Xamarin.iOS. Xamarin was the first cross-platform mobile app development framework where companies can make both Android and iOS apps which look almost native. Later in 2016, Microsoft acquired Xamarin and it became part of Microsoft Visual Studios.

The Fantastic Flutter

Flutter is a free and open-source mobile UI framework created by Google and released in May 2017. In a few words, it allows you to create a native mobile application with only one codebase. This means that you can use one programming language and one codebase to create two different apps (for iOS and Android).

So what are we waiting for! Let the battle commence!

Round 1: Programming Language

Xamarin

Xamarin has been using C#(.NET) since the beginning of time (or since Xamarin came into existence). C# is very popular and used across many platforms and has a huge entourage of followers being used by the Microsoft Community. I use C# myself and found the transition from Java to C# fairly straight forward which is great when learning new languages.

Flutter

Flutter uses a language called Dart. With Dart’s syntax being similar to JavaScript or Java, developers find it easy to get started as it supports most of the object-oriented concepts. Even though Flutter is a new fighter in the division, the slope of learning is very shallow. It is said Dart takes approximately two weeks to learn. I gave myself the task to learn and build an app with Flutter and can confirm Dart is very easy to learn and is a lot of fun. You can check out Dart yourself here.

Round 2: Development Speed

Xamarin

Xamarin has been in the game for some time, has great development API’s. Learning C# will require a long learning curve if you didn’t come from an Object-Oriented background. And when compared to editors, IDEs are heavy-weight and building and compiling things takes time. Xamarin uses AOT compilation for iOS for the build and JIT/AOT for Android, so making UI changes takes time and makes me wait for things like changing layouts or showing different messages in the app.

One of the advantages of Xamarin is that it allows developers to test apps across the devices through the Microsoft Xamarin Cloud. However, you must pay a subscription fee to access the feature.

Flutter

The hot reload feature in Flutter helps developers build UIs, experiment, and add different features as well as to detect and fix bugs quickly with no loss of state on your physical phones or emulators. Developers also have access to native features such as 3rd Party SDKs and Libraries and can reuse existing native code (Swift, Objective C, Java, and Kotlin). This really helps with working with UI/UX teams as being asked to change the width or height of a Widget doesn’t take minutes to test but rather milliseconds. This speed of development really benefits fast releases of application or proof of concepts to the market first.

I have written a post previously about given myself a set time with some constraints to build out an Android app that you can read here.

Round 3: Tools and Documentation

Xamarin

Xamarin is developed behind the doors, so you won’t get some native features, like 3D-touch, Force touch etc, straight away. Xamarin is profoundly relying on Visual Studio IDE, which is quite difficult to undertake with the concept of VS Code or similar IDE if the developer is from the non-Microsoft stack. Commercial projects need to buy a license of the Microsoft Visual Studio IDE yet it is available for free with limitations.

Flutter

Flutter comes with a suite of great tools built into it. Ways to analyse your code, run tests and it even has a doctor to check how your setup is feeling. The Flutter SDK really comes with a punch. It also allows you to develop on any editor that supports Dart.

As for IDEs and editors I personally use Visual Studio Code. You can add Dart and Flutter extensions which really bring the editor to life. Its very lightweight and allows you to use snippets to speed up development even faster. On top of this, Flutter does not need any proprietary software to run on.

What really shines through for me is the documentation of Flutter. In my opinion, it is second to none. Very detailed with examples you can run in the browser. The Flutter team even do a Widget of the Week video series where they talk about certain widgets!

Round 4: Performance

Xamarin

Xamarins performance is comparable to native mobile applications, which makes it a go-to option for developing the high-performance app with native outlook and feel.

Flutter

There is a general notion that Flutter delivers better performance than Xamarin. But, this is not any misconception, indeed it is because Dart code is compiled with native machine code, therefore eliminating the need for Javascript bridge.

Round 5: Compilation

Xamarin

The Xamarin profiler has numerous tools to analyse the performance and clarify the meaning of the data presented on iOS and Android applications.

The framework uses native components for UI designs and runs native code directly on the smartphone hardware that results in the performance of nearly to native applications.

Flutter

Flutter compiles source code into ARM byte code. The results here are very performant apps. Flutter relies on the AOT compilation of Dart for when you are releasing your app and the JIT compilation of Dart for when you are developing your all. Dart is actually one of the very few languages that are capable of being compiled to both AOT and JIT, and for Flutter this is great.

Round 6: UI

Xamarin

Being the oldest cross-platform SDK, Xamarin has solid documentation. Xamarin supports multiple platforms, like iOS, Android, Forms, macOS, watchOS, tvOS, etc, which in turn have lots of UI components and modules in place for developers to build on. Xamarin also has documentation for developing individual components, like layout, buttons, pop-ups, databases, etc.

Flutter

The Flutter framework is bundled with UI rendering components, device API access, navigation, testing, stateful management and loads of libraries. This rich set of components removes the need to use third-party libraries. If you get the Flutter framework, it means you will have everything needed for developing mobile apps. Flutter also has for Material Design and Cupertino that allow developers to easily render the UI on both iOS and Android platform.

Round 7: App Size

Xamarin

Xamarin supports lots of platforms, but the size of the binary is relatively small. However, when Xamarin apps are bundled for release, then the app size gets a bit bigger. There is no code and performance optimization before it is shipped to app stores.

Flutter

Flutter app binaries are usually bigger and the apps are bigger in size in comparison with native iOS & Android apps. As mentioned on Flutters FAQ, Flutter core engine takes up 2.7 MB + there are the framework and app code which makes app binaries a bit heavy in size.

Fight Recap

Now that the fight is over, let's look at the match review!

Who won?

Normally one would say “We are all winners here", or even “These are all tools for the job, use them respectably”. This is true…but that’s boring. I want to tell you what I believe came out on top for me as a mobile developer.

Flutter!

Hands down in my opinion. I grew my love for building mobile apps again thanks to Flutter. Working on building my app for the Google Play store and actually setting out a challenge for myself I came to really enjoy the mobile development process again. How fast I was able to transfer something from paper to something usable in mobile was surprising. How easy it was to create UIs using a vast amount of existing widgets was breathtaking.

How easy I was able to create animations made me laugh thinking of all the previous pain I went through in other frameworks. I have lost track of time working with Flutter from sheer enjoyment.

If you are planning to get started in Mobile Development or even want to start building things to be used by others, I’d recommend looking into Flutter ✌

If you are interested in hearing more about Flutter and life lessons and mistakes of becoming a developer, give me a follow and a few claps to let me know I’m on the right direction of article writing!

--

--

Kieran McCarthy
Version 1

Software Engineer | Deep Learning Enthusiast | Chat Bot Builder | Coffee Lover | Creator | Practising Writing