4 ms·
I think this is perfectly relevant criticism. Browsers are a huge amount of overhead to add to a cross platform toolkit, for virtually no benefit. Distributing
by ori_b 9y ago
I think this is perfectly relevant criticism. Browsers are a huge amount of overhead to add to a cross platform toolkit, for virtually no benefit. Distributing full fledged programs like this via browsers is simply going to be a shit user experience, on top of the already terrible user experience that browsers give.
- krapp 9y agoWebassembly isn't designed or intended to run exclusively in the browser, though. A lot of people seem to assume that native webassembly apps would be packaged with Electron but I think that when the language matures a bit, it should be possible to get thinner native VMs without the unnecessary bulk of a browser.
- littlestymaar 9y agoWhy would you package it in Electron? AFAIK, webassembly is mainly intended to be run on the web, in the browser. The main goal being you don't need to install anything. Building a native app to wasm to package it into Electron sounds really weird to me. OK there's a security benefit thanks to sandboxing, but using Electron as a sandbox is really a strange idea. And when it comes to portability, if you build you native app to webassembly, it can run anywhere. But if you add Electron to the mix, you need to build a different version for each platform, which destroy the portability benefit. If your app can be built on wasm, it can probably be compiled for different platform already. Adding Electron to the mix doesn't change any of that.
- yoz-y 9y agoBrowsers still can not access the filesystem correctly, can't communicate with most of the devices you could plug into your computer, can't reasonably use keyboard shortcuts and so on. Electron can.
- littlestymaar 9y agoBut the native version already does that! What can electron do that the native version cannot ? The point of electron is that it let you write code once (in JavaScript or something that transpile to js, like TypeScript or Elm) and built multi-plateform software. But if you have a native software that can be built in wasm, it also can be built on Windows + Mac + Linux. Why using electron in that case? Electron is great if you don't want to write native code (and deal with the debugging complexity of C or C++). If you already have a cross-plateform native app in written with Qt, why the hell would you want to put that in Electron?! And remind that if your C++ isn't cross-plateform already, you won't be able to build to wasm.
- yoz-y 9y agoYou are right, in this case it does not make sense since you can already distribute the Qt compiled version.
- littlestymaar 9y agoAnd even if you want to ship native code within your Electron app, why would you use wasm instead of the native code with ffi ?
- yoz-y 9y agoThis would of course have to be tested but there might be less overhead? I haven’t used FFI but they mention that it is significant. I have written a V8 add-on using NAN and the performance is very good (as in passing relatively large arrays between C++ and Node is in the few microsecond range)
- imtringued 9y agoYou can just use nodejs to execute wasm code. Not sure about how to have a native GUI though.
- pcwalton 9y agoThere are a whole lot of native apps I just won't use because I don't want to go through the hassle of installing software. The macOS App Store is bad; Windows installers are worse. Entering a URL is a lot less friction. I don't think the user experience of Web apps has to be worse than native, but even if we grant that it's worse, I'll take it over the pain of installing apps. And, based on the experiences of numerous SaaS companies, I'm far from alone in this. A lot of native app developers wail and gnash their teeth about how the Web is a technically inferior solution (which, again, I disagree with, but let's leave that aside). But, from my point of view, native apps on the mainstream desktop platforms have consistently failed to get deployment right, and that's terribly important to users in practice. Take, say, LibreOffice. Is it better than Google Docs? Sure, probably. But I have such basic needs in word processing and spreadsheets that the marginally better user experience of the native app doesn't make up for the added annoyance of downloading LibreOffice and keeping it up to date. All indications are that most users are like me.
- pjmlp 9y agoThose SaaS are more than happy to have a Web wall to their products. No more piracy, users only get access to the UI part. They care use whatever they want from open source, without giving anything back and the world will only find out about license misuse if they employees speak out. Best of all, they own their user's data, making it even harder to move away from them, than it ever was with Office formats.
- pcwalton 9y agoViolating OSS licenses is far more common with e.g. desktop Windows software than with Web-based SaaS.
- pjmlp 9y agoWell I cannot see what they run on their servers, so it is anyone's guess. At least with native code I can check what is on my hard disk. And given my experience, it is hardly the case any company outside the big SV ones or whose main business is unrelated to software, that actually bothers to contribute anything back.
- colordrops 9y ago> virtually no benefit. > Distributing full fledged programs like this via browsers is simply going to be a shit user experience These statements are simply FUD. Single click "installation" with no dependency management to virtually every platform out there at near-native speed is a huge benefit. And browsers are already capable of installing desktop menu entries and icons, and running frameless in a way that looks no different from any other native application.
- littlestymaar 9y ago> And browsers are already capable of installing desktop menu entries and icons, and running frameless in a way that looks no different from any other native application. Really ? I've heard about the concept of Progressive Web Apps that could do that but I thought it was more a long term-goal for browsers. I didn't know you could do that already. Any pointers on how I can use it ?