3

Sands of MAUI: Issue #57

 2 months ago
source link: https://www.telerik.com/blogs/sands-of-maui-issue-57
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Sands of MAUI: Issue #57

sandsofmaui-870x220.jpg?sfvrsn=53348c92_1

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 May 16, 2022:

.NET MAUI Release Candidate Update

Behold—the next iteration of .NET MAUI aka Release Candidate (RC) 3 is now out. And this one is a special one—arguably the last stop before .NET MAUI hits General Availability (GA). David Ortinau wrote up the .NET MAUI RC3 announcement—new workloads/bits are now ready for download, as is Visual Studio 2022 17.3 Preview 1.

As with recent release blog posts, there was a focus area to educate developers and this time it was on Navigation in .NET MAUI apps. As David pointed out, there are now multiple built-in ways to organize .NET MAUI apps into pages and manage navigation in between. The default Shell implementation is pretty sweet and optimized for mobile/desktop. The Shell supports URI-based navigation and serves as the host for content pages/controls, with easy ways to pass data around.

The Shell is not forced upon developers though—those who want can easily take more control over app organization by working with container controls directly, like NavigationPage, TabbedPages, FlyoutPage and other layout controls. Bottom line is, developers have a lot of flexibility with .NET MAUI and with the RC3 release sporting a Go-Live license, the time is now to get our feet wet with .NET MAUI. Next stop—GA and it is coming up fast.

mauirc3.png?sfvrsn=ede7afe0_1

.NET MAUI Community Standup

The .NET MAUI team has been hosting monthly community stand-ups for a while now, and this month was a special one—the last one before .NET MAUI hits GA.

Maddy Montaquila and David Ortinau hosted the latest .NET MAUI community standup and covered the usual—lots of community contributions, .NET MAUI sample apps and approved Pull Requests to the GitHub repository. They were then joined by guest Brandon Minnick to provide an update on .NET MAUI Community Toolkits.

While .NET MAUI tries to provide a solid runtime and tooling, developer success is often dictated by ease of repeatable tasks, less boilerplate code and augmented developer experience with supporting libraries. The .NET MAUI Community Toolkits are here to help and there are three of them now: CommunityToolkit.Maui, CommunityToolkit.Mvvm and CommunityToolkit.Maui.Markup.

The CommunityToolkit.Maui NuGet package provides a bunch of functionality out of the box, like Alerts, Behaviors, Converters, Extensions, Layouts and Components—a ton of common developer scenarios are covered.

The CommunityToolkit.Mvvm NuGet package alleviates developers having to write common boilerplate MVVM code, while the CommunityToolkit.Maui.Markup NuGet package allows for visual tree definition completely in C#, for folks not fond of XAML. Brandon talked about the experience and the hard work it took to get the .NET MAUI Community Toolkits ready to go GA with .NET MAUI—it is delightful to see community contributions here.

One thing is for sure—there would be no dearth of ammunition for .NET MAUI developers moving forward.

communitystandup.png?sfvrsn=5b5c91ff_1

.NET MAUI Dependency Injection

Dependency Injection (DI) and Inversion of Control are key programming concepts meant to provide sanity on large codebases. Cross-platform mobile apps with Xamarin are good fits for DI, but there has been some hesitancy from the developer community in terms of performance cost and added complexity. .NET MAUI, however, turns the table and makes DI a first class citizen with baked in support and the preferred way to handle dependencies.

James Montemagno produced a video on why developers should get excited about DI in .NET MAUI—it's a great starting point for developers to understand and use DI effectively.

James starts out with the basics of DI before diving into .NET MAUI's built-in implementation—a code walkthrough shows how developers can register dependency services. One of the easiest ways to use DI is Constructor injection—and this is what .NET MAUI utilizes to resolve dependencies. Also, the .NET MAUI templates now throw in the Shell—the default way to organize app content and have built-in URI based navigation.

The good news is Shell has automatic dependency resolution—DI should be naturally what .NET MAUI developers lean towards and this should lead to clean app code bases.

mauidi.png?sfvrsn=c2f34cb5_1

.NET MAUI Tooling

While the .NET MAUI runtime is getting ready to shed its Preview/RC badge and be shipped out officially as GA, developers are hopefully seeing the promise of the next generation of cross-platform .NET development for mobile/desktop. However, as more developer flock to .NET MAUI to build greenfield apps or modernize existing ones, one thing makes all the difference in productivity—developer tooling. It's great to see cross-platform tooling making steady progress with .NET MAUI runtime and the latest Visual Studio 2022 17.3 Preview 1 bits.

As a senior developer on the .NET MAUI/VS team pointed out, XAML Live Preview now supports all .NET MAUI targets—that is iOS/Android/Windows/MacOS. Developers can now make edits to the visual tree and see it reflected in the XAML Live Preview rendering immediately.

Also, there is good new for those targeting mobile form factors—developers can plug in their iOS/Android device and see a preview of the .NET MAUI app running on their devices, live inside of Visual Studio without needing any other tooling.

Also, developers may need UI ammunition as they get to building modern .NET MAUI apps—Telerik UI for .NET MAUI can help with polished UI components that work consistently across mobile/desktop. A new Preview release of Telerik UI for .NET MAUI is now out—aka version 0.9.0 that works with .NET MAUI RC3.

Next stop, Telerik UI for .NET MAUI hits version 1.0.0—you guessed it, to go with .NET MAUI GA. Hallelujah for developer productivity!

xamlpreview.png?sfvrsn=46a2c29b_1

Animations in .NET MAUI

Microsoft and developer community speakers came together to celebrate .NET MAUI—in a long format hosted stream called Snorkeling in MAUI.

Shaun Lawrence had joined the stream, dressed in full snorkeling gear in line with the theme of the stream—it was quite epic. Shaun talked about animations in .NET MAUI—an often overlooked but key ingredient of successful apps.

End user focus is precious and fleeting—developers need to do everything possible to keep users engaged, particularly on mobile form factors. Animations can really help make an app feel alive—the subtle almost imperceptible movements that indicate to the user that something is happening. Thankfully, .NET MAUI comes bundled with several animations for built-in UI components, like opacity, rotation, scaling and transition. As Shaun pointed out, these are well documented and readily available for developers to use on mobile/desktop.

The .NET MAUI Animation class is also easily extensible—developers can write custom animations to suit their app styles. Shaun showed off a sweet little diving app showcasing custom animations. It would not be an exaggeration to say that all .NET MAUI developers should look into animations to make apps feel alive.

mauianimations.png?sfvrsn=7b21b84b_1

That's it for now.

We'll see you next week with more awesome content relevant to .NET MAUI.

Cheers, developers!


SamBasu
About the Author

Sam Basu

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.

Related Posts


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK