Microsoft cross platform UI framework Maui is coming

Time:2021-5-13

. net 6 preview is online. It’s time toBUILD 2020Ready for the new. Net multi platform app UI (Maui) announced on. There are many exciting changes in. Net this year for client application developers. Let’s review the highlights and see what might happen next year.  

The planning and project execution of. Net 6 is open. We have a great website that focuses on the GitHub milestones and user stories of the whole. Net. You can visitthemesof.netAnd search in xamarin for an overview.   

Microsoft cross platform UI framework Maui is coming

. net 6 and Mobile SDK

The core of this version is to unify the xamarin SDK to. Net. Xamarin has always been a part of. Net, but now it has been released as the core content, sharing the same base class library with other components (such as blazor), and using the modern SDK project system style to provide a consistent tool experience. Xamarin is no longer something like. Net or dependent on. Net, but. Net itself. The consistent naming in the documentation and product pages makes this clearer.
Microsoft cross platform UI framework Maui is coming


Xamarin.android and xamarin.ios are now additional platform objects that you can develop through. Net, so we call them. Net for Android and. Net for IOS. These SDKs themselves are the binding of. Net with the local SDKs of Google and apple respectively, so their API has not been renamed.

.NET Multi-platform App UI (MAUI)

Xamarin. Forms is a cross platform mobile priority framework for Android, IOS and uwp. Net Maui is the evolution of xamarin. Forms. We have 7 years of experience in providing technical support for customers. Our clients range from independent developers to some large global companies. We are improving the core functions of our products, accelerating UI rendering, investing in research and development of consistent system design patterns, and expanding from the mobile end to the desktop end.
Microsoft cross platform UI framework Maui is coming
For customers of xamarin. Forms, you can think of Maui as the next major version of xamarin. Forms that you know now. For developers who have just started to use. Net for multi platform development, you can first understand what services we currently provide for you.

quality

Since the middle of 2020, the core team has been focusing on the influential problems in the products, and designed new control structure system to better serve the future. Xamarin. Forms 5.0 is the last major functional version before. Net Maui, and subsequent releases will only include bug fixes. Xamarin. Forms will continue to be updated until November 2022.

New controls are not included in this release. We focus on product quality. We are just as excited about the new features as you are, so we are very glad to see such positive feedback from xamarin community toolkit 1.0 released with xamarin.forms 5.0.

When you look at our GitHub Librarydotnet / mauiCompared with xamarin. Forms, this organization takes advantage of multi-objective structure and has a more consistent naming method. We hope this will make it easier for contributors to find the people they want to change. Development activities are under wayxamarin / Xamarin.FormsThe main handler branch of the library is active, and these updates are synchronized to theDOTNET /MAUIGo in.    

performance

Application startup and UI response time are two critical parts of application performance. To help locate potential performance issues here, we have made significant improvements in AOT, start tracking, and fast renderers Net Maui in addition to. Net 6 itself to get performance improvements, we also have a few can significantly improve the performance of the application changes!

Microsoft cross platform UI framework Maui is coming

The new handler architecture in. Net Maui eliminates view nesting and reduces the number of UI controls needed to render views. It also fundamentally decouples platform controls from the framework itself. In xamarin. Forms, each of the renderers has a reference to the cross platform elements, and usually depends on theINotifyPropertyChangedWork Net Maui does not use these renderers, but introduces a new mode called handler.

Now, the relationship between framework and platform is inverted. All platform controls need to do is deal with the requirements of framework. This not only improves efficiency, but also makes it easier to extend or rewrite. Gone are the days when you need to create custom renderers or effects (we will still make sure that custom renderers and effects are available).

The new structure also makes the platform handler more suitable for reuse by other frameworks (such as fabulous) and innovative projects (such as comet and blazor). We always focus on the future!

Design

The design requirements of applications for multiple platforms have changed a lot compared with many years ago. In the early days of xamarin. Forms, most customers wanted their Android apps to look very much like Android, and IOS apps to look very much like IOS. We have introduced more and more styles and controls into xamarin.forms, and made these styles and controls look the same on various platforms. In addition, we have added visual control API and material design component to IOS, so that you can have the same user experience as Android. These efforts are part of a way to meet the needs of our customers and lay the foundation for further development in. Net Maui.

