Welcome to Sands of MAUI, a newsletter-style publication that compiles the latest .NET MAUI content relevant to developers.
Small, harmless sand particles. But when you add together many sand particles, we have a large force to consider. It is the smallest grains of sand that often combine to form huge beaches, dunes, and deserts.
.NET developers are excited about the reality of .NET MAUI (.NET Multiplatform App UI), the latest evolution of the .NET cross-platform developer technology stack. With reliable tools and a rich ecosystem, .NET MAUI helps developers build native cross-platform apps for mobile/desktop from a single, shared codebase while bringing web technologies into the mix.
It may take a long flight to reach the sands of MAUI Island, but developer excitement for .NET MAUI is quite evident in all the content created. Like a grain of sand, every news/article/document/video/tutorial/live stream contributes to the developer experience of .NET MAUI and we grow a community/ecosystem willing to learn and help.
Sands of MAUI is a humble attempt to bring together all the goodness of .NET MAUI in one place. Here are some highlights this week: March 11, 2024:
.NET MAUI Community Toolkit Highlights
The .NET MAUI Community Toolkit is an open source library that serves as a companion to .NET MAUI development, providing developers with a rich set of controls, converters, and helpers designed to accelerate app development. With its focus on community-driven innovation and developer productivity, the .NET MAUI Community Toolkit has become an indispensable tool for developers looking to enhance .NET MAUI app development. Kim Philpotts We looked back on our journey over the past year and wrote an article called .NET MAUI Community Toolkit Highlights for 2023.
The .NET MAUI Community Toolkit GitHub repository has developed into a dynamic hub of activity with over 40 contributors who collectively drive the project forward. Developer feedback, suggestions, and code contributions have been instrumental in making the toolkit a more powerful and efficient resource for .NET MAUI developers.
Some of the key features of the .NET MAUI Community Toolkit for 2023 and beyond include features delivered over 9 releases and 260 commits. Key features added to the .NET MAUI Community Toolkit include media element controls, Windows Maps integration, speech recognition and speech-to-text, FolderPicker and FileSaver, keyboard extensions, App Theming API, and .NET 8 support.
Solid documentation and an impressive number of NuGet package downloads indicate widespread adoption and trust in the toolkit. Kudos to everyone who has contributed to making the .NET MAUI Community Toolkit an essential companion for .NET MAUI developers. Continuous improvements for developer productivity.
Media selector in .NET MAUI
Many modern mobile apps handle media files. There are numerous use cases for using photos or videos to illuminate workflows on iOS/Android. Luckily for .NET MAUI developers, working with media is easy thanks to well-designed cross-platform media selector abstractions. Enabling mobile users to work seamlessly with photos/videos is a nice luxury for developers. Leomaris Reyes I wrote an article to help you get started with Media Picker in .NET MAUI.
The first step to working with media files is platform-level permissions. Leomaris guides developers through what they need to connect to Android and iOS. Media Picker’s functionality is made possible through the IMediaPicker interface, which allows users to capture or select photos/videos from their device. The Microsoft.Maui.Media namespace contains a default implementation of the IMediaPicker interface that developers can easily call. There is an asynchronous method to select/capture a photo or video.
Leomaris guides developers on how to use the Media Picker in .NET MAUI to capture photos/videos or select media files from a library and easily display them in the UI. The media selector abstraction provides great benefits to .NET MAUI developers, making it easier for users to work with media files.
.NET MAUI with Blazor
.NET MAUI is built to enable .NET developers to create cross-platform apps for Android, iOS, macOS, and Windows with deep native integrations, platform-based UI, and hybrid environments that extend the reach of Blazor/JS web UI technologies. Blazor and .NET MAUI are almost made for each other and share the exact .NET runtime. Blazor apps hosted inside .NET MAUI apps support full native platform integration. Blazor hybrid apps enable heavy code sharing between native apps on the web and mobile/desktop. Daniel Hindrikes We’ve started building a new Blazor hybrid app from scratch, and our first video series has begun. Get started building an activity tracker app using .NET MAUI and Blazor.
Blazor is welcome in mobile/desktop apps with .NET MAUI and allows developers to share much between web/native apps, including C# code, Blazor components, JS Interop, and CSS styles. In the first episode of the series, Daniel does a great job explaining the possibilities of Blazor Hybrid apps, and then begins setting them up by creating a project and building the first reusable UI components across platforms. A common way to reuse the same Blazor UI across web and native apps is to place shared components in separate Razor class libraries and reference the same content in the .NET MAUI native app and Blazor web app. For anyone looking for real-world inspiration for building Blazor Hybrid apps, this series by Daniel looks very promising. There’s more cool stuff coming in the future.
DevOps with .NET MAUI
.NET MAUI is an evolution of the modern .NET cross-platform development stack, giving developers access to mobile and desktop form factors from a single, shared codebase. However, the current reality for many apps may be Xamarin or Xamarin.Forms. Moving forward requires a migration strategy. Lance McCarthy I joined because I’m busy migrating a sample Telerik CRM app. older developer .NET Dev Show—Share your experiences in DevOps and publishing for .NET MAUI apps.
After some troubleshooting about .NET MAUI development, the discussion turned to the Telerik Art Gallery CRM app. This app is available in the iOS/Android/Windows app stores and is a nice showcase app written in Xamarin.Forms and source code on GitHub.
Careful migration allowed Lance to reuse much of his C#/XAML code from Xamarin.Forms on .NET MAUI, but a developer’s responsibilities don’t end with app development. Any serious app development/deployment can benefit from modern DevOps. Building/deploying app packages can be much easier with a properly configured CI/CD pipeline.
Lance loves GitHub Actions for .NET MAUI DevOps, where he steps through YAML workflows to set up build automation upon code commit. You can configure pipelines for builds that reach multiple platforms in a one-time process. With configurable environment variables and efficient key/credential management, the benefits of DevOps powered by GitHub Actions are very evident in .NET MAUI apps.
From covering migration strategies to moving code and exiting DevOps, Lance has now hosted a series of episodes on the .NET Dev Show. This is a great showcase for moving a real app from Xamarin to .NET MAUI.
.NET MAUI for startups
.NET is a free, open-source, cross-platform framework for building modern apps and powerful cloud services. Developers who build with .NET enjoy a solid framework, reliable tools, and a rich ecosystem. .NET allows you to build, test, and deploy modern apps across a variety of platforms, dramatically increasing your productivity.
Modern .NET isn’t just for enterprise apps. Maddie Montaquilla I created a short video on how .NET MAUI helps startups get their mobile/desktop apps to market faster.
.NET MAUI allows developers to target mobile and desktop form factors from a single, shared codebase. Between iOS/Android for mobile and Windows/macOS for desktop, .NET MAUI can boast broad platform coverage with improved platform/tool ​​stability, making it more tempting for developers to build cross-platform apps using .NET MAUI. Looking for For small businesses just starting out, .NET MAUI provides the opportunity to reach maximum user base while leveraging a single, shared codebase and reusing .NET developer skills.
Developers have the flexibility to write .NET MAUI app UIs in C#/XAML or reuse web investments written in Blazor. The end result is a native cross-platform app with full platform API access at all times. By easily reusing code across a wide range of devices and optimizing developer productivity, the .NET MAUI promise can benefit startups looking to build modern, cross-platform apps with maximum user reach.
That’s all for now.
See you next week with more great content related to .NET MAUI.
Cheers, developers!