Hacker News new | ask | show | jobs
by flohofwoe 3563 days ago
So if I understand it right, this is basically running apps in a Win32-emulator/sandbox where all 'unsafe' Win32 file and registry accesses are redirected into sandboxed locations.

I wonder why MS didn't go this way from the beginning instead of pushing that Frankensteinian half-desktop/half-mobile monstrosity called WinRT^H^H^H UWP on us.

The UWP application model has been modelled after the (now 10 years old) iOS/Android app model, created in a time when mobile devices had a lot less memory and performance than notebooks. Win32 is a pretty bad desktop API, but UWP somehow managed to be even worse because it is an outdated mobile OS ported back into the traditional desktop environment, and everything that is not 'mobile' (mouse, keyboard, window management, ...) has been implemented as an afterthought. For games (which I guess are the main usage for old-school desktop computers now), UWP is an especially bad fit.

I'm all for increasing security by running applications in a sandbox with granular permissions. However I am against 'walled gardens' curated by platform owners, this closed-platform model kills innovation. Unfortunately these two different things got thrown into the same pot by Apple, Google, and now MS. UWP somehow manages to combine the worst aspects of a dead app shop, a dead mobile platform, and walled-garden power phantasies.

All of these problems aren't fixed with the Win32 sandbox though, I'm pretty sure this is just an emulation layer on top of UWP, so all UWP limitations would still apply.

5 comments

The introductory phrase of UWP explains why they pushed it: "A Universal Windows Platform (UWP) app can run on any Windows-based device, from your phone to your tablet or PC". The point was getting more applications for their mobile platform by coaxing developers who might have otherwise built a desktop-only application. I'd say this new development is essentially an admission of defeat on mobile.
The problem is that it may take their desktop with it. The industry doesn't want to invest in a desktop windows app because there is no clear direction. WPF/Win32 etc seem to be getting deprecated, but UWP is too limited.
People who actually make money on windows development know that WPF and Win32 are not deprecated.

In fact, they don't really deprecate things. They may stop pushing something as the new hotness...but VB6 apps still run on windows. Those data access technologies that no one uses anymore...those still work on windows. If you are worried about your investment in time not being the new hotness, well that's one thing. If you are worried about your investment in effort being abandoned...they have done more to support backwards compatibility that I think is even reasonable.

Silverlight may be the one glaring exception to that rule that I can think of. I don't think even IE or Edge support that anymore, which makes it dead.

I had an ex-girlfriend whose employer made a big bet on Silverlight for their web app platform... in 2012. Having to rewrite it all in HTML5 and JS a year later almost put them under.

Actually, this is really weird, but yeah, you can still use Silverlight. Until very recently the inTune portal still used Silverlight.

I dig what you are saying though. They had some very confused messaging about the web as a platform for a long time. They finally stopped the BS, though, and have gone whole hog on the web.

Couldn't they have ported to WPF with a lot less effort?
Possibly, but this was, if I recall correctly, sort of a web-based MOOC thingy, so being browser-based was important.
Silverlight was cross-platform.
I'm not worried about it dissapearing, I'm worried the modern teh stack will change (it has). Then you start to either lose talent or rebuild the app.
Do what now? Does that mean that I can't build apps in C++ anymore? Because it looks like I can and it also looks like I have more options than I ever have. In fact, I can finally use standard ISO c++ to do more than ever. Do you just mean one UI toolkit over another?

I wonder how Adobe has "kept talent" without rebuilding photoshop?

If you are worried about keeping your personal skills up to date and focused on an area that will earn you personally a living then you should know that some of the most highly paid people I've met in technology code for some of the most niche platforms. I mean serious f*ck off money. Say it with me...AS400. (Or ISeries or whatever the hell it's called now.)

"I wonder how Adobe has "kept talent" without rebuilding photoshop?"

By grabbing their users by the sack and demanding cash they don't deserve under threat of denying access to ones entire body of work.