Microsoft cross platform UI framework Maui is coming

We will enable the application theme of full app through the styles of fluent UI and material design, use the necessary style API and visual states on the existing controls, and increase the support for control templates as much as possible.

In the aspect of experiment, we also launch a new visual strategy, which combines native control and paintable control. Later this year, we will have more information to share. For customers who need 1:1 cross platform design and want better performance, but also need native platform support, this will be very friendly.

platform

. net Maui includes Android, IOS, MacOS and windows in. Net 6. In addition, we are also working with the blazor team, including blazor desktop development in. Net 6.

Xamarin originated in the field of mobile development, which is of course where most customers use it. After that, we joined xamarin.mac and used the tools bound to AppKit to realize the development of Apple desktop platform Net 6 now calls it. Net for MacOS, but we see that apple is moving in a different direction in MacOS desktop development, and we want to make sure that we provide you with the best experience. To this end, we are introducing. Net support for Mac catalyst, which is a solution provided by apple. It can bring your IOS applications built with UIKit to the desktop, and extend them through other AppKit and platform API as needed. You can browse Apple’s many first-party applications to experience it yourself Net Maui will also include this method.

At the beginning, when the goal of uwp was to deploy to Windows Mobile, xamarin. Forms added a mobile centric implementation for uwp. In. Net Maui, we bring more powerful support for desktop through winui 3 Desktop, which is the latest implementation of our windows team partners to build excellent applications. When it comes to uwp and winui related to. Net Maui, the most common question we are asked is what form XAML will be in. Net Maui. Because. Net Maui controls are multi platform, not limited to windows controls, and because we have a large number of customers of xamarin. Forms, we hope that you can have a consistent experience in. Net Maui.

Single Project

One of the most exciting things we’ve announced through. Net Maui is the single project experience. We found that developers are most efficient when they focus on. Net standard projects, not when they jump back and forth between Android, IOS, MacOS and windows projects.

As part of this experience, we are unifying many management approaches, such as font and image management, and reducing our dependence on the complexity of managing multiple platform projects. For developers who like or need multiple platform projects, it is still supported!

. net hot overload

In the past few years, the introduction of XAML hot reload has greatly saved. Net developers’ time. The changes made in XAML will be pushed to the running application, so as to avoid the tedious construction and deployment cycle, and help developers better focus on application development. In. Net 6, we extend it to C and introduce it to other workloads. We can’t wait for you to experience this change in the second half of this year.

Prepare for. Net 6 and. Net Maui

I hope you are interested in the above highlights. They come directly from conversations with customers like you, and we’ve prioritized these topics in. Net 6. If you don’t see the update you want, please let us know that we will start planning for. Net 7 and later in the near future.

To help you prepare, here are some common questions and answers.

Q1: should I use xamarin.forms today or wait for. Net Maui?

You can start using xamarin. Forms directly! When we’re ready, we’ll provide a way to migrate to. Net Maui.

Q2: what to do when migrating from xamarin. Forms to Maui?

First, you don’t need to rewrite the application. As a first step, you need to update your project and solution to use the standard SDK. Then, update the namespace and nuget package of xamarin. Forms. Since this is a major version update, any obsolete API in your project should have been updated at this time. That’s it!

You can then choose whether to migrate the custom renderers to the new handler architecture for all possible performance improvements. This can be done at your own pace.

Before migrating, you can explore. Net Maui in a new project.

Q3: does my custom render work?

We provide an adapter that enables the render to work at the same time as the new handler, but we recommend that you update to a handler for performance improvement. In addition, there is much less code to maintain when using handler.

How are Q4: vs code, comet MVU and blazor mobile binding now?

At present, they are still experimental projects, and we will continue to iterate:

  • Comet MVU
  • Blazor Mobile Bindings

Recommended Today

Design of multiple login users in ABP

scene In the “school management system”, students, parents, teachers, educational administration may log in and do some of their own operations. These users need different attributes. For example, students have student numbers, but teachers don’t. Application users When coding, you often need to get the information of the current login user, which is the application […]