Microsoft has announced the Xamarin end of support date as May 1, 2024, for all Xamarin SDKs. Now is the
right time to rewrite existing Xamarin apps into a technology that will continue to work with assured
platform support. The standard option is .NET MAUI (Multi-platform App UI). However, it is not the only way
out. This blog will discuss various options when it comes to technology and how businesses can prepare their
apps for the future.
Let's take an example:
- Consider a project which was initially written in Xamarin to save cost, to be able to deploy the same
codebase into iOS as well as Android.
- There is a support team already maintaining the app. The team is well-versed with C#, XAML, etc., and is
familiar with the app's functionality.
- However, these developers might not know other cross-platform technologies like React Native or Flutter.
- The project uses Microsoft AppCenter for Continuous Integration (CI) and Continuous Delivery or
Continuous Deployment (CD).
- The project has decent code coverage in terms of unit test cases, again written in Xamarin.
The immediate choice of technology might seem like .NET MAUI, the next Microsoft venture. The competing line
of thought is to consider rewriting the Xamarin app into another cross-platform technology such as Flutter
or React Native.
Flutter vs. Xamarin | Comparison
For the scope of this blog, we will consider Flutter (or React Native) as a competing platform and draw some
quick comparisons.
Integration
.NET Multi-platform App UI can seamlessly integrate with the existing ecosystem, which is .NET based.
Flutter will seem new to the block, and in organizations where backend and frontend technologies are all
picked from the .NET ecosystem, Flutter/Dart may seem alien.
Developer Productivity
Both platforms support hot reload. An advantage for developers who migrate Xamarin to MAUI is that they can
easily migrate the existing business layers. But in a well-architected system, such lines of code can be
assumed to reside in the server code rather than individual platform code.
Besides, AI-based code generation, such as GPT4, can read a file in one programming language and rewrite it
in another in seconds. It might be a good idea for long-running projects anyway, as every language goes
through multiple lines of iteration. Even though old code might work well for the use case, it might not be
the most efficient. For example, language constructs such as filter/where/LINQ, forEach, sort, and
async/await were not popular among the programming languages a decade back.
User Experience
Flutter has been around the block for a while. It has many beautiful UI elements and animations created and
maintained by the community. The general look and feel of Xamarin apps will need to be worked upon to reach
a similar pleasant visual feel as Flutter apps. If it is in scope, such customizations will give an edge to
Flutter.
Performance
.NET MAUI has claimed an increase in performance of about 65% on top of Xamarin. It is yet to be seen how it
will compare with Flutter. As a UI platform, Flutter has captured the attention of the industry. The
underlying Dart programming is modern, with a strongly typed syntax, null safety, and ahead-of-time
compilation, which assures excellent performance. However, MAUI attains native performance by converting the
elements to native elements under the hood.
Learning Curve
In organizations that regularly employ C#, Dart and Flutter might be new entries. Still, in experience, even
entry-level developers can pick up any of these languages in a few weeks. Moreover, FlutterFlow, a
What-You-See-Is-What-You-Get (WYSIWYG) platform, helps pick the nuances of the framework in a couple of
days.
Community Support and Regular Updates
Flutter is supported by a large, enthusiastic community. It is backed by Google, which has migrated its own
apps onto the platform. The .NET Multi-platform App UI community is relatively new, and the response rate
and support are not at par with the demand. Also, it is yet to be widely adopted.
At the time of writing this blog, the last one-month insights on these platforms indicate 274 closed issues
and 218 new issues for MAUI, whereas 1230 closed issues and 491 new issues for Flutter. The vast difference
between new issues / closed issues (MAUI ~ 1.25, Flutter ~ 2.5) indicates the platform's stability and .NET
MAUI has much to catch up on here.
Xamarin CI/CD and Unit Test Cases
There are excellent options for both the platforms provided by Microsoft and other vendors. One advantage of
an existing CI/CD pipeline setup for Xamarin is that almost the same could be re-used with minimal changes
for MAUI. More fine-tuning might be needed for packaging and publishing Flutter apps, which could be a
one-time activity. Just like business logic, unit test cases can also be rewritten with the help of an AI
code generator pretty quickly.
Conclusion
The adoption rate of .NET MAUI is low, with no significant players releasing any apps with multi-million
users to app stores using.NET MAUI. Flutter or React Native could be more appealing as a technology upgrade
from Xamarin in spite of the potential for code reuse in MAUI. To upgrade Xamarin to MAUI, developers should
create a proof of concept with all the essential technical features necessary for use case, such as taking a
picture, Bluetooth Low Energy (BLE) access, Global Positioning System (GPS), audio video access, basic
navigation, and may be an infinite scroll. Nous Infosystems is a leading digital solutions provider with
deep expertise in developing comprehensive Enterprise Mobility Solutions for customers, and can help define
a robust migration strategy for existing Xamarin apps.