microsoft / microsoft-ui-xaml

Windows UI Library: the latest Windows 10 native controls and Fluent styles for your applications
MIT License
6.36k stars 678 forks source link

Discussion: WinUI should be cross-platform #2024

Closed SuperJMN closed 1 year ago

SuperJMN commented 4 years ago

Hello everyone.

For those that don't know me, I've been a veteran, die hard XAML developer since 2008. I've been involved in almost everything that was minimally related XAML (including WPF, Xamarin Forms and UWP, among others) and the only reason I'm writing this is to help and to be the voice a huge number of Forgotten Developers that are out of the loop already and jumped ship because they lost their hopes in Microsoft doing the right thing when it comes to application models, especially GUI related like the topic in discussion.

After long talks with the community, and being myself involved in projects like Uno Platform and AvaloniaUI this is that I've got.

Here, I'm trying to condense all the opinions and points of views that are that I've collected during these conversations. As you will see, they are very critic with the path that WinUI is seemingly taking.

The Forgotten Developers are silent or just ignored

As I said before, they are already out of the loop or simply exhausted. Some of them have tried to call your attention for years and were ignored or silenced.

As a summary, the Forgotten Developers:

Key points to consider

This isn't a rant, but the sad reality.

So, what's my proposal?

Take the best out of WPF and UWP:

And make it CROSS-PLATFORM!

WinUI SHOULD NOT repeat the errors of WPF and UWP

What actions should be taken?

binsys commented 4 years ago

Most of WinUI's technology comes from Sliverlight, and Sliverlight has actually achieved cross-platform. So WinUI cross-platform depends on strategy, not technology.

Qws commented 4 years ago

Honestly... it's actually so pathetic Microsoft is now trying to play catch up... they only care about "big" marketshare, they are not looking what their customers/product fans want.

Microsoft is the reason why DESKTOP APP development has shifted to the outdated WEB development, even when web is so horrible.

I'm sure every XAML dev agree that HTML/CSS is so garbage.

But still... HTML, CSS, DOM... with frameworks like React, Angular, Vue who are trying to make it something little bit more pleasant. People still focused on this outdated web, not on Microsoft's new closed-source Windows-only platform that dies every 2-4 year for a new one.

XAML based Win-app platform should have open-sourced YEARS ago. It should have write once deploy on WEBSITE, Windows, Mac, Linux, Android (any platform customer wants). Windows Store should have been crossplatform with an XAML/UWP app renderer. (similar how Google Chrome is crossplatform with HTML/CSS renderer).

During Microsoft's golden age, a XAML based crossplatform app could have destroyed the web, then we wouldn't had to deal with this CSS, HTML, DOM and countless frameworks.

But no, Microsoft obsession with proprietary software made them lose to the web.

Meanwhile Google's Flutter is becoming what I always wanted for XAML.

tomasfabian commented 4 years ago

I expect that WinUI 3 will be a target platform in MAUI. Uno platform has already announced that WinUI 3 Preview got support. So, @jeromelaban / Microsoft what we probably really need is Uno/MAUI unification? MAUI is less useful IMO than Flutter or Uno without a web (browser) target.

Please leave your comments in the MAUI repository, too.

WPF(Silverlight) everywhere!

handicraftsman commented 4 years ago

Porting DirectX to other platforms seems a vaste work, maybe the solution is to use OpenGL or Vulkan instead of DirectX

Google has ANGLE which allows running OpenGL ES natively on any platform by translating calls and shaders into native API (desktop gl [possibly provided by swiftshader software renderer], vulkan, directx, metal). It is also a core part of Chrome and Flutter, running alongside with Skia.

Microsoft could do a small (maybe just as a starting point) subset of DirectX for GUI apps and make it translate into native APIs just like ANGLE does.

handicraftsman commented 4 years ago

What comes to the "different linux distro support" problem, linux users are often skilled enough to fix incompatibility themselves, and even then there is Flatpak which unifies packaging for desktops just like Docker does that for servers.

theromis commented 4 years ago

Mentioned in Lonje chat https://www.lonje.com/message/1968439855/

