Welcome to the Sands of MAUI—newsletter-style issues dedicated to bringing together latest .NET MAUI content relevant to developers.
A particle of sand—tiny and innocuous. But put a lot of sand particles together and we have something big—a force to reckon with. It is the smallest grains of sand that often add up to form massive beaches, dunes and deserts.
Most .NET developers are excited with .NET Multi-platform App UI (.NET MAUI)—the evolution of modern .NET cross-platform developer experience. Going forward, developers will be empowered with .NET MAUI technology stack and tooling to build native cross-platform apps for mobile/desktop from single shared codebase.
While it may take a long flight to reach the sands of MAUI island, developer excitement around .NET MAUI is quite palpable with all the created content. Like the grains of sand, every piece of news/article/documentation/video/tutorial/livestream contributes towards developer knowledge in .NET MAUI and we grow a community/ecosystem willing to learn and help.
Sands of MAUI is a humble attempt to collect all the .NET MAUI awesomeness in one place. Here's what is noteworthy for the week of July 17, 2023:
.NET MAUI is continuing its journey towards the next big milestone—its evolution with .NET 8. Updated bits for .NET 8 just dropped—.NET 8 Preview 6 is now out. Naturally, .NET MAUI had to follow suit and David Ortinau wrote up the announcement—.NET MAUI release now out for .NET 8 Preview 6, along with tooling updates.
The latest release of .NET MAUI for .NET 8 Preview 6 introduces Native AOT (ahead-of-time compilation) for iOS—this opt-in preview feature enables 30-40% reduction in app sizes compared to Mono and better app performance. The newest .NET MAUI release also focuses on quality, with 23 high-impact desktop issues fixed ranging from fonts, navigation, tabs, file pickers and improved memory management. There is also a new Service Release out for .NET MAUI for .NET 7 runtimes, and many of the critical bug fixes are being ported back.
The latest .NET MAUI release comes with tooling updates as well—Visual Studio 2022 17.7 Preview 3 on Windows and Visual Studio for Mac 17.6.1 are now out, with easy options to enable developers to run .NET MAUI previews on top of .NET 8.
.NET MAUI is the evolution of modern cross-platform .NET development and developers have stable tooling in the form of Visual Studio for both Windows/macOS. However, there has always been a desire to do .NET MAUI development in chill mode—Command Line tools and light-weight editors for the win. Visual Studio Code continues to be the uber-popular light-weight code editor, working consistently across Windows/macOS/Linux.
The first preview of the .NET MAUI Extension for VS Code rides on the C# Dev Kit—the lightweight, editor-first experience that augments C# development in VS Code with a Solution Explorer, native Test Explorer, AI-powered code authoring and more. Paired with C# Dev Kit, the .NET MAUI extension for VS Code provides developers with tools to develop cross-platform .NET mobile/desktop apps with VS Code on Windows, macOS and Linux.
The .NET MAUI Extension for VS Code enables modern C# editing powered by Roslyn and deployment/debugging of apps running on devices and simulators. The .NET MAUI Extension for VS Code includes a nice getting started experience for new developers to get going with .NET MAUI bits and debug targets, including Android/iOS/macOS/Windows—overall, a great start to welcome .NET MAUI development on VS Code.
.NET MAUI development in Visual Studio Code is definitely good news—the light-weight popular code editor lowers the barrier to entry and should make .NET MAUI more accessible to all types of developers.
While the announcement has received a warm welcome, it may be hard to match the excitement of Gerald Versluis, who has a hands-on video ready for fellow developers—unveiling the official VS Code Extension for .NET MAUI on Windows, macOS and Linux.
If developers wanted to see the first preview of official .NET MAUI Support in VS Code in action, this video is just the answer. Beginning with C# Dev Kit dependency, Gerald walks through how to install and get started with the .NET MAUI extension in VS Code. Most .NET MAUI developers on Windows/macOs likely have all the .NET MAUI workloads installed—the Extension can help new developers get the requisite bits installed.
Gerald walks through the typical developer workflow of creating a new .NET MAUI app from VS Code and deploying/debugging on selected simulators—on both Windows and macOS. Gerald has some time-cutting tips as developers switch up debug platforms and choose specific device targets—all in all, a wonderful walkthrough of the new .NET MAUI Extension in VS Code.
.NET MAUI is more than a UI framework—it’s a collection of loosely coupled abstractions spanning the UI layer all the way down to the platform runtime level. The new Handler architecture in .NET MAUI provides a way for developers to access properties of native platform controls—developers can customize the out-of-the-box controls that .NET MAUI provides or create their own. Handlers are a lot simpler and more flexible than the Renderer technology in Xamarin.Forms, but with this flexibility comes potential confusion about where to implement and keep Handler customizations.
.NET MAUI provides a UI layer using platform abstractions across iOS/Android/Windows/macOUS, and its Handler architecture maps UI abstractions to specific platform implementations. Matt starts out with an explanation of Handler UI basics, followed by when and how Handler logic is executed. Handlers define mappings in a dictionary that describe how the cross-platform properties of controls are applied on each platform, and .NET MAUI provides three approaches to customizing the mapping dictionary—prepend, modify and append. Specifying mapping logic in .NET MAUI apps controls the specific order of execution/customization and Matt suggests a few places developers can write such Handler customizations—App startup, Platform folders and sub-class Constructors.
While the non-prescriptive nature of .NET MAUI allows developers freedom to customize UI, Matt has some solid pointers on how best to override Handler mappings to platform implementations. Cheers.
.NET MAUI is the modern .NET cross-platform development stack—a unified codebase provides abstractions to help developers reach mobile/desktop platforms seamlessly. The promise of .NET MAUI, however, is a big one involving varied target platforms and complicated technology stacks.
While .NET MAUI offers developers the flexibility of development tooling and target platforms, the right tools for the job always matter. Alex started the journey on a decked out MacBook with Apple silicon—this is great for targeting iOS/macOS platforms. While the MacBook can run Windows comfortably, thanks to ARM chip support, developing real world apps for Windows/Android is a different story—virtualized device simulators do not work as well when Windows is running as a virtual machine itself.
James Montemagno was available for consultations and a dose of reality for the complexities of modern cross-platform development. Alex eventually got his hands on a modern Windows laptop, and deploying .NET MAUI apps to Windows desktop or Android simulators looked like a breeze.
Developer inner loop is important for any development stack, and .NET MAUI sports stable tooling to enable developer productivity—the right development OS/tools matter for various target platforms. Thanks, Alex, for keeping things real with some developer roadblocks—wish you continued success with .NET MAUI development.
That's it for now.
We'll see you next week with more awesome content relevant to .NET MAUI.
Sam Basu is a technologist, author, speaker, Microsoft MVP, gadget-lover and Progress Developer Advocate for Telerik products. With a long developer background, he now spends much of his time advocating modern web/mobile/cloud development platforms on Microsoft/Telerik technology stacks. His spare times call for travel, fast cars, cricket and culinary adventures with the family. You can find him on the internet.
Subscribe to be the first to get our expert-written articles and tutorials for developers!
All fields are required