17 ms·
Windows 10 Hosted App Model
- grawprog 7y agoMaybe I'm getting this wrong, or over simplifying things here but my understanding is this means windows now has an overly complicated '#!'?
- vbezhenar 7y ago'#!' is implemented by associating file extension with some specific application. For example you can associate '.py' files with 'python.exe' and when you double-click on 'app.py', it'll be launched using python. So it definitely not this thing. I, personally, didn't understand what this article is about and why would I use this mechanism when simpler one exists and works for decades.
- tasogare 7y agoSecurity: those apps are sandboxed and also cleaner to de/install. Otherwise it’s mostly MS trying hard to make its store relevant.
- sveiss 7y agoIt's closer to a macOS bundle than a single script with '#!'. It's at a higher level of abstraction than linking a single script file to an executable. It would let you build, say, a Ruby interpreter which declares itself as a host, and then package a Ruby application that makes use of the interpreter, including its libraries, native code extensions, and all the related assets. The Ruby application would behave like a native application, with its own identity in the Start Menu/Task Manager and its own sandbox/entitlements. The Ruby interpreter and the packaged applications would appear separately in the uninstaller list in Settings, and presumably could be distributed via the Microsoft Store walled garden. The whole 'Windows app model' concept is about bringing something close to the "one icon = one app" experience from mobile to Windows, instead of depending on heuristics or uninstallers to figure out which set of files/processes are part of a single "app" from the user's point of view. This is an extension to that model.
- zozbot234 7y ago> The Ruby application would behave like a native application, with its own identity in the Start Menu/Task Manager You've always been able to achieve this by changing settings/properties on a .LNK file - or a .PIF file for MS-DOS based applications, as far back as Windows 3.x. (With the 'canonical' .LNK file for an app being precisely the one that's linked in the user- or system-wide Start menu). This stuff has worked just fine for the last 25+ years. Sandboxing is of course new, but MS-DOS applications linked in .PIF files used the same strategy to define sandbox-like properties, and .LNK properties could be extended for the same purpose.
- sveiss 7y agoA LNK/PIF doesn't give a coherent view of the whole "app" from the user's point of view, though. If you delete the LNK, you don't uninstall the app -- you just can't access it easily any more. If you create a second shortcut to the app, then uninstall the app, the second shortcut lingers but doesn't work. If you install an app, it might put two or three shortcuts onto the start menu -- lets say it's a video game, and it installs a shortcut for the game itself, and another for a settings tool. (If it's an old game, it'll probably install a shortcut for the uninstaller, too). Which of those shortcuts should the start menu highlight as the newly installed app, to help the user discover it? You can make the argument that an abstraction based on files, paths, individual executables and command line arguments (which is what LNK/PIFs support) is superior, and I think a lot of people on HN would agree -- but it's not the abstraction that new computer users being trained on mobile devices are internalizing.
- ChrisSD 7y agoIt should also be emphasized how game changing proper packing is in itself. Historically Windows scripts, installers, applications, etc could liberally spray the filesystem and registry with their content. Cleaning this up was rarely easy as it relies on each script (or uninstaller, etc) to do the job right. Proper packing gives more control to the user in this regard. Changes to the filesystem or registry will (by default) be contained. It's worthwhile to make this type of packaging easier and better integrated.
- GoToRO 7y agoVery nice but they should unify things a little on Windows. There are so many types of apps and it's not clear when you should use which. For example, Windows Store apps can not snapshot the screen...
- georgyo 7y agoThis sounds like a feature, at least as a user. Sandboxing that is fantastic. I wonder if they also block the app from reaching into the copy/paste buffer. If they successfully sandboxed to that level, that is basically mobile device level of app severity. Fantastic!
- badsectoracula 7y agoUnless you are a user who wants to snapshot the screen or copy/paste between different applications :-P. (though i guess you were sarcastic :-P)
- BlueDingo 7y agoThe app being able to snap the screen is different than the user.
- TeMPOraL 7y agoAnd yet, the way we try to control it for the former is by denying it to the latter.
- badsectoracula 7y agoSure, you can always pull out your camera and take a photo of your monitor, but usually what you want is to use a program to grab a screenshot - so that program is what needs to be able to take the screenshot in behalf of the user.
- j0057 7y agoYou don't need an app for taking a screenshot. Windows used to include the Snipping Tool I think since Windows 8, and nowadays in Windows 10 it's just functionality baked into the OS: press Shift+Win+S to access it.
- qzw 7y agoThe most interesting part to me: > We are working with the new Microsoft Edge browser to take advantage of the Hosted App Model for Progressive Web Apps (PWAs) – converting the web app manifest into an app manifest, package the additional web content into an MSIX package and register it. In this model, a PWA is its own independent app registered to the system even though it is being hosted by Edge. Can a shared, system-wide Electron runtime be far behind?
- eightysixfour 7y ago> Can a shared, system-wide Electron runtime be far behind? This is exactly what I was thinking about.
- catblast 7y agoMaybe whoosh...but.. Congratulations you’ve invented a web browser.
- drannex 7y agoThis was a major feature in IE9-11, that you could run basically a UI-less modifiable web application without noticing* that it's running on an embedded browser. Electron is a similar ideal, but not on the OS level. They are just recreating the best aspects of IE for Chromium, and we will be better for it. * noticeable for that era
- basch 7y agoThats probably why they switched Edge to chromium. Instead of each electron app running its own copy of node and chrome, those components can be build into the os, which is much better for battery life. Even their flagship app, teams, is running its own copy at the moment.
- kevin_thibedeau 7y agoThey got in trouble for embedding IE4 into Windows and supposedly eliminating user "choice". Now nobody will care if they do it again.
- judah 7y agoMy big takeaway from this is that Progressive Web Apps (PWAs) will become more like first-class apps on Windows. Installing a PWA on Windows will make it show up as its own process in Task Manager, listed in start menu and taskbar, listed as its own entry in Add/Remove programs, etc. This is made possible in part by this Hosted App Model.
- ComputerGuru 7y agoAbsolutely. With frontend logic powered by C#/.NET courtesy of Blazor.
- mycall 7y agoAre you suggesting XAML/C# to WebAssembly/PWA to Desktop app? Why not just XAML/C#/Desktop App?
- ComputerGuru 7y agoNot suggesting using it myself, merely saying this is where Microsoft is going with it. They don’t have a cross-platform XAML render. They’re trying to abstract away the OS in .NET Core, and XAML no longer fits the bill.
- pjmlp 7y agoSure it does, Xamarin alongside React Native and PWAs are the official SDKs for Surface Duo. Also WinUI, is the only Windows UI toolkit that is actually being developed, instead of getting only bug fixes like the other ones.
- ComputerGuru 7y agoXamarin is mobile and macOS only.
- pjmlp 7y ago
- badsectoracula 7y agoSo, i'm not sure why this is needed... is it a workaround for some limitation with MSIX? Is it only for windows store/UWP/whatever-it-is-called-nowadays apps? Or it is usable by a regular Win32 desktop .exe (so, can i for example use it via Lazarus/Free Pascal by loading some API from a DLL?) and if so in what scenario? From the description it sounds like this is for something like, e.g., some Java application appearing as something else than javaw.exe in task manager. Let's say i'm making some sort of scripting language (which sounds like what is being described there) that is distributed from my web site as an installer made with -e.g.- InnoSetup or NSIS that registers .mylang to be launched with mylangparser.exe (or whatever)... how am i supposed to use this (especially if the parser isn't written in C or C++ but in Free Pascal or D or Rust or any other language that isn't C or C++ but still has the ability to call C calls via DLLs) and for what reason? Or am i not supposed to use this?
- pjmlp 7y agoIn the future all Windows applications will be sandboxed, MSIX was the first step merging UWP and Win32 worlds after the failed experiments with Project Centipede, Android and Cocoa integration into Windows 8.x. The upcoming Windows 10X, uses sandboxing for everything, including Win32. https://www.youtube.com/playlist?list=PLWZJrkeLOrbZ3CMHpbglE4NyJSEo-_qhr https://www.youtube.com/playlist?list=PLWZJrkeLOrbZ3CMHpbglE... This is intended for languages that require some kind of interpreter to run, and to have OS integration out of the box as if they were "native" apps on Windows.
- badsectoracula 7y agoThat doesn't really answer any question i made though. Is it something specifically about Windows 10X and MSIX limitations? How would i use it? Etc (i do not want to repeat my questions, i'd just copy/pasting them :-P).
- contextfree 7y agoIt's a fix for a limitation of the Windows app model, i.e. to the OS's knowledge of which executables, processes, files, etc. logically belong to which apps. MSIX is how you register an app with the OS so in that sense it's about "MSIX limitations" but apps/runtimes not installed with MSIX still have the same problem. The OS knowing what's logically the same app vs. separate apps is a prerequisite for 10X and sandboxed apps, but there are other features usable by non-sandboxed apps that depend on it too.
- GordonS 7y agoHmm, others are pointing towards PWAs, but to me this looks more like a way to "install" scripts (python, ruby, PHP, powershell etc). I guess this is trying to open the Windows Store to more devs, giving them an option other than UWP - which is certainly a laudable notion. But I really wish the article was clearer about what the end goal is. This actually sounds pretty cool... but I'm not sure who it's aimed at; scripts are typically for command line tools, not GUIs. And for those au fait with the command line, I'm not sure what the benefit is, beyond signing the package (which, technically, could already be done if you packaged your script in an MSI/MSIX installer).
- pjmlp 7y agoWindows store is already more than UWP, nowadays Win32 is also part of the store and after Windows 10X the models will be even more so.
- int_19h 7y agoThere are plenty of GUI apps written in Python running on Linux using PyGtk or PySide. There's no reason why there couldn't be Python apps running on WinRT, especially since it can be projected very nicely onto Python.
- ChuckMcM 7y agoLooks like python becomes a first class citizen to Windows. Sadly I was just complaining about how "apps" these days weren't apps (especially on Linux) they were directed-acyclic-graphs of dependencies with an execution conductor at the top. This can work fine except when two of these things want a different version of a dependency n layers deep. This is especially a problem when those dependencies are managed/maintained by volunteer labor that may or may not see the wisdom of compatibility rules across minor revisions. I know that the alternative is having the OS controlling entity be a gatekeeper over "blessed" and "not blessed" dependency layers, which bites because they can never keep up. Still the pain of having things break so badly that an entirely new meta-layer called "containers" was invented in part to partition these 'App-DAGs' in a space where they don't conflict with others. That doesn't feel like progress to me somehow.
- nine_k 7y agoA Linux app as a DAG of dependecies, sometimes hard to reconcile? Welcome to 25+ years ago, when dynamic linking and .lib.so stuff became the norm on Linux. That is, basically as long as Linux existed. Monolithic static apps and stuff like Snap are relatively modern.
- ChuckMcM 7y agoYeah, I know, and I've certainly got blood on my hands here as I helped to implement dynamic linking in SunOS 4.0. That said, there is a qualitative difference between an app as DAG where said DAG is restricted to only those nodes that are present on a given "release" which describes the entire graph, and an App which is a DAG on a set of subgraphs, each with their own notion of 'currency' and overlapping nodes with other subgraphs.
- vxNsr 7y agoIs this formalizing a way for any app to implement a scripting engine?
- jacobush 7y agoNeat! Now we can have the seamless .NET experience for other languages too! .NET core, 4.x what is desktop only etc etc. It will be of course extra simple when combined with pyenv, virtualenv and node. Seriously though, I can see one possible benefit - whatever Microsoft pushes as a version of the runtime, may be what developers expect and use. Or maybe not, since you can depend on a "host" app you yourself publish (right?) which is your preferred Python version or whatever.
- neves 7y agoArgh! I am reluctant to install any software in my Windows machine, be it a Pdf reader or a camera driver, because all of them install "services" to auto update their software. I have an old notebook that could be perfectly usable but crawls to a halt due to all installed software. Now everything will have their associate always running service.
- freehunter 7y agoIMO that's mostly the fault of Windows not having a real package manager for so long. There's no way for software to know that it needs an update unless it runs a background service to constantly check. So either your users constantly run outdated software (which is one of the reasons companies love offering their product as SaaS) or the users have to check manually (which users won't do). Some software checks when you run, but a lot of times I just need to open Excel and get to work, so I'm going to click "Skip this version" and keep going. Honestly I don't see really any good way to handle it without some background service. It's just nicer when the OS has a way to handle it built in.
- ksk 7y ago> There's no way for software to know that it needs an update unless it runs a background service to constantly check. That is required only if you need to update the app when you are not using it. Apps can check for updates when you run them and then let you decide when to install the update/or skip it/etc. Package manager would be good, but not possible on Windows given the amount of commercial software. Companies are not going to seed control to the Microsoft when they can potentially up-sell you via their b/g update services or do other kinds of advertising. I doubt MS would want to play rough with their partners either.
- neves 7y agoSurely they can, but tell it to Adobe, Apple, Oracle (Java), Google (Chrome), Razer,
- 7y ago
- eyegor 7y agoSo as best I understand it, this has 1 niche advantage over typical exe/msi/uwp. It makes it more straightforward to create a generic application, which could then easily be "branded" by customers and then resold as their own app. So in essence you become an oem app developer, and then affiliates make apps based on your product. So instead of distributing a raw api, you can distribute an app in a box. And then it also allows the affiliate app to identify as your own for api calls, but I'm not sure when that is actually useful. I'm scratching my head trying to come up with a use case that doesn't feel so contrived, can anyone think of one?
- erik_seaberg 7y agoHuh, today I learned you can convert a UUID to decimal and prepend {joint-iso-itu-t(2) uuid(25)} to get a really big OID.
- animalnewbie 7y agoPlease do something like this for Edge Linux too! (once it arrives)
- SiDevesh 7y agoThis sounds like (for now) the first step towards something like shared runtime for electron apps, would greatly solve the perf issues associated with electron. I built https://github.com/SiDevesh/Quark-Carlo https://github.com/SiDevesh/Quark-Carlo a while ago to convert web apps to native apps using the installed chrome browser as a runtime, using the carlo project by google, google killed it pretty soon though. This way apps would only have to package their own node runtime (since a lot of electron apps use native modules or modified version of nodejs) and use chromium from the system. The above project by me does the same thing and the size and memory requirement is greatly reduced, (apps come at average of 40mb as compared to 120mb for electron apps).
- bitwize 7y agoSo, it's #! for Windows, except complicated because Windows.
- stinos 7y agoRead sveiss' comments above for a good explanation of what it is/does.
- T3RMINATED 7y agoXAML just has to die.
- Meph504 7y agoThis feels to me, like the next best vector to compromise users. The horror of HTA aren't forgotten, I'm hoping they handle this better.
- wilt 7y agoSeems like another attempt at beating a dead horse to me. Ms need to give up on the whole app store thing and start creating a decent desktop experience again. If they decoupled the app virtualisation from the app store and made it less locked down it would actually be useful.
- contextfree 7y agoThis isn't dependent on Store at all. App virtualization has been decoupled from the store for some time now.