Shadowblitz16 commented 4 years ago

I really think WinUI should also support native theming on Mac and Linux while still supporting custom theming. I'm not sure about Mac users but the Linux community likes to control how their desktop looks. They already have Gtk which I think would be a good thing to wrap into the WinUi framework

handicraftsman commented 4 years ago

I really think WinUI should also support native theming on Mac and Linux while still supporting custom theming. I'm not sure about Mac users but the Linux community likes to control how their desktop looks. They already have Gtk which I think would be a good thing to wrap into the WinUi framework

It is most definitely hard to do as WinUI is a style language, and underlying XAML frameworks require you to do theming yourself, while default themings are provided too.

mdtauk commented 4 years ago

I have suggested in the past, that the project should be structured in a way that enables the community to develop a Metal Renderer for macOS and iOS - and possibly a Skia renderer for Android.

The same default Styles and Templates could be used on all platforms, or Android and macOS styled default templates and resources could be created.

VBAndCs commented 3 years ago

Love the phrase "The Forgotten Developers". I know lots of them who are talented, experienced, passionate about technologies. They are veteran .Net developers. I have no doubt they, generally speaking, can make better apps than many kids who thrive on app development for iOS and Android. If WinUI can provide a pleasant and robust path for them to utilize their extensive experience in C# + .Net + Xaml to make apps for Windows, Android, iOS and Web, many will jump on the wagon and the world will benefit from their high-quality apps. WinUI + Uno Platform could be the ultimate call.

Microsoft flushed us out of the market, by it's unwise windows-protective strategy. This can end up flushing windows itself out of life!

plantoscloud commented 3 years ago

No it shouldn't be cross-platform. It's called Windows UI for a reason. Let's just get a UI system that works across all of Windows (platforms and languages) to start with hey? That hasn't even been achieved yet. We are still split between .net framework, .net core, uwp, and then the C++ story, which at least has uwp, but no game dev's use it, because UWP/WinRT still has some issues - distribution, forced taskbar & titlebar popups when in fullscreen (yikes).

Thinking about cross-platform would be a colossal waste of resources. Get it right on Windows first please. And get .net 5 out the door, and fix UWP and the windowing story, and put DirectX onto C#. And fix the GC. There is still so much to do in the narrow scenario, just on Windows.

And to the OP.

  • UWP is universal. To say it's not universal is a false claim (they never meant to target Android, thank god). The original promise has been delivered. All Windows devices run UWP. Windows Mobile was a separate OS, they had to get rid of it. All new Windows platforms will be Windows (10 or 10X). Eventually based on CoreOS I suppose. And they will all run Windows applications. Just because we don't have a Windows phone at the moment is incidental. We have all the other device types. And we'll have Neo and Duo soon.
  • Sandbox restrictions - These are good things. Win32 style system-wide access should be stamped out in general. If you have a specific requirement, you should put forward your requirement so that we can discuss how it could/should be done inside a UWP container and if you should be allowed to do it the way you are suggesting. And work out if UWP needs that feature. Because I can think of some advanced applications that could be written in UWP no problem. I can has program! You need to discuss specifics.
  • .net native is being replaced and the distribution story will change with .net 5. I think it's fair to say that Microsoft are working on this. Surely they know of the issues. But you should file specific issues to target the real underlying problems here.
  • "Don't couple WinUI to DirectX" - WTF? It absolutely should be coupled with DirectX, that is the native Windows graphics stack. Please don't even consider anything else. I absolutely do not want to come across OpenGL rendering surfaces under the hood. That would break compatibility and cause all sorts of mayhem.

what do you think about OpenXR?

SavoySchuler commented 1 year ago

Thank you all for your feedback and passionate discussion on this. There are a few a cross-platform technologies that now exist and have matured since this conversation started such as MAUI, React Native for Windows, and Uno Platform. We know this will not be the direction of WinUI in the foreseeable future and will be closing this issue.

Thank you again for supporting the team with your contributions to this discussion and throughout the rest of the repo. You are sincerely appreciated!