Sands of MAUI: Situation #84

Welcome to the Sands of MAUI—newsletter-style points devoted to bringing collectively newest .NET MAUI content material related to builders.

A particle of sand—tiny and innocuous. However put a number of sand particles collectively and we’ve one thing huge—a power to reckon with. It’s the smallest grains of sand that usually add as much as type huge seashores, dunes and deserts.

Most .NET builders are excited with .NET Multi-platform App UI (MAUI)—the evolution of recent .NET cross-platform developer expertise. Going
ahead, builders ought to have far more confidence within the expertise stack and instruments as .NET MAUI empowers native cross-platform options on each cell and desktop.

Whereas it might take an extended flight to succeed in the sands of MAUI island, developer pleasure round .NET MAUI is kind of palpable in all of the shared content material. Just like the grains of sand, each piece of reports/article/documentation/video/tutorial/livestream contributes
in the direction of developer information in .NET MAUI and we develop a group/ecosystem prepared to be taught & assist.

Sands of MAUI is a humble try to gather all of the .NET MAUI awesomeness in a single place. This is what’s noteworthy for the week of December 12, 2022:

Desktop Apps with .NET MAUI

.NET Conf noticed the discharge of .NET 7, together with a great deal of bulletins for all sorts of .NET improvement—each .NET Conf session is now out there on demand. There clearly was no dearth of affection for .NET MAUI, with devoted classes on daily basis highlighting
the progress that runtime/tooling are prepared for .NET 7. Shane Neuville from .NET MAUI engineering group did an exquisite session—recapping what’s new in .NET MAUI and showcasing newest in desktop app assist.

Shane began out with the large .NET MAUI for .NET 7 announcement, earlier than mentioning a number of new options, like Twin Display assist, Window Positioning and Accessibility enhancements. It was then time to dive into all issues desktop—.NET MAUI is
the following era of .NET cross-platform story, and desktop assist is a first-class citizen.

Shane had a pleasant pattern app to showcase all the most recent desktop-friendly options that at the moment are constructed into .NET MAUI—like Tooltips, Context Menus, Pointer Gesture Recognizer, Foldable display assist, Window Location APIs, MenuFlyoutSeparator and far
extra. Enterprises are taking a look at .NET MAUI to construct apps which can be desktop-first—that simply occur to be cross-platform with a single shared codebase.

The long run seems good for brand new desktop apps with .NET MAUI or modernizing present desktop apps to .NET MAUI stack—builders have all of the wanted ammunition.

Xamarin.Kinds to .NET MAUI

.NET MAUI operating on the most recent .NET 7 runtime and steady tooling needs to be offering builders with extra confidence—it could be time to maneuver apps from Xamarin land over to .NET MAUI. Certain, there’s loads of steerage, however nothing beats the expertise
of seeing one other knowledgeable developer do the migration on a real-world app. James Montemagno is right here to oblige, and did a lengthy livestream on upgrading apps from Xamarin.Kinds to .NET MAUI.

James began out offering newest updates round .NET MAUI and tooling, adopted by some sincere Q&A. In the case of migrating apps from Xamarin.Kinds to .NET MAUI, there’s steerage for handbook steps and utilizing automation tooling just like the .NET Improve

James selected the present famed MyCoffee Xamarin.Kinds app to maneuver over to .NET MAUI, beginning with migration of the present challenge file. The subsequent step was utilizing the .NET Improve Assistant, which whereas not a magic wand, will get issues going actually properly
for migration.

As is true for many real-world apps, James had a bunch of issues to repair up manually, however on the finish—voila, the Espresso App was moved over and now operating on .NET MAUI. Experiences like this could encourage extra builders to maneuver apps over from Xamarin
land to .NET MAUI—there’s loads of assist.

NoSQL with LiteDB

.NET MAUI apps for cell/desktop will usually must retailer information domestically on the system—for caching, storage, settings and a bunch of different use instances. NoSQL databases will be useful in storage and fast retrieval of enormous quantities of non-relational
information. Daniel Hindrikes had produced a splendidly useful video—engaged on NoSQL with LiteDB for .NET MAUI apps.

Daniel likes to show ideas with real-world examples—a multi-tabbed .NET MAUI app with types over information would get the purpose throughout. A neighborhood database contained in the .NET MAUI app can do information storage and LiteDB can lend a serving to hand—an
open supply NoSQL database.

Daniel begins off bringing within the LiteDB NuGet bundle and proceeds to implement an information service for storage and retrieval of knowledge. With a brand new LiteDB database created at given system file path, C# objects/collections will be simply written to and skim from
the database.

If information safety is a precedence, Daniel showcases how one can encrypt the database utilizing safe file storage—streams of knowledge can now be written and skim securely inside .NET MAUI apps.

SQLite with .NET MAUI

The vacation season is upon us and it is time for Introduction Calendars—enjoyable, on a regular basis surprises main as much as Christmas. .NET MAUI builders can rejoice—there’s a devoted .NET MAUI tech Introduction Calendar 2022, an initiative led by Hector Perez
and Luis Beltran. A current submit within the .NET MAUI Introduction Calendar was written by Luis Beltranworking with international keys in native SQLite databases inside .NET MAUI apps.

.NET MAUI apps could usually have the necessity to retailer relational information domestically on units—SQLite will help with native database storage. Nonetheless, a extra reasonable want could also be when native databases have a number of tables which can be associated and international keys are
wanted for question references.

Luis units out to show how one can deal with such information relations in his detailed article, beginning with a contemporary .NET MAUI app challenge. As soon as the SQLite dependencies are introduced right into a .NET MAUI app, builders can begin writing SQL operations on outlined
databases/tables—all CRUD (Create/Learn/Replace/Delete) queries are supported. Luis showcases how one can match up Fashions to information storage and writing queries that go throughout tables referenced by international keys. This text dives into actual world developer
use instances with detailed code and open sourced pattern challenge—cheers, Luis.

Breadcrumbs in Cell

.NET MAUI simply invitations internet content material into native cross-platform apps—a contemporary WebView part makes it attainable to share code/kinds throughout internet, cell and desktop. Nonetheless, not every thing meant for the net interprets properly to cell type elements.

The breadcrumbs navigation sample is fashionable on the internet—when performed proper, breadcrumbs let customers see the place they’re, the place they will go and supply straightforward navigation via ranges of content material. This isn’t really easy for cell, and Suzanne Scacca wrote
an exquisite new article—finest practices for designing breadcrumbs for cell.

Suzanne begins out explaining the few forms of cell breadcrumb navigations—location and attribute primarily based ones are frequent. Cell internet design is at all times a fragile balancing act, offering customers with content material and options, however not on the expense of
usability or accessibility.

Suzanne recommends utilizing breadcrumbs on cell solely when the profit is actual—with internet content material at the very least three layers deep. Wrapping and scrolling breadcrumbs will be tough on cell, and builders/designers want to make use of dimension/area to enhance faucet
targets on breadcrumbs. With some design pondering, breadcrumbs for internet can work when introduced over to cell/desktop land with .NET MAUI—thanks for the pointers, Suzanne.

That is it for now.

We’ll see you subsequent week with extra superior content material related to .NET MAUI.

Cheers, builders!

Telerik UI for .NET MAUI: Kickstart your multiplatform application development

Related Articles


Please enter your comment!
Please enter your name here

Latest Articles