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 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 & 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 15, 2024:
.NET 9 Release
.NET is constantly evolving and the next big milestone is already cooking. Following the successful launch of .NET 8 last November, .NET is back on its annual release cycle—say hello to .NET 9 with Preview 6 now out. Comprehensive release notes highlight most of the enhancements in .NET 9 Preview 6 across .NET Libraries, Runtime and SDKs.
Set to be released at .NET Conf in November 2024, .NET 9 has important focus areas for cloud-native and intelligent app development. Developers can expect significant investments in performance, productivity and security, as well as advancements across the .NET platform. Tooling will get better with Visual Studio and Visual Studio Code with the C# Dev Kit, and cloud deployments will get easier using Azure services. Microsoft will continue to work with developers looking for ways to use C# skills to build next generation of intelligent apps, and to rapidly invest in AI.
Along with .NET 9 Preview 6 release come fresh new bits for .NET MAUI. The team is continuing work on core fundamentals of the .NET MAUI SDK to improve overall product quality. This includes expanding test coverage, end-to-end scenario testing and bug fixing.
The .NET MAUI bits for .NET 9 Preview 6 introduce a new .NET MAUI Blazor Hybrid and Web App project template in Visual Studio that creates a solution with a .NET MAUI Blazor Hybrid app with a Blazor Web app, which share common code in a Razor class library project.
Additional enhancements include support for Android API 35, Asset Packs for Android and multi-target versions for iOS bindings, among other things. Developers can get started with Preview 6 today—.NET 9 promises great things for the ecosystem.
MAUI Reactor Goodness
It’s July and time for #MAUIUIJuly again. Based on an idea originally started for Xamarin by Steven Thewissen, MAUI UI July is a month-long community-driven event where anyone gets to share enthusiasm and passion for .NET MAUI. Run by Matt Goldman, this is a great opportunity for .NET MAUI developers to learn from each other. MAUI UI July is happening throughout July 2024. The next article comes from Mark Allibone to stay motivated during home workouts—getting fit with MAUI Reactor.
MAUI Reactor is a code first, Model View Update (MVU) style framework based on .NET MAUI that promises less ceremony when writing apps. The goal is to have an app with multiple forms of popular workout timers, and Mark begins with the basics of building .NET MAUI apps with MAUI Reactor.
Even the first page of the app showing an assortment of workout timer buttons is an opportunity to extract UI components/styles and reuse them elsewhere. With .NET MAUI Shell navigation and fluent C# coding paradigms, Mark demonstrates how to wire up UI with app functionality and showcases state management. For developers wanting to bring MVU design pattern to .NET MAUI apps, Mark provides wonderful inspiration—and the motivation to get the most out of home workouts.
Barcode Scanning
.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. And MAUI UI July perfectly celebrates developer excitement around .NET MAUI—there is fresh content ready to be bookmarked every day of July. The next MAUI UI July article comes from Vladislav Antonyuk with a wonderfully practical writeup—various methods for barcode scanning in .NET MAUI.
Barcode scanning is a common requirement in modern mobile apps, enabling features such as product information retrieval, inventory management, point-of-sale systems and more. There are several libraries/tools available for .NET MAUI developers to implement barcode scanning, and Vladislav explores three popular methods—MLKit for Android, Camera.MAUI.ZXing and CommunityToolkit.Maui.Camera. For each of the approaches, Vladislav shows off the code needed to implement barcode scanning—easy for anyone to follow along.
Each method offers unique advantages depending on the specific requirements and target platforms for the .NET MAUI app. MLKit provides advanced machine learning capabilities for Android, Camera.MAUI.ZXing offers a built-in barcode scanner in a CameraView control and CommunityToolkit.MAUI.Camera provides the best CameraView control with the ability to plug in the barcode scanning functionality. By leveraging these tools, developers can implement robust and efficient barcode scanning functionality in their .NET MAUI apps—kudos for the great writeup.
Styling Blazor with CSS
.NET MAUI is squarely meant for developers to build native mobile/desktop apps—however, 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.
Blazor Hybrid already allows Blazor UI components/styles within .NET MAUI apps—and the code-sharing story between web and native apps is poised to get better with .NET 9. Claudio Bernasconi wrote up a great article on Blazor basics that should be a nice introduction for .NET MAUI developers or a refresher for web developers—styling Blazor components with CSS.
Claudio starts with the basics of CSS styling—Blazor works with CSS like any other web framework. Third-party CSS libraries like Bulma, Bootstrap or Tailwind are completely welcome—in fact, the default ASP.NET Core Blazor Web app project template has Bootstrap CSS integrated.
Claudio then dives into how Blazor works with CSS Isolation—a common roadblock in modern web development. With easy-to-follow samples, Claudio showcases how Blazor wires up everything for CSS Isolation—Sass/Less support is also possible with CSS preprocessing. This was a great refresher on the power of CSS styling for Blazor web apps—a good reminder for .NET MAUI developers wanting to share styles with web apps.
Modernizing Apps
Modern .NET is powerful, open-source, cross-platform and welcoming to all with mature tooling accompanied by rich ecosystems. However, the sheer long history of .NET means enterprise apps have been built on various platforms and run on a variety of .NET runtimes. For a lot of older apps, the reality is WinForms running on .NET Framework 4.X—however, WinForms can also run on modern .NET runtimes like .NET 8. It might be a decision fork for many, and Jefferson S. Motta wrote up a thoughtful piece—continue with traditional WinForms or migrate to .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 that extend the reach of Blazor/JS web UI technologies. However, for developers used to WinForms development stack, .NET MAUI can present a bit of a learning curve—Jefferson does a run down of common development patterns in .NET MAUI. If Windows is the only target platform desired, WinForms can continue to be a productive development stack with modern .NET runtime and even be able to embed islands of Blazor UI. Modern desktop apps are also complicated—Telerik UI suites for WinForms and .NET MAUI can keep developers productive.
Jefferson does a wonderful table comparison between WinForms and .NET MAUI, and even offers a quiz to help folks decide. Ultimately, WinForms is perfectly productive on modern .NET runtimes, while .NET MAUI is the evolution of taking .NET cross-platform—the decision depends on the app and the development team.
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 (2024-07-15T16:55:06+00:00) Sands of MAUI: Issue #151. Retrieved from https://www.scien.cx/2024/07/15/sands-of-maui-issue-151/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.