Special Offer: My C#/.NET Bootcamp Course is out now. Get 10% OFF using the code FRIENDS10.

If you are a .NET developer, I’m sure you recently heard about .NET MAUI. At least that’s the case for me, and I wonder what .NET MAUI is and if I should care about it at all? Let’s learn about .NET MAUI together.

Hi, I’m a Software Engineer with more than ten years of experience with the .NET platform, and today, we explore everything that I found while researching what’s currently known about .NET MAUI.

What does .NET MAUI stand for?

.NET MAUI means .NET Multi-Platform App User Interface and allows us to build native desktop and mobile apps with a single code base. .NET MAUI will be running on .NET 6, which will be released in November 2021.

According to Microsoft, .NET MAUI is an evolution of Xamarin Forms with rebuilt controls from the group up for performance and extensibility.

What’s the difference between .NET MAUI and Xamarin Forms?

With .NET MAUI based on .NET 6, the evolution of Xamarin Forms will be integrated into the new world of a single .NET. 

With .NET 6 native app development becomes part of .NET like other frameworks such as ASP.NET Core already have with .NET 5.

Maddy Leger (Product Manager on the .NET MAUI team at Microsoft) was recently a guest on the .NET show and said you don’t hire a Xamarin Forms developer anymore. Instead, you hire a .NET developer who writes mobile or desktop apps for you.

We can see this in the code examples when we take a look at the namespaces. The classes from the Xamarin.Forms namespaces are moved to the System.Maui namespace.

In .NET MAUI, all your code is in a single project compared to Xamarin Forms, where you had to have a project for every platform. It should reduce complexity and make it an overall better developer experience.

What’s similar between .NET MAUI and Xamarin Forms?

We still use XAML and C# to develop our applications. We can also choose between MVVM, Reactive UI, or Model-View-Update to decouple our logic from the view definition.

We can build applications for:

  • Android
  • iOS
  • macOS
  • Windows Desktop

If you are a Xamarin Forms developer, you can expect to use a lot of your knowledge when building .NET MAUI applications. Yes, the project setup might change, but the day-to-day code you’re going to write should be familiar to you.

Should you migrate from Xamarin Forms to .NET MAUI?

Microsoft suggests starting new projects with .NET MAUI when it’s officially released. They also promised that they would make the transition for existing Xamarin Forms apps to .NET MAUI as seamless as possible.

If you have a small app that you can migrate without a lot of work, it seems to be a good idea. When it’s a more challenging task, you might want to wait until Microsoft offers tooling and other support to make the transition simpler for you.

What about Visual Studio Code?

.NET MAUI will allow us to write native mobile and desktop applications using Visual Studio Code. Microsoft says that you’ll always have the best-integrated developer experience when developing in Visual Studio, but you will have the option to use Visual Studio Code.

Visual Studio Code can be a good fit for you, for example, if you are doing native Android development and already have all the emulators set up. If most of what you do is working on the application’s code, Visual Studio Code can be an excellent choice for you.

What about Blazor?

If this isn’t the first time watching a video on my channel, you know that I’m talking a lot about Blazor. Can we combine Blazor and .NET MAUI?

There is the option to integrate Blazor applications into .NET MAUI using the web view. What’s more interesting is that Microsoft has the question if .NET MAUI and Blazor will be unified in their FAQ.

The official answer is:

“Stay tuned! No official plans yet, but we’re looking into the possibility.”

I’m excited to see if they somehow make it happen to make our Blazor components work in .NET MAUI projects to build native mobile and desktop applications. We will see what the future brings.

When can I use .NET MAUI?

You can start today by using the .NET 6 preview SDKs, or you can start using .NET MAUI after its official release with .NET 6 in November 2021.

Where can I get more information? 

If you want to learn more about .NET MAUI and stay up to date with everything that’s coming in the future, check out the .NET MAUI page on Github. There also is a link to a samples repository and the FAQ section.

Let me know in the comments below what you think of .NET MAUI so far. I’m definitely watching how things around .NET MAUI evolve.

Don’t forget to subscribe to the channel, so you don’t miss new videos about .NET development, and check out my FREE Blazor Crash Course.

 

Claudio Bernasconi

I'm an enthusiastic Software Engineer with a passion for teaching .NET development on YouTube, writing articles about my journey on my blog, and making people smile.