Excerpt
This article provides a beginner level introduction to .NET MAUI and explores the history behind its evolution and what makes it a compelling choice for teams developing with tools in the .NET ecosystem.
Introduction
When I first heard about MAUI, I kept referring to the shape-shifter, demigod of the wind and sea and hero of men from my favourite animated movie, Moana.
Initially, I thought it was Microsoft's attempt to venture into animation movies, but at during the announcement of .NET 6, i realized that MAUI is an attempt to conquer the multi-platform market with the emergence of tools such as electron.js and increase market adoption for the C# language.
.NET MAUI or MAUI is a multi-platform framework for native desktop and mobile applications.
MAUI is an acronym that means Multi-platform App UI and expands on its definition and what it was created to do.
Similar to the demigod, MAUI is a shape-shifting UI framework that changes UI icons to match the native environments by relying on native system UI components.
With MAUI, developers can build applications that run on Android, iOS, Windows and macOS, while sharing a single source code.
Origin of MAUI
MAUI is a progression Microsoft's Xamarin project, which was created for cross-platform mobile application development for both Android and iOS platforms.
The lines between native and cross platform developments are getting blurry with tools that help you to deploy a single codebase for different platforms.
Frameworks such as React Native and Flutter have championed the cross-platform market, with Xamarin following closely behind.
What Happened To Xamarin.Forms
Xamarin was founded in 2011 and saw an increased community support because it allows developers to quickly start making apps without having to find out multiple languages.
Xamarin forms however was deprecated in November 2021 and moveit into the core product offering, starting with the discharge of .Net 6.
If you previously worked with Xamarin.Forms, getting started with MAUI will be seamless as it still utilises the same c# and XAML markup language.
In a subsequent blog, we will discuss how to move your Xamarin.Forms project to MAUI.
What's New In MAUI
Starting from .NET 6, MAUI comes fully integrated tooling and support in Visual Studio 2022, Visual Studio for Mac 2022 and Rider.
You can either create a standalone MAUI app or a MAUI Blazor application. Further details on creating a MAUI app to follow subsequently.
What Can You Build With MAUI
MAUI extends Xamarin.forms to build multi-platform apps. This means that with one code-base, your app can run on iOS and Android as mobile apps and at the same time run on Windows and MacOS as desktop apps.
.NET MAUI provides a collection of controls that can be used to display data, initiate actions, indicate activity, display collections, pick data, and more. In addition to a collection of controls, .NET MAUI also provides:
- An elaborate layout engine for designing pages.
- Multiple page types for creating rich navigation types, like drawers.
- Support for data-binding, for more elegant and maintainable development patterns.
- The ability to customize handlers to enhance the way in which UI elements are presented.
- Cross-platform APIs for accessing native device features. These APIs enable apps to access device features such as the GPS, the accelerometer, and battery and network states.
- Cross-platform graphics functionality, that provides a drawing canvas that supports drawing and painting shapes and images, compositing operations, and graphical object transforms.
- A single project system that uses multi-targeting to target Android, iOS, macOS, and Windows.
- .NET hot reload, so that you can modify both your XAML and your managed source code while the app is running, then observe the result of your modifications without rebuilding the app.
Conclusion
Cross-platform and multi-platform frameworks are here to stay as the lines of native platform develop get blurry with every new innovation and are a worthy alternative to rapid application development and speed to market for small teams on limited resources.
This is MAUI's first stable release so we will keep an eye on updates from Microsoft with regards to future roadmap of MAUI.
If you want to quickly build out rich user interfaces with MAUI Blazor, reach out to our team and we will help you get started quickly with our tested and production-ready UI components.
Top comments (0)