Telerik blogs

Welcome to the Sands of MAUI—newsletter-style issues dedicated to bringing together the 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.

.NET developers are excited with the reality of .NET Multi-platform App UI (.NET MAUI)—the evolution of modern .NET cross-platform developer technology stack. With stable tooling and a rich ecosystem, .NET MAUI empowers developers to build native cross-platform apps for mobile/desktop from single shared codebase, while inviting web technologies in the mix.

While it may take a long flight to reach the sands of MAUI island, developer excitement around .NET MAUI is quite palpable with all the created content. Like the grains of sand, every piece of news/article/documentation/video/tutorial/livestream contributes toward developer experiences 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 September 3, 2024:

What’s New in .NET MAUI

.NET MAUI is built to enable .NET developers to create cross-platform apps for Android, iOS, macOS and Windows, with deep native integrations, platform-native UI and hybrid experiences. There is a lot happening in the .NET MAUI ecosystem and James Montemagno joined forces with Rachel Kang at VS Live Redmond to cover all the updates—what’s new and next for .NET MAUI.

The session started with Microsoft’s investments in client app development and where .NET MAUI fits—it is the evolution of cross-platform native app development with .NET. Since the .NET 8 release, .NET MAUI has enjoyed great momentum, and developer adoption numbers are impressive.

James and Rachel showed off the latest tooling for .NET MAUI—both Visual Studio and Visual Studio Code can keep developers productive.

While .NET MAUI is squarely meant for developers to build native mobile/desktop apps, armed with modern smart WebViews, .NET MAUI is more than capable of welcoming web content to native land. In fact, Blazor/JavaScript developers should feel empowered to bring web UI components, routing, styling and more to native cross-platform .NET MAUI apps, while gaining complete native platform API access.

The duo talked about the new Native Library Interop—the slim bindings way of reusing iOS/Android native libraries and what’s next with .NET MAUI for .NET 9. The future is sunny with .NET MAUI—lots of work being put in toward a rich productive ecosystem for cross-platform .NET apps.

Visual Studio Live - What's New and Next for .NET MAUI with James Montemagno and Rachel Kang

Exploring Preferences

.NET MAUI is the evolution of modern .NET cross-platform development stack, allowing developers to reach mobile and desktop form factors from single shared codebase. Storage on file system can be tricky to implement across platform boundaries—developers need simple .NET abstractions that work across iOS/Android/Windows/macOS. Thankfully, .NET MAUI offers the simple Preferences cross-platform API and Leomaris Reyes wrote up a wonderful article—exploring Preferences in .NET MAUI.

Databases are the obvious choices for big volumes of data storage, but modern cross-platform apps often need to persist simple pieces of information—like remembering user names, app settings or user settings. With .NET MAUI, developers get access to Preferences—an abstraction over simple cross-platform key-value storage.

Leomaris starts off with how Preferences are persisted for each app and the limited set of data types can be stored—the simplicity is by design for quick data retrieval and consistent cross-platform implementation. Leomaris dives into how .NET MAUI developers can utilize Preferences and explores the APIs for setting/getting Preferences, as well as how to work with keys—an effective way to persist simple data in .NET MAUI apps across platforms.

key and value - preferences in .NET MAUI

Dev Tunnels for Local APIs

Modern mobile apps do not live in silos—they are often partnered up with an API or a backend service for continuity of user experiences. During the development cycles, developers often encounter the issue of debugging the service locally on the machine while the connecting mobile apps are running on emulators or physical devices. Machine boundaries can make communication difficult. The problem of accessing localhost from emulators/VMs/devices is actually easy if the backend services are written on top of the ASP.NET stack, and James Montemagno produced a video—testing local APIs with Dev Tunnels for .NET MAUI apps.

Accessing services/web apps running as localhost on a local machine has always been challenging from client apps running on emulators/VMs/devices. Dev Tunnels work by creating a unique URL that acts as a loopback to the local machine, thus making localhost accessible from the internet. Dev Tunnels are easy to set up through Visual Studio or CLI and support several authentication/authorization options.

James walks through a classic weather API written with .NET. The service running on localhost is made available publicly through Dev Tunnels, and reached easily from client .NET MAUI apps running on simulators/physical devices. James makes a strong case for using Dev Tunnels for testing backend services/APIs for .NET MAUI apps during development cycles—Dev Tunnels can revolutionize development process efficiency, allowing for seamless testing, debugging and team collaboration.

Testing Local APIs on Device with Dev Tunnels and .NET MAUI - with James Montemagno

App Insights

Visual Studio App Center was meant to bring together multiple cloud services into a DevOps solution—developers would be able to build, test and distribute native/cross-platform apps, as well as monitor app analytics and diagnostics. With VS App Center retiring, developers need to jump onto an alternative, and Daniel Hindrikes produced just the needed video—using Application Insights for .NET MAUI apps.

Publishing apps is only part of the journey for developers—the challenging part is often keeping a close eye on app health and usage. With the retirement of VS App Center, it’s more important than ever to understand how to use Application Insights effectively for monitoring, diagnosing and gaining insights into .NET MAUI apps.

Daniel is glad to introduce a custom-built library and a dedicated website designed to enhance the transition away from App Center. TinyInsights is the open-source library for tracking Application Insights, and a custom Blazor web app makes it easy to consume the insights for .NET MAUI apps. Daniel does a complete walk-through of the setup process, highlighting the key features of both the library and the website. With simple configuration, developers can get started easily—Daniel also shares best practices for a seamless transition. Monitoring is critical to app success, and it is great to see Daniel step up to provide a custom solution driven by Application Insights.

Application Insights in .NET MAUI - Daniel Hindrikes

.NET Conf

Modern .NET is powerful, open-source, cross-platform and welcoming to all with mature tooling accompanied by rich ecosystems. The next big milestone with .NET is already in the works—.NET 9 is scheduled for arrival in November 2024. Mehul Harry wrote up the announcement, so developers can mark their calendars—.NET Conf is happening virtually November 12-14, 2024 and call for speakers is open.

Aligned with the release of .NET 9, .NET Conf is scheduled for Nov 12-14—a free three-day virtual event, hosted by the .NET team and developer community. With a worldwide audience, the goal is to showcase the breadth of modern .NET development ease across AI, cloud-native and cross-platform apps.

Over the course of the three days, .NET Conf will provide a wide selection of live sessions that feature speakers from the developer community and .NET team members. Aside from core .NET content, there will be plenty of showcasing of cool things developers are doing with .NET. With all the wonderful updates across .NET 9, this year’s .NET Conf looks poised to be amazing—much to look forward to for .NET developers.

.NET Conf 2024. Celebrate and learn about what you can do with .NET 9 at the biggest .NET virtual event. Nov 12-14

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.