What is the difference between MAUI and Uno Platform?
Asked Answered
F

4

33

I'm a little confused. Can anyone explain exactly what the difference is between the two? When should we use MAUI and when UNO? As I realized, both can run on different platforms, so what is the reason for introducing two different technologies at the same time? Can they run on Windows 7? Or are they just limited to Windows 10? Can my WPF program run on Linux with these two technologies?

Farad answered 4/12, 2020 at 7:38 Comment(2)
I wouldn't say that they have been released at the same time, i believe that Uno Platform has been around a little while but MAUI is targeting GA in November next year (2021). They are 2 separate efforts from different "people" to essentially do the same thing.Velasco
Your WPF cannot run on Linux with any of these technologies. If you port your WPF app to UWP and then using UNO, yes. But, not intact. MAUI is not released yet, but, when it will be released, you will have to port your WPF to MAUI. WPF is now a dead-end, it does not work on any platform other than Windows, out of the box.Lidstone
R
48

UPDATE: Dec 1, 2023

For those who want a more up-to-date perspective, check out this GitHub issue thread about the developer dissatisfaction with MAUI. Also note that there are a couple of comments about Avalonia on mobile as well. In the last three years, UNO has continued to mature and get more stable with each minor release.

UPDATE: Aug 9, 2020

I've worked with the production release of Maui long enough that I thought I might share an update to my original post. Below are some criteria that I have used to compare the two platforms:

  • Migration from Xamarin.Forms: MAUI wins - unless your project needs access to the native layer. Accessing the native layer on UNO is significantly more straight forward. If you have more than one or two native interfaces, UNO might be less painful in the long run.
  • Devices / Platforms supported: UNO wins here:
    • UNO: iOS, Android, Windows UWP, MacOS, MacOS-Catalyst, Windows WPF, Window WinUI, WebAssembly, Linux GtK.
    • MAUI: iOS, Android, Windows UWP (MacOS and Blazor support is still pending)
  • WinUI and Windows Community Toolkit (WCT): The SDK surface (number of widgets) of WinUI is much greater than what MAUI offers. Adding WCT makes this a slam dunk.
  • Maturity: In most cases, this is why I choose UNO (I have chosen MAUI when porting very simple Xamarin.Forms apps, with mixed results). UNO has the benefit of 5+ years of development while the paint is still drying on MAUI. For me, this has meant my MAUI projects have had the kind of bugs and build problems that I used to see with Xamarin.Forms 3+ years ago.

