7 ms·
It would be nice to have an Electron 100% compatible framework (drop-in replacement) that instead of using Chrome, it would use Apple's webviews that are of cou
by bunnycorn 8y ago
It would be nice to have an Electron 100% compatible framework (drop-in replacement) that instead of using Chrome, it would use Apple's webviews that are of course based on WebKit.
It would be faster and take much less RAM, specially when multiple Apps are open and they could use the shared library.
Also, now that Chromium is going to be part of Windows, the same would also be a good idea, I think.
- inglor 8y agoHalf of electron is being able to leverage the Node.js ecosystem and Chrome APIs. Creating a "drop in" replacement would require a ton of work and constant keeping up-to-date.
- acdha 8y ago> leverage the Node.js ecosystem and Chrome APIs Aren't those fairly discrete areas with fairly different levels of work? Doesn't most of what's on NPM run in WebKit / Gecko these days, anyway, since people commonly deploy client-side?
- jf- 8y agoHaving a shared electron runtime on each platform is an answer to some of its performance-related criticisms. Hopefully this is what Microsoft are going for with chromium and the github acquisition. There would still need to be compatible equivalents on Mac and Linux however, or it would render the endeavour pointless.
- saagarjha 8y ago> a shared electron runtime on each platform is an answer to some of its performance-related criticisms Like…Chrome?
- jf- 8y agoGiven that electron is not chrome, no, not chrome. A specially made, backwards compatible chromium/node/whatever bundle, that developers can build against without fear of having their apps broken by future API changes.
- DonHopkins 8y agoYes, that's the only answer, and it's a good one! It will be great and benefit everyone if Microsoft can pull that off on all platforms.
- lcnmrn 8y agoEach Electron app comes with a very specific versions of Chromium and Node.js. They can't run on native frameworks. If native frameworks are updated old apps would break. If native frameworks aren't updated newer apps would break. What you're asking was already tried with Adobe AIR and failed. Instead we need lighter alternatives to Node.js and Chromium.
- azhenley 8y agoI'm really starting to think it would be a good PhD dissertation project to (semi?) automatically reduce Chromium to the bare minimum needed for a given Electron app. The techniques could probably be applied to reducing any library and would be of interest to researchers in SE and PL, along with industry.
- DonHopkins 8y agoThat's not just tree shaking, that's more like rainforest shaking!
- cat199 8y ago> good PhD dissertation project why? would not existing static analysis/dependency pruning take care of it if someone had the time? I don't see what would be 'novel' here from a theoretical point of view.. still a good project possibly though
- azhenley 8y agoThat is the research of it, we don't know if existing techniques would work! And surely there are novel improvements that could be made, particularly for this specific application. Also, I imagine there are many cases where static analysis would not be enough for the JS app.
- barbecue_sauce 8y agoSounds more like an undergrad thesis.
- izacus 8y agoAren't those just called PWAs these days?
- derimagia 8y agoFlutter does this. https://github.com/google/flutter-desktop-embedding https://github.com/google/flutter-desktop-embedding looks for your local version of chrome. Curious if anyone has thoughts on it.
- tokyodude 8y agoSo, every time Apple updates WebKit your app breaks. We've gone through this in the past. There are multiple reasons Electron is a win. 1. It's cross platform Don't have to deal with the fact that Safari is missing these 12 APIs or has different edge cases 2. It's stable after shipping Users get a new version only when you ship. If you use the native widget then users get a new (often broken) version on every update by a 3rd party (Apple/MS/Google). Example: chrome just deprecated autoplay. If that bubbled into apps your app just broke. Electron could do the same but if you're testing like a good dev that break wouldn't make it to users. You as a dev would find it locally, deal with it, and only after ship to users. so, no personally I don't want a shared widget. that sounds like going back to DLL hell or worse, just broken stuff.
- tinus_hn 8y agoWebKit is free so you can bundle the library if you want. Or not.
- sime2009 8y agoWhat is the point in that now? It is going to be a similar size as Chromium. You might as well just use Electron. As a matter of fact, Chromium's/Chrome's engine Blink was forked off from WebKit back in 2013. Current WebKit is Apple's not-quite-as-well-updated version of the engine in old Chrome.
- heywire 8y agoDoesn’t stable after shipping also mean that if a critical vulnerability is found in the version of electron/chromium that you’ve bundled, the user is vulnerable until you are able to issue a fix? What if the app itself is no longer updated?
- tokyodude 8y agoHow is that different than any native app? All native apps have that issue.
- c-smile 8y agoCheck https://terrainformatica.com/2018/12/23/sciternode-versus-electron/ https://terrainformatica.com/2018/12/23/sciternode-versus-el... and discussion: https://news.ycombinator.com/item?id=18746408 https://news.ycombinator.com/item?id=18746408 In principle that is doable. Not sure about 100% compatibility as only WebKit (particular version) is 100% compatible with WebKit (particular version here). Edge is gone in that fight. Mozilla is standing but is not 100% compatible.