Interserv often use and recommend Xamarin and its successor MAUI for app development and here I'll attempt to give some simple answers to common questions we've been asked.
What is .NET MAUI?
MAUI (Multi-platform App UI) is an evolution of Xamarin ā a widely used app development platform which is used to build Android, iOS and Windows apps. MAUI is open source and owned by Microsoft and part of the overarching .NET platform.
MAUI enables a large portion of an app's code to be written once and then used across multiple apps targeting all the major mobile operating systems. It also allows developers to use a single coding language, C#, for all target environments. This means that, for example, code written to make a photo look brighter could be reused across different implementations of the app for each target platform without it having to be re-written in a different coding language for each (e.g. Java for Android and Swift for iOS). This also means that when writing code specifically for each platform, you can do it in C#.
Why do we use it?
The reasons to use any particular technology for a project will invariably depend on both the project and the team.
For Interserv in general:
Code Reuse
Arguably the biggest selling point for MAUI is the potential for code re-use across target platforms. In some instances up to 96% of code can be reused. This can save considerable amounts of time for some apps.
Native Apps
The apps produced are native. Not pretend native with HTML running in a WebView; they are really native. A MAUI app will run with hardware acceleration and can access all the features of the target operating system. This means it's possible to create a user experience that is second to none on each target platform while still enjoying the benefits of .NET.
Dev Tech
The C# coding language and the Visual Studio development environment used to develop MAUI apps are mature, powerful, and well known. This means the technology will function predictably and includes both staple and advanced features. Also, large amounts of existing code can be easily repurposed from existing projects (even non-MAUI) and included ā no rewriting necessary. And should there be a requirement to modify the team, new talent can be quickly engaged and brought up to speed.
Many Interserv team members have a significant C# backgrounds. Continuing to use these skills across multiple types of projects keeps them sharp, reduces context switching, and limits the burden of learning and maintaining multiple coding languages for cross-platform development.
Between code reuse and focus on a single environment you can realise significant efficiencies all throughout an app's life-cycle.
Open Source
One of my favourite things about open source software is you can see what the project's team priorities are and what is being worked on. Plus you can always grab the code, make a change, and commit the fix yourself if you're so inclined. Being free is nice too.
What are the trade-offs?
In our experience, building an app's user Interface in Xamarin can be finicky and time consuming, though MAUI goes a long way to improving this.
A high level of user interface code reuse, with a native look and feel can only be achieved when using features that are common to all platforms and also implemented by MAUI. This means either you can use the lowest common denominator, or you're required to create custom solutions to ensure things function the same across multiple platforms.
MAUI and C# have to be learned. If you know other technologies that suit your job, they may be a better choice.
Platform examples provided by the operating system developers are typically written in the native languages for the platform. This can make them slightly more difficult to follow when working within C#.
There is also a very slight overhead when using the MAUI framework and it introduces its own idiosyncrasies and bugs on top of the baseline that you will have to rely on their team to fix, or to fix them yourself.
Further Thoughts
There are many other options for cross-platform app development, each with their own pros and cons; REACT Native, Cordova, and QT to name a few.
That said, MAUI is a solid choice and definitely worth considering, especially if your team is familiar with C#. It certainly can be cheaper, faster, and more efficient to develop high quality cross-platform apps with MAUI if you are set up to make best use of it.
A few questions ask when considering MAUI:
- Is the app required to be cross platform?
- How much of the code could be re-used?
- How much platform-specific user interface customisation will be required?
- What skills does the development team have?
- What is the maintenance period for the app?
- How well would MAUI support you building the features you require?