And there's one more thing I might add - a bit of analysis. One thing I didn't consider when I originally wrote this post is why the development experience with UNO seemed less fraught with issues. Now that I've learned more, it's quite simple: DOG FOODING. Microsoft doesn't use Xamarin.Forms for any of its products and, to date, that's also true for MAUI. However, nVentive (UNO's parent), created UNO specifically to solve a problem for their business. It appears that they use it a lot. And, I'm starting to see it out in the wild in places I would have never expected, like the Nuget Package Explorer built into NuGet.org. Here's a link for those of you that can appreciate a little irony.

ORIGINAL POST:

I've been developing with Xamarin.Forms (to be renamed MAUI) for 5+ years and Uno Platform for soon to be four months. There are a number of differences that, to me, made it worth my time to move from Xamarin.Forms to Uno. First, the similarities:

  • Both are C# Cross Platform Frameworks
  • Both have XAML support
  • Both Support iOS, Android, Universal Windows Platform, and (to a lessor extent) Mac OS via the non-.Forms Xamarin platform frameworks.
  • Xamarin.Essentials works with both Xamarin and Uno on the above platforms
  • Neither have built-in support for Printing, PDF generation, or PNG generation.

Now the differences:

  • Architecturally, Xamarin.Forms is its own abstraction layer above the native APIs where as Uno builds UWP interfaces upon the native APIs. This is, in my mind the most important difference for three reasons:
    • In Android, Xamarin.Forms abstraction includes the measurement and layout management. This is VERY EXPENSIVE and, for all but the most simple of list views, results in very poor performance. Uno, by contrast, performs this in the native layer - thus avoiding a magnitude of passing back and forth between Java and C#.
    • In WASM, Xamarin renders via Blazor - which enables hybrid server / client applications. Unfortunately, this adds complexity when compared to the approach Uno has taken. It is yet to be seen if the Xamarin approach has a performance penalty.
    • Because Uno builds UWP upon the native UI frameworks, it's pretty straight forward to open up the covers and make deep changes in function. It's much more difficult (if not impossible in some cases) to do that in Xamarin.Forms.
  • Uno has strong support for WPF (so yes, it can run in Windows 7), Tizen, and and Linux (GTK).
  • Uno supports the complexity of UWP XAML - which, if you're experienced with WPF or UWP, has some major advantages. Otherwise, it will be lost on you, as it has been on me. I'm hoping to change that.
  • Uno supports WinUI and Windows Community Toolkit libraries.
  • Although I cannot be sure of this, I believe Xamarin.Forms has been around for about 2-3 years longer than Uno Platform. That being said, Uno has quickly caught up to Xamarin in function and code quality. I believe this is, in part because of having UWP as very mature operating spec.
  • In my experience of migrating a project of ~132k lines of Xamarin.Forms code to Uno, Uno was significantly less verbose, at ~65k lines. Almost all of that reduction was in lines of UI code (the models, view models, and business logic was almost untouched). This was largely due to the how much more feature rich UWP (Uno) controls can be.

Lastly, you asked if you your WPF program can run on Linux with these two technologies. The answer is

  • Xamarin.Forms: No. Linux is not supported;
  • Uno Platform: No, but it is possible to migrate your code. The effort would be about the same as porting your program from WPF to UWP.

Your mileage may vary. However, if you have experience with WPF or UWP, I would highly recommend Uno. If you have experience with neither, then I would recommend Uno because of the superior performance with Android.

Rebeckarebeka answered 9/12, 2020 at 18:42 Comment(11)
Can you accesss native apis from UNO? Like how xamarin.native exposes all apis?Noon
Yes ... and it's much easier than it is in Xamarin. In Xamarin, it's pretty painful to access the native layer - there's a half of dozen ways to do it and none of them are straight forward. In UNO, because your projects are MultiTargeted (the direction MAUI is going), you're always working in the native layer at the same time you're working in the UNO/UWP abstraction. You in-line platform specific code (using #if compiler directives). Also, just do a little inspection (either via debugger or looking at the source) to get the native view element that is behind the UNO/UWP abstraction.Rebeckarebeka
This was supposed to be MAUI vs Uno, not Xamarin.Forms vs Uno.Distinctly
Agreed, Paul. Take note of the date of the posting. At that time, there were no MAUI releases available for evaluation and so it is reasonable to compare two things that existed vs one that did and one that did not. Now that there is a rough (lots of missing elements) prelim release of MAUI, we can see it does have some of the benefits of shared projects seen in UNO but still retains the View Renderer design pattern (the source of NSConsistancy exceptions). Also note the OP asked about support for WPF - and (at this time) the only platforms MAUI supports are iOS and Android.Rebeckarebeka
Uno is not at all comparable to Xamarin.Forms/MAUI. Uno has lots of issues, lags on UI and lots of performance issues. Just try out their sample app Uno Gallery on the Play Store. The UI even lags on latest high end devices and hardware (see the reviews on Play Store). Their community support is also limited, check on StackOverflow (92 watchers) and the latest question I saw hasn't been answered since 5 days, although some questions were answered on next day. Use Uno only if you want to code all alone & with laggy UI..Marnie
@JunaidPathan: I have to respectfully disagree with you. All of the reasons you cite were the reasons I started looking into UNO in the first place. Specifically the Android performance issue! And the community (via GitHub) support has almost always been better than the Enterprise contract support I've received from Microsoft.Rebeckarebeka
Was looking at UNO and maturity and saw that you have updated this dec. last year. However, I really don't see UNO being as mature as you make it look. Been doing some prototyping to get a feel of it, if it is the way to go for a big commercial project. However, UNO lacks documentation and update of documentation in a big degree to be called mature. Examples in their documentation just seems to lack behind the releases, meaning you can spend a lot of time trying to solve simple issues because of this. New features etc. isn't described either.Gambill
@Gambill : I may be missing your point but I acknowledge that there is an argument to be made about documentation - the platform largely relies on Microsofts WinUI3 for interface surfaces and documentation. Little handholding there. However WRT maturity, in the realm of cross platform UI development, I see UNO as being outstanding amongst its peers. Is this a criticism of cross platform UI frameworks in general? Certainly the state of IDE support outside of Windows is a train wreck (largely thanks to Microsoft).Rebeckarebeka
@Rebeckarebeka Sounds like you have some practical knowledge regarding UNO, have you also tried some of the other frameworks available? Have you done any large / commercial projects with UNO ? Reason for asking is, that we are to re-implement / transform our current WPF application into a native/web/mobile app.Gambill
@Gambill : Yes. Have quite a bit of experience with Xamarin.Forms and MAUI but no actual project experience with Avalonia. Recently, I wrapped up a Xamarin.Forms to UNO Platform migration project for a large international automotive manufacturer. It is a line-of-business app so I'm not able to share. However, here's an example that I can share: the WASM version of an UNO Platform app I didRebeckarebeka
@Rebeckarebeka Thank you for the extra information, it is very helpful. It is difficult to make a educated decision using the frameworks own websites as they of course try and promote themself as the best and seeking information always seems difficult cause most people promoting a framework mostly use them for hobby projects.Gambill
K
5

A different perspective is that at this moment you can only compare UNO to what Xamarin.Forms do TODAY. If you are a member of the MAUI teams, then you should light up the way, but I am not. You really do not know what structural changes are being made to be more performing and lately Microsoft has put a lot of emphasis in performance - so I would guess they will surely work hard on the Java/C# divide.

Other thing to consider is that MAUI is a Microsoft API, UNO is not ( right now) Wo knows in the future , Microsoft tends to buy out technology they like and fits the vision.

IF you need Cross-Platform development now you are comparing between UNO which is available right now and Xamarin.Forms. MAUI is announced for 2021 if it does not gets delayed.

Now to answer your real question: You can run WPF today on linux using .NET Core , you do not need to wait for MAUI or get out of Microsoft API's.

Kyanize answered 23/12, 2020 at 17:8 Comment(3)
I don’t think that last statement is correct. You can’t run WPF today on Linux on .NET Core. You can run .NET Core on Linux, but not WPF.Huston
WPF is inseparable from DirectX, therefore no, cannot run on Linux.Preamplifier
No, you cannot run WPF today on Linux using .NET Core. WPF cannot be run on any OS other than Windows unless I am missing some virtual machine type layer technology.Lidstone
P
4

Uno team has also covered this question in the docs - https://platform.uno/docs/articles/intro.html#how-is-uno-platform-different-from-net-maui

Uno Platform applications are cross-platform, running on the web as well as mobile and desktop, equally, from a single codebase. Blazor is a feature of ASP.NET for primarily building web applications.

Uno Platform applications are written in C# and XAML markup, whereas Blazor applications are written in 'Razor' syntax, a hybrid of HTML/CSS and C#.

Uno Platform and Blazor both make use of .NET's WebAssembly support to run natively in the browser.

Private answered 1/4, 2021 at 19:27 Comment(5)
Kindly add context to any links so your Answer is self contained, meaning the answer needs to be here in the Answer itself. See "Provide context for links". It would be preferable if you could answer the Question in your own words here and link only as a reference.Gorse
Uno Platform applications are cross-platform, running on the web as well as mobile and desktop, equally, from a single codebase. Blazor is a feature of ASP.NET for primarily building web applications. Uno Platform applications are written in C# and XAML markup, whereas Blazor applications are written in 'Razor' syntax, a hybrid of HTML/CSS and C#. Uno Platform and Blazor both make use of .NET's WebAssembly support to run natively in the browser.Private
I see. Since this is a direct quote, you should use markup for that, so it's obvious that it is a quote and not your own words. I believe you can mark the entire text and click on the quote-icon or add > to the text. Clicking on the question-mark on the right side when you edit, will give you more help. Please see highlighted areas. I'd add that How to reference material written by others asks to "not copy the complete text of external sources; instead, use their words and ideas to support your own."Gorse
MAUI can use blazor hybrid (HTML/CSS/Razor) and can also use XAML as Uno does. The last part of this post is misleading.Ladon
This post is a comparison of Blazor and Uno. That is NOT the question being asked. Blazor is a "web" technology. NOT related to Maui UI. Yes, Blazor can be used inside Maui, to re-use the code investment made on the web. But that is a different topic.Foggia
P
0

WinUI doesn't support execution of an XAML+code behind into the browser; the WASM integration for Microsoft means that a WebView WinUI can execute blazor component in it. So, if you want to have graphical component which can be used into a browser (as a true web application, using wasm) and in any plateform (windows/mac/Android/IOS) as a classic desktop application, you must define it as HTML, not XAML. Uno permit it.

Peregrinate answered 11/5, 2022 at 10:32 Comment(1)
I have no idea what this is attempting to say. Something about Blazor perhaps? Regardless, it does not compare Maui to Uno. Blazor is not Maui. Maui is not Blazor. The ability to run Blazor inside Maui is a different topic.Foggia

© 2022 - 2024 — McMap. All rights reserved.