They kind of did rebuild photoshop. And Acrobat. And pretty much every one of their products after the Creative Cloud move.
UWP is limited as it is relatively new. The new (capabilities based) security model is clearly better than the old "if you are admin, you can do whatever you want" model. The old model was inadequate even at the start of the multimedia age, but it was not recognized until recently. The new sandboxed operation creates more portable and reproduceably operating apps.

The limitations will show, as more and more usecases will be attempted, and surely many will be addressed.

Personally I hope once the global filesystem concept will be gone, and apps will use isolated or shared storages where shared storage will get explicit access rights for each app/user it is shared with.

The old system had defaults originating from the single user non-multimedia usecases left over as a legacy, but currently we have so many things going on our computers, that privacy/security needs a rethinking of old concepts to cope with new challenges.

Personally I hope once the global filesystem concept will be gone, and apps will use isolated or shared storages where shared storage will get explicit access rights for each app/user it is shared with

I very much hope not, since default and easy global sharing is what makes desktop OSs so very useful, and a lot of this sharing is spontaneous, creative, and ad-hoc. Besides, we already have things like filesystem permissions. By all means have a sandbox for "the untrusteds", but I don't want the equivalent of being forced into the "everything which is not explicitly allowed is forbidden" bureaucracy.

Filesystem permissions cannot be controlled on a per app level. I do not like the fact, that an installation of for example a game needs admin rights, and has every chance to access data it should not be able to do.

I see your point, that the current solution offers a simple (and vulnurable solution). This is why I have said that these challenges need to be addressed. The current solutions may not be the best, but for an evolution to start we need to make changes, and try different approaches.

Filesystem permissions cannot be controlled on a per app level.

I thought that's how Android's filesystem permission works? Each app runs as its own "user", and the FS permission bits restrict what it can access. This is a common solution in the Unix world. The problem on Android is that the filesystem is relatively hidden, and there's no easy way to change those permissions to allow more or less access.

Perhaps having the user as "root", along with all the actually-trusted apps (including those from the OS), and everything else setuid to their own per-app users, would be a useful configuration. Everything that's fully trusted is free to interact, while isolating those which aren't.

I do not like the fact, that an installation of for example a game needs admin rights, and has every chance to access data it should not be able to do.

That's possibly because of a need to install kernel-mode components (might be DRM related). If you're truly paranoid, VMs would be a better choice for isolation. But fundamentally, I don't believe in installing/using/changing apps that I don't completely trust, so perhaps this is a less of a problem for me and I'd rather have everything be "open".

> Filesystem permissions cannot be controlled on a per app level

They can if you adopt a user per app model. I thought this is what android/UWP did under the hood.

> I do not like the fact, that an installation of for example a game needs admin rights, and has every chance to access data it should not be able to do.

I doesn't. The biggest cause of this is the default of requiring admin to access program files, even if it's only touching it's own new folder.

Installing off steam happens without admin rights, apart from the VC++ redistributable (why is that a thing?).

WinRT means:

* No app closure callbacks. You don't know if it's suspending or exiting.

* No "are you sure you want to exit? Save/Don't save" dialogs. If you close or crash pray your data was saved, and if it takes a long time to flush to disk...really pray.

* No minimizing/backgrounding to tray icons allowed.

* I guess You can create a background worker handling persistence, which runs until completion even if the UI has been closed. (I have not used UWP yet)

* IMHO save/don't save dialogs are an usability antipattern.

* Tray icons are also something of a remedy of the past. They are now replaced by background operations and live tiles. I can see why those can be problems, I can imagine the usecases you would solve using those tools, but the new app model is build around a slightly different workflow.

But if you do not like the way to solve it as it is intended in the new app model, the solution is: report it/upvote it. If you tell your problems here, then some members of HN community will know it and understand it, but it is unlikely that it will be acted upon by Microsoft. For that you need to have your voice heard on their forums. (eg. feedback app, uservoice...)

> No "are you sure you want to exit? Save/Don't save" dialogs. If you close or crash pray your data was saved, and if it takes a long time to flush to disk...really pray.

Of course not, because it's supposed to also work on mobile. Does your iPad let applications prevent you from going back to the home screen?

> Of course not, because it's supposed to also work on mobile. Does your iPad let applications prevent you from going back to the home screen?

