Telerik blogs

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 (MAUI)—the evolution of modern .NET cross-platform developer experience. Going forward, developers should have much more confidence in the technology stack and tools as .NET MAUI empowers native cross-platform solutions on both mobile and desktop.

While it may take a long flight to reach the sands of MAUI island, developer excitement around .NET MAUI is quite palpable in all the shared 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 11, 2022:

DevOps with .NET MAUI

Building a .NET MAUI apps is only one half of the journey—the remaining reality is continuous testing/deployment/delivery, aka providing continuous value to the end user. Modern DevOps workflows with Continuous Integration/Continuous Delivery (CI/CD) pipelines can automate much of the hassles as developers churn on providing app updates.

Thankfully, getting started with DevOps for .NET MAUI apps isn't difficult—Sweeky Satpathy is here to help with an awesome writeup on how to implement DevOps pipelines for .NET MAUI apps using GitHub Actions and Azure DevOps.

The obvious nature of cross-platform development means developers need to get some artifacts in place for deploying/publishing apps—a signing certificate and provisioning profile for iOS, keystore file for Android and a certificate for package signing for Windows.

Sweeky walks through how developers can then get started creating the pipelines for the .NET MAUI apps, inspired from sample pipelines used in the Weather21 .NET MAUI app. Pipelines come down to hosted agents configured with YAML for GitHub Actions or Azure DevOps, running on MacOS VM building for iOS/MacCatalyst targets or Windows VM for Android/Windows targets. Each pipeline would independently have all the needed steps—getting the right .NET MAUI workloads/build tools, use the signing files, Build/Publish app for TargetFrameworks, run Unit Tests and upload artifacts. Sweeky breaks down all the details—the simplified DevOps flow is all thanks to the updated dotnet command line tools for build/publish across all targets.

The automation benefits should entice developers to consider getting started with DevOps pipelines for .NET MAUI apps—samples and tooling is here to help.

MVVMS in .NET MAUI

Software design/architectural patterns are key in maintaining separation of concern, testability and general sanity in codebases—this is particularly important for large cross-platform apps, like with .NET MAUI. The Model View ViewModel (MVVM) pattern has proven to be battle-tested and very conducive for C#/XAML code bases and .NET MAUI is not an exception.

James Montemagno has produced some excellent content explaining MVVM for fellow software developers, but his latest video takes a realistic twist on the popular design pattern—Model View ViewModel Services, aka MVVMS.

James starts off talking architecture basics and the core concepts of MVVM. The MVVMS pattern is used by many developers and James has 15 years of successful app delivery to back it up. In fact, the famous Monkey Finder app uses MVVMS - this is already ported over and part of the popular .NET MAUI workshop. So what would Services do? Essentially separate out some functionality that would otherwise have to be in the Model or ViewModel. A Services layer can operate over a generic interfaces and abstract away outward facing functionality—like database hits or interactions with web services. This separation makes things more testable and combined with Dependency Injection, makes it easy to swap out implementations without affecting rest of the app code base.

MVVMS is a more real-world design pattern and James talks through how to be successful with it for .NET MAUI apps.

App Health in .NET MAUI

Sentry is known for providing tools for monitoring application code health. From error tracking to performance monitoring, developers can see clearer, solve quicker and learn continuously about their applications—from the frontend to the backend.

If developers want more visibility inside their .NET MAUI apps, Sentry is here to help—Sentry SDK for .NET MAUI is now available in public preview.

Developers building .NET MAUI apps can now grab one NuGet package—the Sentry.Maui, which is easy to configure in MauiProgram.cs by calling UseSentry() on MauiAppBuilder. With that, a ton of visibility is available immediately—like error monitoring with complete stack traces, automatic breadcrumbs for app lifecycle events and fine tuning performance issues. There is also a lot of help with exception handling—app lifecycle, user actions, platform/device info and more.

With fresh docs and a Discord server, developers are encouraged to engage as Sentry tools for .NET MAUI work towards general availability.

Outlook Clone with .NET MAUI

Matt Goldman has started .NET MAUI UI July—the monthly series driven by the developer community on all things UI with .NET MAUI. And things are off to a flying start with Matt leading from the front—a stunning clone of Microsoft Outlook mobile app written with .NET MAUI UI.

Matt's detailed writeup showcases the power and flexibility of UI stack in .NET MAUI, with built-in layouts and controls to replicate a familiar polished UI.

The goal isn't to recreate Outlook's functionality, but replicate the UI of the Inbox screen to exercise skills in building UIs with .NET MAUI. Outlook uses Microsoft’s Fluent icons and some standard colors—Matt is quick to register the needed resources upfront. What follows is a detailed reconstruction of the familiar Inbox screen—breaking UI down into chunks of header, middle and footer content.

Matt uses FlexLayout, Grid and Horizontal/Vertical Stacks to organize content—the core of UI is made with CollectionView containing standard UI components. Recreating complex UI like Outlook from scratch with .NET MAUI shows platform maturity and serves to inspire other developers.

.NET MAUI Book

It's hard to keep Matt Goldman out of the news these days—that happens when you do awesome work. There is great news for folks new to .NET MAUI or seasoned developers looking for a refresher—Matt is writing a book on .NET MAUI. Named .NET MAUI in Action, the book promises to be a treasure trove of knowledge and teaches real-world skills needed for successful .NET MAUI development.

While the book is in the works, thanks to the Manning Early Access Program (MEAP), .NET MAUI enthusiasts can get their hands on book chapters as they are being wrapped up.

.NET MAUI in Action shows developers how to use .NET MAUI framework to write native cross-platform apps using existing .NET development skills. One look at the book table of contents reveals the depth of information—getting started with .NET MAUI, building interactive UI in XAML, using MVVM pattern, writing custom drawn controls with the MAUI Graphics library, using native device APIs, building DevOps pipelines for automation and much more. This book should be a brilliant resource for all .NET MAUI developers—cheers, Matt, for seeing the book through completion.

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

Comments

Comments are disabled in preview mode.