'What is the difference between MAUI and Uno Platform?

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?



Solution 1:[1]

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.

Solution 2:[2]

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.

Solution 3:[3]

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.

Solution 4:[4]

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.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 Rod Pineda Icaza
Solution 3
Solution 4 xbrossard