You don't see the problem here? Why do I want the restrictions of mobile phones limiting my desktop applications?

There is a Suspending callback.

Sounds like you have some misconceptions about the UWP/WinRT application lifecycle:

https://msdn.microsoft.com/en-us/windows/uwp/launch-resume/a...

If I recall correctly, this callback has some undocumented deadline. Go over that and it's unceremoniously killed, great way to corrupt whatever you're desperately trying to write to disk.
I really disagree with UWP being a better model than limited UAC. Apps being able to talk to each other and the filesystem and interacting is what makes them useful. The linux/sudo approach is the best comrpomise between security and utility I'm yet to come across.

> The old system had defaults originating from the single user non-multimedia usecases left over as a legacy, but currently we have so many things going on our computers, that privacy/security needs a rethinking of old concepts to cope with new challenges.

I android has proven anything it's that sandboxed applications don't solve this problem.

Generally the way I've seen sudo implemented in all desktop linuxes is that after providing a password the process gets all access.

This to me isn't a great trade off as it relies on the user invoking the process understanding the security risks they're taking, which is a tricky one.

Sure you can do more with sudo, but unless it's the default, most people won't

There's room for improvemnt, it's just the best trade off I've seen. Windows has it's "click yes to continue" buttons, android has it's permissions thing that is useless to everyone. At least making people pause and type a password might make them think about what they're doing a bit.
The global filesystem is only a problem if you run lots of closed source/untrustworthy apps. Many of us don't and use the global filesystem very heavily and very much hope it does not go away.
Except for the vast majority of people are not IT experts. The store model is probably vastly safer for the average user.
An average user is a myth. Every kind of average user has its own traits and they differ widely.

That's why there is such thing as system settings.

And yes, most desktop users are conscious when they work with files. Windows by default suggests "My Documents" folder as a target destination which is a pretty sane safe choice for all traits of average Joes.

Honestly I think not having a global filesystem makes things harder for the "average user." Most college students aren't going to only keep their word documents in word for example, they need to email them and upload them to tools like blackboard.
Unless you or someone you trust has audited an application, all apps are untrusted and should be given least privileges (e.g. the mobile/UWP model).

Personally I'd suggest that the trade off is whether the risks of global filesystems are worth it in productivity benefits.

For standard users (non IT-professionals) I think they are not and for IT professionals, in most cases, I think they are.

I guess you also only then need a firewall, if you use closed source software. When using OpenSource software you can always be sure that nothing will do unauthorized access to your network, willingly or accidentally...
That's a bit naive... Just two examples

OpenSSL has had 22 vulnerabilities in 2016 so far [1]

Linux has has 336 vulnerabilities in 2016 so far [2]

[1] https://web.nvd.nist.gov/view/vuln/statistics-results?adv_se...

[2] https://web.nvd.nist.gov/view/vuln/statistics-results?adv_se...

Average users don't ever know where they are supposed to save their files.

Every time I visit family I get to sort out the files scattered around the hard disk.

Every time I call my mum I have to call my dads mobile first because she can't remember to press the button to hang up. Ther's only so much simplyfying you can do.

Funilly enough, in her 70's now she's taught herself to use a computer and can manage documents in the file system.

I think it's the same tier as global variables: an anti-pattern.
Desktop Windows is clearly the technology of the past, and I say that as someone who develops on it every day.

People starting in a green field will build a web or a mobile app if at all possible. The cases where it isn't are basically games and what used to be called "workstation" apps: big chunky tools like SolidWorks.

Even Adobe have retreated to the cloud, although the tools still run locally.

