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 looking forward to .NET Multi-platform App UI (MAUI)—the evolution of Xamarin.Forms with .NET 6. Going forward, developers should have much more confidence in the technology stack and tools as .NET MAUI empowers native cross-platform solutions on mobile and desktop.
While it is a long flight until we reach the sands of MAUI, developer excitement is palpable in all the news/content as we tinker and prepare for .NET MAUI. Like the grains of sand, every piece of news/article/video/tutorial/stream contributes towards developer knowledge 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 April 11, 2022:
While most could do the math or the GitHub repos, looks like the cat is officially out of the bag—.NET MAUI ships in May 2022. That means about a month to go before GA release—there is much work, but incredibly exciting times for .NET developers looking to go cross-platform.
The standup covered the usual roundup of latest developer community news/contributions around .NET MAUI and review of recent Pull Requests as .NET MAUI gets closer to shipping. Maddy and David also brought on a special guest on the show: Veteran developer extraordinaire Allan Ritchie.
Allan is the maintainer of the popular Shiny.NET open source library—a cross-platform framework designed for Xamarin/UWP to make working with device services and background processes easy and testable. Allan used the standup to provide a status update on Shiny.NET—what's in release 2.5 and beyond, and what is cooking for 3.0.
There's a new hosting model to support .NET MAUI, Blazor, Xamarin and other application types, as well as updates to Notifications, Logging, NFC and Configurations. With .NET MAUI runtime and tooling maturing, and community-driven OSS projects like Shiny.NET, there is a lot of ammunition for developers to be successful. Cheers to that.
With any new technology stack, developers are often looking for robust code samples—for answers to 'how do I do this?' type questions. Yes, documentation helps—but developers find it particularly useful to peruse through a real world app code base.
The Toolkit Sample app is a great place to start to know all the things .NET MAUI Community Toolkit can do for developers, like Alerts, Behaviors, Converters, Extensions, Layouts and more. Want to dig into some core concepts? You can find the Toolkit Sample app showcasing Dependency Injection, implementing HTTPClient, using Shell with DI, rendering UI with C# Markup Extensions and much more.
Geolocation is a wonderful native API on most mobile devices, and modern frameworks make it rather easy for developers to envision innovative app scenarios that utilize the user's location. However, tapping into APIs to read the user's geo-location is always a matter of privacy—an app's intent and usage should be clearly quantifiable. The need for elevated permissions and clear implementations is further amplified when an app needs to track a user's location continuously.
Gerald starts with the basics of Geolocation on Android, before diving into a Foreground Service that can track device location continuously in the background on Android. What is impressive is the code/permissions can track user location continuously when the app is in the background, killed or even when the device is restarted. The use of Xamarin.Forms MessagingCenter gets a showcase for the Pub-Sub style location tracking logic and implementations of NotificationHelper do the needful between Foreground/Background services for context switches.
Gerald also gives a nod to Shiny.NET, that specializes in devices service and background processes—developer implementations should be much easier than doing everything by hand.
Continuous Geolocation tracking enables many app scenarios and while not easy, thanks to Gerald, Xamarin and .NET MAUI developers know exactly how to work things on Android.
The March standup started with the usual sharing of ASP.NET news and reviewing community activities/contributions for Blazor. For March, though, the actual topic was Native client apps with Blazor Hybrid and the usual suspects were guest speakers—Daniel Roth, James Montemagno and Eilon Lipton.
Dan started the discussion with an overview of Blazor hosting models for web—developers get C# goodness for both server and client side web apps. Blazor Hybrid apps bring all the goodness of the web to native apps for mobile/desktop and enable better code sharing. Running on top of .NET MAUI with a modern WebView, Blazor code can co-exist with native UI/code and have access to full native API features.
The gang showed off the basic maui-blazor template demos and explained how everything is wired up. It is a particularly nice story when Blazor code can do all kinds of native things on mobile/desktop, thanks to Maui.Essentials providing native API access.
The famed .NET podcast app is a real world example of what is possible with Blazor and .NET MAUI put together—the future looks good with web development experience welcome towards making native client apps on mobile/desktop.
.NET 7 is scheduled to come out production ready in Nov 2022, and the preparations have begun already with two Previews out. Realistically, all of the tooling for .NET MAUI across Windows/Mac will also get flushed out by .NET 7—good times for developers.
Developer nerds often geek out about programming language features and C# 11 has an exciting proposed one: Parameter null checking feature with !!, adorably called the Bang Bang operator. Any object passed into a method as an argument with !! can be checked for Null and C# 11 will automatically raise the ArgumentNullException—no additional code needed from developers.
Lots more exciting things cooking in C# 11, and language enthusiasts know where to geek out in GitHub proposals being championed.
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