What Is .NET MAUI?

Introduction

 
When I think of the .NET ecosystem, one phrase comes to mind: Code Re-use. It's amazing how much we can do within one .NET codebase, and this is especially true with the introduction of .NET Core, and technologies like Xamarin (and subsequently Xamarin.Forms).
 
These days, people switch between many devices throughout the day in order to stay maximally productive. It's becoming increasingly important that the applications we write are accessible, regardless of the devices our users are in front of. This point makes the web very powerful, and there are many pros to writing your application for the web browser. But, when we do this, we lose out on the native platform controls and performance offered to us by the OS vendors, making the application relatively unnatural to use, and to look at.
 
Xamarin.Forms to the rescue! 
 
Xamarin Native (e.g. Xamarin.Android) abstracts away the underlying platform API, allowing us to use the fantastic .NET platform to write native applications on different devices. Xamarin.Forms takes this a step further, allowing us to write one UI for multiple platforms. We write the UI once, and this UI will then be translated to the appropriate native controls for each device.
 

.NET 5 and 6

 
Microsoft's goal with .NET 5 is to begin to unify all the various scattered technologies we know and love within .NET. The goal is to bring together technologies such as .NET Core, Mono, and Xamarin into one unified ecosystem. With .NET 6, this unifying will only continue further, with the introduction of .NET MAUI.
 

What is MAUI?

 
MAUI stands for Multi-platform App UI, which will be a first-class UI framework in .NET 6 for making Windows, iOS, Android, and macOS applications with one project, one codebase. It is an evolution over Xamarin.Forms and takes code reusability to the next level. Instead of having separate projects to target indiviual platforms, we will only need a single project, and we can just choose which platform we want to deploy on (whether it be emulators or physical devices.
 
This is even more powerful than it might seem at first. Resources and assets such as fonts, images, etc will only need to be included once within the one project, and .NET MAUI will take care binding these assets to each platform. 
 
Of course, just like in Xamarin, we will have access to the underlying native platform APIs if we need to open the hood and do some platform-specfic work. In fact, in .NET MAUI, this process will be even easier and more streamlined.
 
(Image Source: Microsoft) 
 
.NET 6 is all about developer productivity. Part of this productivity means not being locked-in to any individual architectural patterns you might not be comfortable with. Developers in .NET MAUI can choose to use the traditionally-accepted MVVM architectural pattern for writing multi-platform UIs, or the MVU (Model-View-Update) pattern which is a code-first UI experience.
 

What about my Xamarin projects?

 
In .NET MAUI, we will be using the same XAML controls we know and love from Xamarin.Forms, and Microsoft intends to make the migration process from Xamarin.Forms to MAUI as easy as possible. They will provide migration guides as well as tooling to convert your existing projects.
 

Sounds great, but what will happen to Xamarin?

 
Xamarin Native technologies (Xamarin.iOS, Xamarin.Android) are bindings to the native platform technologies offered by the OS vendors. This concept is fundamental to Xamarin.Forms, and .NET MAUI. These technologies will continue to exist, but will be merged into .NET 6 as first-class citizens. (".NET for Android" and ".NET for iOS")
After the release of .NET 6, the Xamarin team will release final versions of the Xamarin SDKs as they exist today, and continue servicing these SDKs and Xamarin.Forms for a year. After that, support will be shifted entirely to .NET MAUI, .NET for Android, and .NET for iOS.
 

Conclusion

 
I am very excited about .NET MAUI and all the productivity it will bring. The Idea of integrating Xamarin.Forms as a first-class technology in .NET makes sense, and I look forward to watching this technology come to life.
 
Thanks for reading! Feedback is always welcome.