874 points · by TiredOfLife · 7y ago · 375 comments
"We will typically not accept contributions that implement support for an OS-specific technolology on another operating system. . . We also do not intend to accept contributions that provide cross-platform implementations for Windows Forms or WPF."
https://github.com/dotnet/wpf/blob/master/Documentation/cont...
Microsoft seems to be actually refusing to accept contributions that could make WPF cross-platform - it's a bit beyond "no official plans for cross platform".
I know, because I did this before with Mono, and the changes would be highly disruptive to the codebase.
And their whole .Net is full of patents.
I actually think MS did a great job by saying that. The purpose is to literally make the source public but they don't have resources to make a long commitment. Then it's better to not say it clearly and later got accused as not well performing.
> Open source doesn't mean open development and liability & commitments.
Right. We are stating up-front what we intend to achieve. We will sart with making WPF on .NET Core have parity with .NET Framework and then expand from there. We'll stick to Windows as the OS for the project.
> The purpose is to literally make the source public but they don't have resources to make a long commitment.
We are not saying that. We intend to continue working on WPF. In fact, we are talking about moving some of Microsoft's 1st-party apps to WPF on .NET Core, just like how we're moving 1st-party web sites/services to ASP.NET Core and .NET Core. Same playbook.
Nobody should be submitting pull requests for cross-platform support into WPF's main Windows repository. Instead they should branch WPF, make a platform specific version (e.g. WPF-Linux, WPF-MacOS, etc), and submit pull requests upstream that are platform agnostic (e.g. bug fixes).
If they were starting WPF again today they might create an agnostic master, which has a Windows specific branch. But they aren't restarting WPF, they're just open sourcing what they already have.
Suppose someone came up with .NET bindings for MacOS GUI controls, or Gnome. Would you expect a Microsoft to adopt those into .Net Core?
MicroSoft have two roles here. On the one hand they are the custodians of the cross platform .NET Core system. In the second role they are the Windows platform owner and provider of .NET bindings for some platform specific features.
If you decide to contribute to .NET Core, you join them in the first effort. If you come up with Gnome bindings or such, you are in the latter role but just because you are creating those bindings you’re under no obligation to port Gnome to Windows or anywhere else. Bindings for existing platform specific features are clearly in a separate category from shared cross platform features.
These frameworks have been around for many years, and many (if not most) of the applications built on those frameworks make heavy use of third-party control libraries. Those libraries, whether open source or propriety, often include at least some win32-specific interop code that has also been around for many years. Most of those libraries are now in “maintenance only” mode, if they’re even being maintained at all. Realistically, most Windows GUI applications built on .NET will never run on any platform other than Windows, even if the core UI frameworks become cross-platform.
As soon as Microsoft says, “WPF is cross-platform now”, they’d get flooded with bug reports that aren’t even related to their code.
My guess is that desktop apps will come back with pwa+wasm. Then you can have a rich client that is fully cross platform, single code base, same behavior everywhere, easy to deploy, written in the language of your choice. But that doesn't involve wpf...
I think I'd prefer that approach, anyway - I'd guess it's cleaner and ultimately more maintainable than introducing a whole bunch of conditional logic for handling all the cross-platform issues into an already complicated piece of software.
where did they notate their goals for wpf and winforms to be cross-platform? they specifically mentioned they open-sourced them to open up windows development.
Who's going to pay to buy the new CI machines they need to run someone's macOS backend that they contribute for example?
Be reasonable.
People can always fork and work on it, Microsoft is just sending the message that they won't do any work to incorporate any of it. Open-sourcing something is not an obligation to keep maintaining something.
I understand that the open source WPF can be freely used as a reference from where to borrow a few things.
Keep it contained in Windows! WPF apps are shoddy.
This project collects usage data and sends it to Microsoft to help improve our products and services. Read Microsoft's privacy statement to learn more.
For more information on telemetry implementation see the developer guide.
https://privacy.microsoft.com/en-US/privacystatement
https://github.com/Microsoft/microsoft-ui-xaml/blob/master/d...
Looks really easy to disable, but probably something some folks need to be aware of. Love the license and effort Microsoft put into this.
Making something like this opt-in is equivalent to not having it at all. Not just because of how little pick-up there would be on the telemetry, but also because the type of people who would opt in are a skewed sample not representative of the larger user-base they wish to learn about. It’s like the bias introduced by doing an opinion poll by asking people to do a one-hour opinion poll over the phone: you filter out the average person who doesn’t have time to do a one-hour poll, and get responses only from people with too much time on their hands (= unemployed; teenagers pretending to be adults; old people who just want attention; etc.)
Opt out telemetry is NOT an option. Opt in is. I've been fighting this position since they added it to .Net Core and will continue to do so.
That said, statutory civil penalties (fines per occurrence) for the effects of the bug in production _would_ fix the problem. Who is going to keep giant data-lakes around when they are the business equivalent of toxic waste? The developers are still able to write code, but they are incentivized to not collect extraneous user data.
Do you want the high school kid in his bedroom to go to prison because he wrote a "site" and his friends data got leaked?
I do the same.
(For the record I'm not saying they're perfect and that everyone should trust them!)
that's not interesting. the interesting question is: will there be a SQL Server Management Studio for GNU/Linux?
Yes, that's also the reason Raymond Chen gave when people asked Microsoft to open source the Pinball game that was removed from Windows Vista: https://blogs.msdn.microsoft.com/oldnewthing/20121218-00/?p=...
In the comments, a reader traced the chain of ownership and apparently Electronic Arts now owns the Pinball source code: https://blogs.msdn.microsoft.com/oldnewthing/20121218-00/?p=...
source: https://blogs.msdn.microsoft.com/oldnewthing/20180515-00/?p=...
But I don't doubt there is other code that is not so easily replaced.
I agree it is unlikely, or at least would require a huge amount of work. Then again, Sun did it with Solaris, so who knows what the future holds?
If somebody had told me ten years ago that Microsoft would open source their .Net runtime, port SQL Server to Linux, replace their proprietary browser engine with Chromium, I would have asked that person to give me some of whatever they were smoking. ;-)
Shoutouts to Oracle re-closing Solaris. That was an incredibly pointless move.
Last time I heard anything about Oracle Solaris, they fired more than a thousands developers at once, and some people commented that Solaris development at Oracle was more or less dead. (I have no clue if that is true, however.)
I have been using GNU/Linux and BSD on my personal machines since 2000, so the first part would not have blown my mind that much. For my needs (and Google's), quality operating systems were a commodity back then.
The second part, I don't know. Microsoft has been trying to move to a subscription-based model for a long time. Google Docs, GMail, Google Calendar were around back then, smart phones were becoming a thing. Microsoft moving away from traditional desktop and on-premises server software to a cloud-based model that would allow them collect "rent" instead of one-time license payments, that would not have sounded crazy. (Who knows - if they had tried to create a competing offer to Google's services that you did not have to pay for in sensitive data, they could have hit the Jackpot big time...)
Under those conditions, it makes much less sense for Microsoft to hold on to their code as they have done traditionally. But going from the company whose CEO publicly called FLOSS a "cancer" to a company that actively embraces it, that is a pretty huge change. When Nadella became CEO, I joked to a coworker that Microsoft was as good as dead, trying to go "cloud". I was obviously wrong on that one, and now I think if Ballmer had stayed as CEO, Microsoft would probably be much worse off.
That would be a change I’d love to see. But I think a better change would be for newer games not using DirectX and choosing Vulkan instead.
Many critical components are deep inside Windows kernel, in dxgkrnl.sys, they are very hard to unbundle from the rest of the kernel.
Other critical components are in vendor-implemented drivers, both user mode (this part compiles shaders and implements many per-game compatibility hacks) and kernel mode (this one talks to actual hardware).
Fortunately, there’re already third-party implementations of D3D on top of something else.
Gallium 9, the main downside is no Intel GPU support.
DXVK currently only supports D3D 10-11 and WPF is based on 9, but apparently some people are working on D3D9 support.
There’s also VK9.
Would that ever happen? Well, if they can drop EdgeHTML..
It's likely most of the nuts and bolts of Windows can be open sourced without threatening their business model, as competing OSes are pretty architecturally incompatible, and there will always be some closed source parts of Windows. Bear in mind, Microsoft is working heavily on shifting their revenue to being services-based as well.
At first, I was thinking that it would only be bad for the non-technical folk (i.e. other 99%) who wouldn't know how to re-install a better windows. But then, I remembered that even MS is having a hell of a time rolling out updates without breaking machines. All the different branded flavors of windows would just make getting windows updates that much harder or terrifying, I think.
If it was open source, it wouldn't be long before there were hundreds of forks that removed the telemetry, advertising etc. That's by far a net win.
Why not just reserve the trademark Windows to Microsoft? If other OEMs want to muck up their own builds they would have to brand it their own and risk their own reputation.
It's the same with Android. A very small percentage of people buy phones with pure Android OS on them. The rest of the non-Apple crowd buy whatever looks good at the store and calls it Android.
I would absolutely love to be proven wrong on all of this. I rarely use Windows (mostly for gaming) and otherwise a linux is my daily driver, so either way I'm not likely to be impacted much. Perhaps I'm just too cynical after all of the utter nonsense Lenovo and gang have pulled with windows in the past as it is.
Then they could charge for a subscription to the "pro" features and take a cut from apps on the Windows store.
But that would only work if it's legally possible to open source even that much of it in the first place, which may not be the case.
Linux distros already do exactly that for other “open source but non-redistributable” things Microsoft offers, like the MS Core Fonts. The distros’ packages for the fonts don’t contain the fonts, but rather a wizard that goes and gets them from Microsoft’s servers on behalf of the user, and then installs them.
This seems legitimate enough, as an approach; nobody’s ever been sued for this. So I’m not sure there would be much difference in the legality of it if it were the whole OS.
They could give away desktop licenses, even in the enterprise, and still rake in the cash from Active Directory and Exchange server licensing.
They probably make more from CALS than Windows desktop now.
A machine like that can be had for only 2-4$ hour on your favorite cloud computing platform.
And hopefully the code is sanely enough structured that you don't have to do a complete rebuild too often.
Lots of projects take a long time to build, so it's not a show-stopper by any means. I imagine you could also mix precompiled parts with parts you compiled from source too.
Just not to scare someone off, from building gcc. :] It's fun.
Sounds about like the days it took to boostrap up Gentoo+X+KDE+etc back in the day.
Ultimately, they'll still be able to sell windows like redhat, and it's the stuff that runs on Windows which is more important anyway.
And it's not like Microsoft is Red Hat vs Oracle, they can bury anyone making a "hostile" distro.
Isn’t Windows 10 already more or less free? You can download it on their site, install it, skip the activation and that’s it. There is a message “Activate Windows” at the bottom right of the screen but it doesn’t matter for most people I guess.
They have zero interest of Mac software running elsewhere. They do have an interest for other software to be runnable under macOS / iOS without a major porting effort, but not a very great interest, I suppose.
However in 10 years no one has cared enough to start a project to do this, so I'm not too optimistic.
So I tried using the old GUI framework and boy was it a nightmare to customize anything. I remember having to override the default Button class and add like 50 lines of code just so I could get a custom background. This and the fact that C# back then couldn't do high scalability servers were what forced me to learn C++ and in my opinion QT is a much easier library to use than the old WinForms was.
That's mostly because you're not supposed to be doing that sort of thing in the first place. Customizing widgets = inconsistent look and feel. Custom widgets = Inconsistent LAF, inconsistent interaction, no accessibility etc.
The idea of Win32 UI, WinForms etc. is that you have a look and feel dictated by the system, not by individual app developers, with the ultimate goal being not just a consistent look and feel of the whole system (including applications) but consistently applied patterns of interaction. This in turn makes computers easier to use.
Of course, modern UI frameworks, whether in the browser (JS) or outside the browser (QML, UWP, JS, ...) run completely counter to that.
I was trying to write a poker client so same thing, using normal buttons just wouldn't have made any sense. It would've been ugly as hell.
Modern UIs stray from a standard because standards are boring and if your app is boring then your not so boring competitor will snatch your users.
Ohh, the good old days...
That always puzzled me, even though I've seen some of Microsoft's reasoning and blog posts about it.
Microsoft has repeatedly stressed that you can't assume any particular version of Windows comes with a specific version of .NET preinstalled (or VC++ runtime, for that matter).
Windows already bundles various things, and the major .NET frameworks seem like the thing to bundle and preinstall, and they actually do[0], just not consistently or universally.
And, Windows Update can already update the .NET frameworks, in fact I recall that some new major .NET versions were treated as "recommended" installs by WU in the past and were automatically installed on systems that didn't already have them, but they aren't doing that consistently and universally either.
[0] https://blogs.msdn.microsoft.com/astebner/2007/03/14/mailbag...
Since WinForms' existing styling was the style of applications of the day, there was little reason to heavily restyle it. Honestly, if someone ran with the new open source WinForms and introduced a Windows 10 style that I could build with the same incredibly easy editor as the existing WinForms, I'd be set.
I think Lazarus[0] is easier, especially when it comes to automatic layout stuff, but WinForms is very close. They're somewhat related as both are descendants of the classic Visual Basic RAD approach and Lazarus is basically an open source and cross platform clone of Delphi while WinForms implements a very VCL-like (VCL is Delphi's framework) API - which is natural since both Delphi and WinForms were designed by the same person :-P.
Beyond the above (which i think are all what WinForms provide, at least from the visual designer) the anchors can also be set so that instead of just "sticking" to a designed edge, they are set relative to some other control in the parent container with customizable gaps. For example you can configure (using a dedicated anchor editor window) that the left edge of an input box is 5 pixels away from the right side of the label control and the label control's top edge is aligned so that the label's center matches the edit box's center. Note that any control can be anchored to any other control, so if you have a form with 10 input fields you can anchor their left side to the same control (e.g. the longest label or a "guide" control) so that they align neatly.
The align property is enough for most cases and the anchor system covers almost the rest of the layout cases. Where those do not suffice, there are a few more dedicated options like the TFlowPanel container that flows controls in various formations as well as the ChildSizing property that allows for specifying some automatic layouts. TBH personaly i never had to use those though. Note that most of them can also be combined.
Finally each control also has constraints (min/max size) and spacing (margins) for each edge as well as an overall spacing.
Somewhat related, but you can also make pretty much any control dockable by setting its DragKind property to dock and DockMode property to automatic. Docking happens in "dock sites" which are basically any container (like a panel) that has its DockSite property set to true (and preferably, although not required, its AutoSize also to true) and since containers are regular controls they themselves can be laid out using any of the above options or be anchor targets for sibling controls. The framework handles the whole drag/drop, docksite resizing, creating popup windows for tearoff docks, etc. In fact the whole docking system is modular itself and there are a couple of different docking managers that provide quite advanced options.
Note that all i've mentioned so far are done with the visual designer, there is obviously more fine grained control by writing code.
MS’ problem is that Visual Studio is the only “real” software they produce that uses WPF - which also happens to be a flagship product. They need WPF to stay up-to-date but they can’t afford to invest their own FTE resources into it either when other products are more important as far as the C-levels are concerned.
I’m curious what this means for UWP XAML - as it has its origins in WPF. Can Microsoft use open contributed WPF code in UWP?
WinUI included in the announcement above is the UWP XAML controls and their "XAML Islands" wrappers, so Microsoft is directly taking UWP open source contributions now, too.
They can, because the open source version of WPF is MIT-licensed.
- quite buggy
- quite ugly
- does not support Wayland
- does not support accessibility
- is literally WinForms. It's a 90s era GUI toolkit.
I fail to see how this is a problem, mostly because the job it was designed to do (build guis for desktop applications) has seen little innovation since the 90s.
WPF, Windows Forms, and UWP are listed under the Windows-Only Desktop Packs section in the diagram.
https://blogs.msdn.microsoft.com/dotnet/2018/05/07/net-core-...
[1] https://blogs.msdn.microsoft.com/dotnet/2018/12/04/announcin...
Things are a bit more complicated than that, I guess that's specifically why Microsoft is open sourcing "the desktop pack", because it is not multi-platform.
Now that it's open source, the process should be even easier.
I'm sure it wouldn't be impossible to kitbash this release with WINE and get it working on Linux.
Also MS's lawyers may not be 100% clear about whether these libraries already include patented technology from other patent holders that MS may have licensed years ago.
MIT punts on the whole issue, so may seem "safer" to a lawyer when used with a giant existing code base. Apache is clearly the right choice for new development (for those who don't like GPLv3, anyway -- let's not get into that argument).
I've used WPF for about a day, and I never went back to using it. Not 'hating' on it, I just want to understand WPF and the incentives to open source it (I get it for .NET though).
I'd be interested in any association that can be made against previous versions of such libraries, and the newly released open source libraries. Are the 'releases' between the old closed source and that of the newly open source significantly different?
If so, and either way; I'd be interested in knowing what kind of changes were applied in direct action of the source being released. Was it just cleaning/linting of the code? Were there features that were otherwise inappropriate (security? quality?) that needed attention before release.
Things like alignment with child dependency license agreements, or overall quality (in code, testing, and deployment) are things I find extremely interesting. Was there some interesting 'inappropriate' language in the source from developers long gone. Could this have effectively been the opposite spectrum of what happened with event-stream https://github.com/dominictarr/event-stream/issues/116
I'm not explicitly saying it's any of my business. I can imagine a multitude of reasons that this history would never be provided. But... as above.. I can consider reasons, perhaps; it should..?
I don't mean to discourage release. I really appreciate it. Just some thoughts..
Edit: Minor readability
IIRC, while Paint.NET was under the MIT license at that time, porting to Mono was not possible because of the lack of WinForms. Not sure where I read that, maybe here: http://www.osnews.com/story/22843/Introducing_Pinta_a_Gtk_Cl...
Secondly, Paint.NET includes quite a bit of non-WinForms/WPF code by now, talking directly to DirectWrite and Direct2D in places and probably other things as well. It's very much a Windows-only application and porting it would require rewriting a lot of important core code of the application.
It reminds me of when the Windows 2000 source code was leaked and it showed how vulgar a lot of the comments were.
Start a new OS, along side Windows, based on Linux/Unix.
Make it as stable as Windows for the every-day user, because let's be realistic, even Ubuntu can't manage it.
Ship all new laptops/PCs with this new OS.
Continue supporting Windows/Server for the enterprise.
That would be so awesome.
As of automatic detection check my question on SO: https://stackoverflow.com/questions/51334674/how-to-detect-w...
I myself implemented the modern black menu style for a tray icon, so that the menu looks like the native tray icons. It's "just" a matter of owner drawing everything. Unfortunately, there is no secret "make my app dark" api in WinForms / WPF.
But as a long-time Windows programmer, I would liked to see parts of Win32 open-sourced, because it's the far more interesting (and efficient) part of what makes Windows... Windows.
Currently, the linked WPF repository is almost empty. Very little code, and not a single .cpp file. WPF's native layer is huge, wpfgfx_v0400.dll, PresentationNative_v0400.dll, etc., lots of complexity between .NET and Direct3D 9.0c.
I’m not going to say it can’t be done, but I will venture a guess that it’s going to be difficult and probably a lot of effort.
More effort than simply forking and porting to be X11/Wayland native? Not sure, but I wouldn’t dare to exclude the possibility.
I work at Microsoft and use WinUI but don't directly work on it other than reporting bugs :)
In the meantime, Uno is the closest thing we have:
It's based on WinRT, which is based on COM.
It would be mich easier to port it if the source code was available.
Personally I think it's too little and too late, Desktop development has had its day.