It is not in the least. There are millions of gamers, creative professionals, developers, engineers, etc.. that use desktop applications on Windows every single day and that will not change any time soon.
And then you have Microsoft, trying their hardest to replace that desktop with a mobile OS.
I agree with the sentiment but I think Win32 is with us forever (and because WinForms is just a wrapper on top of that that's probably safe too).
When they did it everything was still to play for on mobile, in their eyes at least.

If it had worked it would have been a smart move, but it was wildly over-optimistic.

My understanding is that the 'Universal Windows Platform' is comprised of disparate multiple non-universal platforms such as desktops, mobile devices, servers, clouds, and IOT things. In practice this means that a UWP application targets one or more platforms and not all of them, e.g. Microsoft's UWP Camera app doesn't target the Azure or Server platforms.

My take is that Microsoft is in mobile for the long term and that its strategy has been to gradually migrate the target uses first addressed with Windows CE into the mainline of Windows and that Windows 10 is the realization of that strategy...we're back running Excel on mobile devices.

Windows Phone 7 was the first step in that direction. Windows Phone 8 and Windows RT were intermediate steps toward hardware agnosticism and away from Wintel strategies. I call it an intermediate step because apps for those platforms were [at least largely] forward compatible to Windows 10 and Windows 10 Mobile.

> manages to combine the worst aspects of a dead app shop, a dead mobile platform, and walled-garden power phantasies

Let's just take a moment to remember Games For Windows Live here.

> old-school desktop computers

I'm very sad about how accurate this generalization is.

It wasn't meant in a negative way :) High-power gaming rigs will always require big and expensive cooling solutions.
Wow.

UWP isn't a mobile OS ported to Windows. The whole WinRT is an OS and WinRT is an API set confused things. Forget that there was an ARM tablet. WinRT means the Windows Run Time. It's a set of API's that are built with the Windows OS. The "they made it mobile" part was really a side effect of trying to move to a more managed execution model where the OS took a more aggressive approach to managing the execution of an app over it's lifetime.

That has certainly needed improvement since it has been released. The WinRT API set was and is limited to a set of API's that are governed by a security broker. Applications are intended to have an identity, that is a SID, and execute in a very tight sandbox ala Chrome or Edge. It's a good model that makes some of the traditional malware vectors very hard to exploit. (You can't call LoadLibrary, for instance.)

OK. Set that aside for a moment. The desktop bridge uses technology called App-V that has been available to enterprise customers for a long time. It lets you run an installer and it watches all of the things it does to a clean system. It then bundles all of those things into a single file. It provides shims to your code that, for instance, will intercept your attempt to write to a global part of the registry and directs it to a registry hive kept in the file.

What they did in the anniversary edition was include parts of AppV in Win10, and they built a set of technologies that help with the process of "sequencing" a Win32/.Net app. Your application still runs just like it used to. There is no emulation. If you want to use API's that are available in UWP you need to follow some guidance on adopting them. Some are less invasive than others. Its a tradeoff, but it's one that you get to control as a dev and you can share a bulk of your code between Win7 and Win10 builds that use the strengths of both platforms.

So, its a sandbox, but not an emulator. The AppX installation method is more like the ".app" model in desktop OS X where you have a bundle of things for your app. There are also new security model things that you can adopt over time to gain access to new functionality.

You DO NOT have to install AppX packages from the store. You can download them from the Web and double click on them or use powershell to install them. The store is separate from the app packaging tech and API set.

Your comment reads like someone who doesn't use Windows enjoying some schadenfreude at the trouble they have had over the last couple of years. You're going to need to get over that. They are getting their shit together in a big way. Yes their mobile platform failed. They have admitted that and moved on. They produce a lot of software for Android and IOS. You can develop native Linux software with Visual Studio now. They contribute to Linux, Mesos, and Docker. .Net is open source. They contribute to FeeBSD. What more do you want? No one is making you use their stuff. You have never had more options. Why do you feel like that for you to be doing better other people have to be doing worse?

I'm using Windows (and OSX, and Linux) everyday and recently started (but didn't finish because of UWP's weirdness) porting my 3D coding framework over to UWP. The same framework is also running on Win32, OSX, Linux (incl RaspPI), iOS, Android, HTML5 and PNaCl, so I do have some multi-platform experience. Of these platforms, and with the exception of Android NDK, UWP is the most painful to port to (if you're interested in the details: http://floooh.github.io/2016/08/20/uwp.html).

I want Windows to remain the dominant gaming platform. But for this, UWP is completely heading into the wrong direction.

How does a conversion of one of your Win32 exes run with the new system?

Can do a manual convert (https://msdn.microsoft.com/en-us/windows/uwp/porting/desktop...) or use the tool to create the appx then double click to install, I believe...

I'll try that as soon as I'm back on my Win10 laptop. If this works well it will be highly preferable over an UWP port, because too many compromises have to be made to run games on top of UWP.

What I'd actually like to see is a new application model and set of APIs 100% focuses on games, in the original spirit of DirectX. The required API footprint for games is minimal and should be easy to sandbox.

None of the existing desktop or mobile operating systems are particularly well suited for games, writing window system glue code and input event handling is terrible everywhere outside of the game console world.

Only Microsoft cared about that in the early days of DirectX and before it's gaming focus shifted to the Xbox and Xbox360. We need a new DirectX initiative which fixes the flaws of UWP for games. We don't need one generic solution which is supposed to work for all application types, we need a couple of highly specialised APIs and specialised application models. As Windows8 has shown, one-size-fits-all doesn't work.

I think that's the direction things are heading. If you look at the compositor API's they are trying to make the whole XAML layer easier to interop with DX because DX is where the perf and flexibility are.
Right, a big push to the XAML stack with the Anniversary Update was a lot of beefy pushes to what's called the "Visual Layer" [1]. A lot of the focus seems to be on making sure that you use high level XAML components and low level DirectX code side-by-side in the same windows.

[1] https://msdn.microsoft.com/en-us/windows/uwp/graphics/visual...

Then this announcement is really for you because you can now use the code unmodified.
> schadenfreude

They've built up an enourmous reserve of ill-will that will take years to diminish. It wasn't all that many years ago that they were tangentially involved in SCO's last-ditch attempt to destroy Linux. The Win10 telemetry and forced-updates controversies are ongoing.

Everyone can see a possible future in which all the doors for shipping software to users' computers without paying 30% to the platform holder and submitting to their arbitary rules are closed. (The justification will be malware, of course). That day has not yet come, and it's not necessarily implied by WinRT, but it's a step in that direction.

It actually was a long time ago that they were "tangentially involved in SCO". That was a very long time ago. My children were babies when that happened. THEY ARE IN COLLEGE NOW.

BTW. That was mainly IBM and Novell that you want to be mad at. Microsoft made a licensing deal with SCO to license Unix. Wow. You really have to reach back on that one. You could have more reasonably chosen how they treated Netscape.

No one ever seems to mention that they invested in Apple at a time when that investment KEPT APPLE ALIVE. But what ever.

The telemetry. It bother you. It doesn't bother me.

The "Get Windows 10" app that people were complaining about? Fair play. That was crap.

I don't know what to say about the last statement. Ask anyone in computer security and they will say, yes it would be great if walled gardens weren't the best idea for getting trustworthy software onto customer systems, but right now it is. They all think that Android is worse than IOS. Platforms that are used by a billion people where you can do anything you want produce malware. There isn't a way around that right now.

Solve that one and you too can be a billionaire.

My feeling is that the "ill will" is more emotional than it is reasonable. I know lots of admins who made up their mind about Windows in the Windows 2000 and 2003 era. It's vastly different in 2016 and far better. It's hardly recognizable.

EDIT: OK OK. Babies may have been hyperbole. Toddlers. They were toddlers.

(Someone has downvoted you, wasn't me)

In re malware and walled gardens, I certainly don't have a solution, but I've been writing a chart of the extent of the problem: https://github.com/pjc50/pjc50.github.io/blob/master/pentagr...

2004-2012 I built apps of significant size/$$ for clients employing poorly recommended microsoft tech including silverlight, infopath, webforms, datasets, windows phone 7 and 8, WCF. Hindisght is 2020 and shame partially on me but when you try to be sensible and follow the official recommendations you develop this instinctive flinch over time that happens when microsoft comes out with re-inventions that converts your codebase into legacy overnight.

Yes youre right the 'new' microsoft under nadella is much more accommodating, however I was forced into a place where I couldnt afford the problems the 'old' microsoft bought and it was more logical to adopt open standards. Since I switched to open platforms microsoft has really improved but pardon me if I stick with my open tool stack for the foreseeable future until i see any compelling reason to switch back. In other words, microsoft is now 'as good' as many open platforms, but there isnt really a compelling reason to switch back.

It's funny you mention InfoPath. I know of at least two multi-billion dollar companies that have significant amounts of development time tied up in InfoPath. All of its still running, with the plan being to replace it over time.

Still just sitting there running.

No need for pardon's. Use what you like that gets the work done. My instinctive flinch is different. We all have them. That's the thing, I don't want you to switch. I don't care. I love open source software. What I am saying is that they have a lot of effort built into backwards compatibility. And those solutions may not be the latest hotness, but you can still run them.

>What more do you want?

Them to open source and GPL all their software.

MIT isn't good enough? Because they did use MIT.

I want Stallman to give more care to the defense industrial base that produces computers than to making sure that the same defense industrial base has a free f*cking compiler to use on the computers it makes.

>MIT isn't good enough? Because they did use MIT.

Windows is MIT licensed now?

System Center is MIT Licensed?

Visual Studio is MIT Licensed? (not core, core is not Visual Studio, it Github's Atom editor with a MS skin)

I believe I said ALL software not just some side projects

It's Visual Studio Code...not core. And it's not a skin it's an actively developed fork of Atom.

no windows is not MIT. nor is system center. PowerShell is. PowerShell DSC is. Their OMI broker for Linux is. .Net is. Asp.net is. Their Python tools are. The C# language is developed on video streams with the product team and the community. F# has been open source for a long time. They contribute to Linux, Mesos, docker, Hadoop, and other projects.

I wish that my side projects were as widely used as the C# compiler.

Why don't you just admit that there really isn't anything that they could do. If they did open source Windows you would read some comments written by other people about the code and "pronounce" it the worst code ever written. I can safely say that because here's the thing...YOU'VE ALREADY WON and it's still not enough. Open Source won. They were forced by the sheer awesomeness of it and the energy that people like you brought to open source development to adopt it and push it where ever they possibly can. TAKE YES FOR AN ANSWER. Is Windows OSS yet? Not yet, but that is coming. And when it happens you will still have something negative to say about it because this isn't about anything other than your emotional ties to this Microsoft in your mind that has been your favorite boogeyman for years. Guess what? There are actual boogeymen in the world, but focusing on a software vendor keeps you from having to face that. Every computer you buy validates and enforces the defense industrial base of the west. You capitalist infidel, you. All electronics, really, but computers in particular.

You want Visual Studio to be GPL'd? I want to stop flooding the third world with cheap weapons. They need water, not a text editor. Linux doesn't make them more free and Windows doesn't make you less free. It's a stupid privileged argument. Play with your toys and try to be nice, but don't tell me that your toys are more "right" than mine. That's just fucking stupid.

I have had entirely too much coffee, and it's probably time for a new HN account anyway. Cheers.

> It's Visual Studio Code...not core. And it's not a skin it's an actively developed fork of Atom.

It's not a fork of Atom. It's independently developed text editor/light IDE which runs on Electron, chromium toolkit created by Atom devs to ease creation of desktop applications using JavaScript and HTML.

"Win32 is a pretty bad desktop API" What's a better desktop API, and why?
I'm not saying there's a better desktop API, just that Win32 is 'pretty bad' (IMHO). It's a collection of many small annoyances that have been stacked on top of each other over the decades. My favourite mis-feature is probably everything around UNICODE, such as hiding the xxxA() and xxxU() function names under global preprocessor defines, which in turn renames all your own functions which happen to have the same name. It's many little things like that. It's not that the OSX or Linux window system APIs are any better though.

IMHO a modern OS should only come with a low-level window-compositor which just composes canvases, and leaves rendering (including UI) to the user code through a thin 3D API. Other than that: file system, sockets, input, audio, and a very simple main-loop application model, all as C APIs which don't try to be object-oriented, leave all the different language bindings to the user-side.

> It's a collection of many small annoyances that have been stacked on top of each other over the decades.

You are describing X11?

KDE/Qt, GTK/gnome.