Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You couldn't just port from WPF to Silverlight. They took away tons of features. WinRT was even worse. No idea about UWP but I don't care anymore.


That's why I mentioned semver. APIs change all the time, backwards compatibility gets broken. Yes, conversions weren't always straight forward, but often were possible, and there was an evolutionary arc to it all, and a migration story to follow, even when sometimes that story was a bit rougher than anyone wanted.


They couldn't have done that because these technologies are not exactly for the same things and don't have the same features.

Silverlight was mainly for apps embedded in the browser. It was very limited compared to WPF and not meant to replace it.

Similarly, Metro was not meant to replace WPF. It was extremely limited in what you can do. You couldn't build serious desktop apps with that.

The fact that all those technologies use XAML does not mean they're newer versions of the same thing. The difference in APIs is not what matters, it's the difference in what they can actually do and how that makes them different.


The family tree seems pretty clear to me, yes, Silverlight was a sideways jag, but it wasn't originally "just" for embedding in the browser, it was a cross-platform WPF subset. (In the family tree both WPF and Silverlight, sometimes codenamed WPF/E for Everywhere, split from different goals of the original Avalon project.)

I think you can tell that WinRT/Metro/UWP was/is meant to replace WPF. It used to be extremely limited, but A) had a bigger cross-platform reach that WPF (ARM is/was a big deal), so started with the cross-platform subset, B) was essentially "Win64" from scratch so had a lot of pieces to build.

Starting next month-ish UWP supports .NET Standard 2.0 and the hard work of the re-convergence of classic desktop .NET and cross-platform .NET APIs has happened (huzzah), and it will be a lot harder to argue that UWP is "extremely limited" compared to WPF because 70% of NuGet will just work.


You still don't have a clear path forward from WPF. I don't understand why they even needed UWP. Why not improve WPF?


I think .NET Standard 2.0 is about the clearest path you could get forward from WPF.

> I don't understand why they even needed UWP. Why not improve WPF?

The short story: 1) To first-class support more platforms/architectures (ARM). 2) To support C/C++ and other COM developers, bringing everyone COM [WinRT] [1] and Managed (.NET) to the same table. (Microsoft still has a lot of teams invested in C/C++; it shouldn't be a surprise that they couldn't just focus on .NET and leave C/C++ devs behind.)

The full story I think is pretty fascinating, but that's the executive summary.

[1] Crazy aside: the tech still sort of known as WinRT is closer to the original goal of .NET as a COM replacement than .NET became. It's also close enough to COM that I'm still surprised no one's admitted to building a UWP Delphi or VB6 app. (Not that I'd admit to doing so if I built such a beast.)


That's a very charitable explanation that I find hard to accept. I think it's more that MS .Net development is organized in way that it's easy to do new stuff but hard to maintain an effort long time. In other areas they are able to make progress without breaking everything all the time. C# has stayed backwards compatible while still moving forward quickly. SQL server doesn't release a new version every 2 years that breaks old stuff.

Somehow they seem to lack leadership.


Keep in mind that .NET Core is almost the same .NET runtime/framework (little-f) that powers UWP. It's been a huge hurdle across the board, web and desktop alike. I'm sure if the .NET team had had a magic wand to shrink the .NET Framework (cap-f) down to a smaller size and remove all the legacy Win32 code without breaking so much compatibility they would have.

It's easy to say in hindsight that they should have tried for something like what .NET Standard 2.0 is today earlier, but I, at least, can't blame them for attempting to try to clean house and remove terrible dev experiences like AppDomains and DataTable. Those APIs are terrible and should have died.


But again they have no upgrade path. They just produce something new and expect everyone to jump on board. My expectation is that UWP will last 2-3 years and then they will have something else that does the same but in a different way and UWP is in maintenance mode.


You may be confused. .NET Standard 2.0 support for UWP means the upgrade path is (finally) here today. Start a UWP project in VS 2017.4, make sure the project targets the Fall Creator's Update (the Windows 10 feature update to be released at the end of this month), and from that UWP app you can now add a reference to almost anything on NuGet you want. .NET Standard 2.0 support means that if it ran on the .NET Framework 4.x, it likely runs on UWP now (with rarer but obvious exceptions like using old WPF or WinForms libraries, some of which will still "work" as no-ops not actually doing anything).

Again, I'm not sure how much clearer of an upgrade path you could want? If you have a WPF app today, everything but the XAML will work in Fall Creators Update UWP. The XAML may even be trivial to convert to UWP XAML, they are related like family.


Wait so are you saying UWP apps can now access the machine they're running on in a sane manner (so, limited only by the privileges of the user who ran the app, without additional limitations enforced by the platform itself)?

Because that was the main limitation of Metro apps, you couldn't really do anything useful with them, you couldn't even access the hard drive normally or edit the windows registry. This is why you couldn't "upgrade". It wasn't an upgrade to any previous tech, it was a downgrade as the platform literally had less capabilities. It is, or at least was, basically a platform for making sandboxed mobile apps that you can run on the desktop...

This is why they clearly weren't (at least Metro, I haven't worked with UWP) an "upgrade" to anything. Silverlight wasn't an "upgrade" to WPF for the exact same reason. It was a more limited platform and you couldn't switch WPF apps over. So MS calling Silverlight or Metro a new version of WPF would have been retarded.


Things are still sandboxed, but the sandbox has grown a lot since early Windows 8 ("Metro" era). Depending on your definition of "sane", it seems rather "sane" to me to have at least some sandbox protection of the applications to run. Yes, Windows 8 felt like a straight-jacket more than a sandbox to some, but current UWP, especially with .NET Standard 2.0 support in the FCU, at least builds with most of the libraries even if some of them are essentially no-ops or (security) exceptions at runtime.

So, you still can't touch the registry by default, but why would you want to? There are much better places to store stuff.

The UWP is meant to be a replacement for Win32, so it shouldn't be a shock that a lot of Win32 components aren't available by default.

However, you can use the Desktop Bridge and request permission in your app manifest for more privileges, including things like registry access. The Desktop Bridge has a lot of examples out there on things you can do. You can use the Desktop Bridge to transition a WPF app slowly to UWP over time. For instance, you could launch UWP screens from your WPF app, allowing you to move piece-at-a-time if you wanted. There are even samples on how to migrate settings currently stored in the registry (ugh, why) over to Local AppData storage like a proper application, to transition away from Win32 bad practices. (Of course, the parts of the application that need the Desktop Bridge will only work on Windows with a Win32 subsystem.)


There was no migration story. Usually an API gets more features but in this case they took away a lot of critical stuff. A lot of us write applications that need the full power of the OS and not just a small arbitrarily chosen subset.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: