What’s the first thought that comes to mind when you hear “Maui”? I could safely bet that for the majority of you – it’s the demi-god character from Disney’s Moana. Regardless of your age! But Maui is also a Hawaiian island. Not that I’ve been there, but looks stunning on Google. Today, let’s add one more association to the list: the .NET Team has just released a new framework – .NET MAUI!
What is .NET MAUI?
Semantically, MAUI stands for Multi-platform App UI. Technically, it’s a cross-platform framework for building applications. Practically it’s about writing one code but being able to use it the same way in any environment: Windows, Android, iOS, or in a browser. That’s huge! You could not only write most of an application in C# but, with one click of a button, generate a native version for all major platforms. Mobile, desktop, and web development combined.
How does .NET MAUI work?
.NET MAUI introduces APIs that allow programmers to access native platform capabilities. In a very broad overview – MAUI is an abstraction layer on top of already existing platform-specific frameworks, like .NET for Android, .NET for iOS, .NET for macOS, and Windows UI. With that, implementation details don’t matter and logic interpretation is handled within the framework. Fully transparent for the developer. It’s all due to the underlying utilization of .NET 6 BCL, which enables the translation of C# into a native code.
What does .NET MAUI mean for business?
Let’s face it, except for more complex problem-solving, more and more day-to-day users are using applications on their mobiles, tablets, and other portable devices. I don’t think the era of personal computers is anywhere near over, but the fact is – to expand your organic reach, you have to expand your technical offer. This means meeting your potential users’ needs on their device of choice. It is in fact the availability of a mobile version of the app that is decisive when people choose a software offer!
TikTok is mainly a mobile device app. They do have a web version available, but it’s not their main focus. That becomes obvious when you compare their functionalities. And yet, platform engagement is huge. How many other apps do you have on your mobile that are not available on the web at all?
Now, building native applications is a costly endeavor. Unless… you consider .NET MAUI. Let’s use a car as an analogy here. Your team would build just one engine that would fit any brand of a car body. The main investment would be in what that engine can do. Whether it was mounted in an SUV, a coupe, or a hatchback, the same experience, high quality, and security would be delivered. Translating that to application development, your team will build common backend and frontend logic. Even the static UI parts can be shared! Then, with just the cost of computing, Android, iOS, Tizen, macOS, Windows, Linux, web (you name it!) native applications will be generated for you.
What does .NET MAUI mean for developers?
Diving into MAUI will definitely bring your value up as a developer. Blazor opened the doors to full-stack development, but .NET MAUI takes it another step further, to full-stack cross-platform development. As you had some CSS and HTML with Blazor, with MAUI you’re going to have some XAML, but pretty much at the same level as JS is required in Blazor – slim to none.
Everything else will be written in C# and the newest .NET 6. You would be entering already well-known waters. On top of that, one code-base means not only a lot less development, but also a lot less maintenance. Don’t get me wrong, though – you still have the full ability to make platform-specific adjustments. Although, unless you absolutely have to go that way, avoid it at all costs to prevent uncontrollable loss of code-base cross-platform compatibility. Same design patterns apply and the same coding principles can be followed. Still, the configuration is kept as JSON. External communication can be done with the help of JSON. Concepts of dependency injection, dependency lifetimes, and navigation are still the same as in other .NET Core versions. Frankly, very little is actually different!
I can’t not mention Blazor
Pretty much any chance I get. There’s a reason, though, for it to be mentioned here. There’s a specific version of .NET MAUI under the name .NET MAUI Blazor App. You might also find it as Blazor Hybrid MAUI App. Remember all my spam about how awesome and forward-looking Blazor is? If you follow us on social media (and you absolutely should), there was a lot just on that topic. Hopefully, you’ve even started building some Blazor Server or Blazor WASM applications. You can now port those components into .NET MAUI! This means that, with little to no cost, you can convert your web app to any platform native version! That opens up a huge potential market.
Where to learn more?
- Definitely official docs: https://docs.microsoft.com/en-us/dotnet/maui/
- James Montemagno’s introduction series: https://www.youtube.com/watch?v=Hh279ES_FNQ&list=PLdo4fOcmZ0oUBAdL2NwBpDs32zwGqb9DY
- and for the more advanced, a full MAUI course: https://www.youtube.com/watch?v=DuNLR_NJv8U
From our Inspeeriteam!
If I got you hooked on the .NET MAUI idea, and you’d like to discuss your challenges, contact us. Let us help you choose the best course of action for your idea. With our years of experience in software development, we’re uniquely positioned to evaluate your business needs.