This content originally appeared on Telerik Blogs and was authored by Sam Basu
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:
.NET MAUI Community Standup
Maddy Montaquila and David Ortinau hosted the April .NET MAUI Community Standup—there is palpable excitement as .NET MAUI inches closes to General Availability.
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.
.NET MAUI Community Toolkit
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.
If you are looking for a solid .NET MAUI example and best practices, Brandon Minnick has the answer—the .NET MAUI Community Toolkit Sample App.
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.
Huge thanks to core maintainers of the .NET MAUI Community Toolkit and the Sample app—Gerald Versluis, Pedro Jesus, Shaun Lawrence and Vlad Antonyuk.
Location Tracking in Android
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.
There is no dearth of app scenarios requiring continuous location tracking and Gerald Versluis produced a video on how to do location tracking on Android with Xamarin.Forms and Essentials.
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.
ASP.NET Community Standup
Web developers using ASP.NET look forward to the monthly ASP.NET/Blazor Community Standup, often hosted by Tanay Parikh and Jon Galloway.
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.
Future with Merge Conflict
James Montemagno and Frank Krueger host the geeky Merge Conflict podcast. The latest Episode # 294 was as future-facing as it gets for .NET developers. On the agenda was .NET 7 and C# 11.
.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.
Cheers, developers!
This content originally appeared on Telerik Blogs and was authored by Sam Basu
Sam Basu | Sciencx (2022-04-11T13:47:16+00:00) Sands of MAUI: Issue #52. Retrieved from https://www.scien.cx/2022/04/11/sands-of-maui-issue-52/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.