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 March 7, 2022:
Introduction to .NET MAUI
DotNetNorthLive is a Meetup group for the .NET developers around Manchester and beyond. One of their recent live streams had David Ortinau on, talking about—surprise, an introduction to .NET MAUI. David started with the state of modern .NET—a unified developer platform with tremendous ecosystem momentum. It is nice to see the changes in .NET 6 and upcoming .NET 7 be fueled by .NET MAUI—the evolution of cross-platform development with .NET.
David went on to explain how .NET MAUI works under the covers to reach various platforms and all the goodies built into the framework for developers. Be it native platform access, Blazor integration, various Layouts or Accessibility, .NET MAUI will try to set up developers for success.
David went on to demonstrate popular .NET MAUI developer features, and showcase some new/upcoming XAML tooling functionality in Visual Studio. The roadmap for .NET MAUI till General Availability (GA) and beyond looks pretty promising, too—exciting times for .NET developers.
Single Project Experience in .NET MAUI
One of the biggest features of .NET MAUI, and one often overlooked, is the new true Single Project setup. Anyone shipping cross-platform mobile apps, particularly with Xamarin.Forms, knows the hassles of catering to each platform—managing dependencies, images, fonts and resources across platforms is no fun. .NET MAUI takes on this challenge and aims to take a huge leap in making developer lives easier.
Gerald starts out with the new .NET generic host builder pattern to bootstrap .NET MAUI apps—this brings consistency with the rest of the .NET ecosystem, and opens doors for easy extension methods & dependency injection. A closer look at the .NET MAUI Single Project structure reveals how developers can share key resources across platforms—the multi-targeted .NET builds know how to pick up anything platform specific from the corresponding folders.
Gerald explains why the pain of dealing with various image specifications across platforms is a thing of the past—with image resizing built-in, .NET MAUI can now cater to different platforms from shared assets, like app icons and splash screens.
While developers have full control to customize anything for native platforms, it is good to see .NET MAUI’s effort to start off developers from a good place—a true single shared project doing much of the heavy lifting to reach mobile/desktop platforms.
DevOps with .NET MAUI
Written a cross-platform mobile/desktop app with .NET MAUI? The next step is to publish your app to respective app stores and settle into a rhythm of pushing updates—some DevOps automation can really help here.
Andreas Nesheim wrote up an article on how to set up CI/CD pipeline for .NET MAUI iOS apps in Azure DevOps. This type of build pipeline and deployment automation is already a reality, but will be of paramount importance once .NET MAUI hits GA.
For iOS apps, developers need to know all the requisite steps for publishing apps—like creating a signing certificate, app identifier and provisioning profile. Andreas wrote up the next steps—creating a pipeline in Azure Devops and starting with a YAML file. There are some nuances and dependencies with .NET MAUI apps running on iOS/MacOS—developers need to pay attention to select the right VM, bring in .NET 6 and the .NET MAUI workloads.
Next up comes installing the all-important iOS certificates and provisioning profiles into the build agent—upload to Secure Files in Azure Devops and wire them up in YAML. Once everything is in place, we should be ready to build and publish our .NET MAUI app—cheers Andreas for the nicely explained guidance.
Learn Git and GitHub
Microsoft Learn TV hosts beginner .NET series shows each month and this month’s Let’s Learn .NET focused on Git and GitHub.
Irrespective of technology stack, developers need to understand the basics of source control, collaboration, versioning and associated tooling—this is fundamental to source code management. While good to learn for beginners, even seasoned professionals could use a refresher—a lot is evolving with Git and GitHub.
James Montemagno started off the day hosting Martin Woodward, who began with the basics source control strategies. It’s important to understand the fundamentals of Git and various tooling, before jumping into how GitHub brings it all together for modern developers. There can be a lot of nuances to everyday concepts—like Branches, Tags, Merges, Commits, Pull Requests and more.
Jon Galloway then hopped on to host David Pine to talk about all things GitHub Actions for .NET developers. Modern development team processes demand seamless CI/CD pipelines for continuously providing value—for any platform/language with community powered workflows.
GitHub Actions deliver it all and David walked through the various components of Workflows, like Events, Steps, Secrets, Caching—all with real-world examples. This was a fantastic live stream beneficial to all developers, period.
Monetizing Mobile and Desktop Apps
Any mobile/desktop app shipped to the Stores has a lot of developer time, effort and care behind it. While most indie developers do it for fun and passion, there is nothing wrong in trying to monetize apps—could amount to a few cups of coffee each month or more substantial earnings if you are successful. In fact, monetizing apps is an art and often encouraged to learn the nuances of app store economics through APIs or tools.
James Montemagno published a video on five ways to monetize apps—drawing from years of experience. James does a great job breaking down the various strategies to monetize: Paid apps, Non-Consumables, Consumables, Auto-renewable Subscriptions and Non-renewing Subscriptions. There is no right or wrong—it all depends on your app and what you want to do once or repeatedly.
James discusses the pros and cons of each approach, and ends with tips/tricks for in-app purchases. Bottom line, developers should not hesitate to monetize apps for which they are pouring their hearts out—it often leads us to ship better quality software and strategize how we’re providing continuous value to users.
That’s it for now.
We’ll see you next week with more awesome content relevant to .NET MAUI.