News for hackers. Stuff that matters.
Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by lern_too_spel on Thursday June 21, 2018 @12:55PM (#17366912)
What are the remaining APIs that people need in Electron that are not available in the web browser? And what's the timeline to getting those in the browser to deprecate Electron?

In cases like Slack, I prefer using the webapp because I trust the Chrome team to update quickly if there is a vulnerability in the browser. I do not trust Slack to update its Electron app quickly if there is a vulnerability in Chrome.

Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by plurgid on Thursday June 21, 2018 @02:42PM (#17368088)
> What are the remaining APIs that people need in Electron that are not available in the web browser? And what's the timeline to getting those in the browser to deprecate Electron?

I get what you're saying but to me, even if I could do literally everything that node does inside the browser, that STILL would not deprecate electron for me.

It's not lack of functionality in the browser that's a problem for me. It's mutability of the browser.

With electron, I get to use ONE version of javascript, ONE implementation of the DOM, ONE implementation of CSS. Period.

I do not give a single hoot about that ancient corporate version of IE you have to use at work. About how this looks in safari, versus edge versus, opera, versus whatever.

It simply doesn't matter anymore.

no more shims, and I can dump about half of the frameworks and stuff from my code because of it.

If I get an app going that everyone likes and I actually want it on the web, THEN I can go and add all the cruft I'll need to make it work out there in the wild.

this is a very good thing (at least for me).

Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by murukesh_s on Thursday June 21, 2018 @02:53PM (#17368196)
You got a great point. And don't forget that Electron is not a web shell, it can replace native apps. Look at VSCode! It's not just about Electron vs Browser but there are certain cases where you don't want to go into a cloud.
Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by sam0x17 on Thursday June 21, 2018 @07:35PM (#17370089)
You also get full control over the local file system with electron. There are plenty of system utilities... stuff like etcher.io, disk partitioners, backup software, custom FUSE-based file systems, etc., that you couldn't do purely in a web browser for security reasons, but that can benefit from the portability and sexiness of an electron-based UI (performance concerns aside).

I actually doubt there is anyone who thinks of electron in this way, in that they only use it because X feature isn't in the browser _yet_. Many electron apps could only be done natively, again for security reasons. Things like the slack desktop app don't meet that criteria, however.

Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by andrewstuart on Thursday June 21, 2018 @04:10PM (#17368840)
Just refuse to load for browsers other than Chrome.

Some users wont like it but Electron is a price too high if single browser target is your goal.

Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by josefx on Thursday June 21, 2018 @04:31PM (#17369034)
I think you meant to say "This website is optimized for IE 5.0 and 640x480 please upgrade your browser". Chrome still lacks something essential that IE had back in the day: API and bug for bug stability. Moving targets just aren't as atractive.
Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by mcbits on Thursday June 21, 2018 @04:41PM (#17369100)
And now with Electron we have, "This application is optimized for libfreetype2.8-0. Please downgrade your system package until Electron catches up."
Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by veidr on Friday June 22, 2018 @01:58AM (#17371730)
Hmm, I have never seen a conflict like that with any of the Electron apps I use daily: VSCode, Cypress, Wire, and (blecch) Slack.

What app was that, and what platform did you see it on? (I use the apps mentioned above on macOS, Windows 10, Ubuttnu 18.04, but I guess 80% of the time I'm using macOS so I might not have noticed if its a Linux thing...)

Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by mcbits on Friday June 22, 2018 @07:19AM (#17373084)
I'm surprised you didn't encounter the issue with VSCode on Ubuntu 18.04, as that's where I ran into it.

https://github.com/electron/libchromiumcontent/issues/384

tl;dr (as I understand it) is that a change in FreeType invalidated an assumption that programs were making in how fonts were rendered, making text look garbled. It was fixed pretty quickly in Chromium and Firefox, but it took a few months to trickle through to Electron and finally to the apps based on it. In the meantime, Linux distros had started upgrading to the new "fixed" (seemingly broken) FreeType, so the workaround was to downgrade FreeType until any affected Electron apps were updated.

Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by scrollaway on Thursday June 21, 2018 @01:32PM (#17367332)
I would love to have the browser be a local "application server" on the desktop. Currently, people hate electron because shipping and running duplicate browsers is heavy-handed, insecure, and silly.

There's definitely a different feeling between having a running Discord/Slack tab vs. using a native app for it, if you're using it a lot. A native notification bar icon, shortcuts in the menus/app launchers, the app not exiting if i need to restart the browser, the app not being affected by extensions I install (adblockers, etc).

The app being separate from the browser is good. But it should still be the same engine running this. The same master process as well, possibly?

Either way, Electron has been a huge boon for apps being available natively on Linux and that's just awesome. I don't want to lose that.

Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by tambourine_man on Thursday June 21, 2018 @03:44PM (#17368628)
>Currently, people hate electron because shipping and running duplicate browsers is heavy-handed, insecure, and silly.

And because they are bad OS citizens. You can’t use the system’s spell checking, dictionary, undo/redo, shortcuts, abbreviations, better text rendering… the list goes on and on.

If it is a webapp, I can at least use Safari, which has none of those issues.

Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by jeff18 on Thursday June 21, 2018 @07:16PM (#17370011)
FWIW, Electron actually supports all of those things, except the text rendering engine.
Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by tambourine_man on Thursday June 21, 2018 @08:22PM (#17370277)
Really? Never seen a well behaved textarea or input[text] in Chrome. Can you elaborate on how this could be done?
Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by jeff18 on Thursday June 21, 2018 @08:36PM (#17370349)
Works for me out of the box! spellchekc too.

https://www.dropbox.com/s/348mh6wlmuayflp/Screenshot%202018-...

Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by tambourine_man on Thursday June 21, 2018 @09:55PM (#17370692)
You're right… kind of. For some reason it's not available throught contextual menu, like other apps, only in the Edit menu. https://imgur.com/a/2FDNDu4

And if the App forgets to expose that option (Skype, for instance), tough noogies.

Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by josteink on Thursday June 21, 2018 @01:38PM (#17367403)
> I would love to have the browser be a local "application server" on the desktop

Back in the days we called that a WebView.

And when MS made one with MSIE and used that in Windows, we sent the EU after them.

How times change, eh?

Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by coldtea on Thursday June 21, 2018 @03:02PM (#17368286)
>And when MS made one with MSIE and used that in Windows, we sent the EU after them.

That was because they were a monopoly (among several other reasons, such as "bundling", threatening OEMs and so on).

Not because they offered webviews (which was totally irrelevant).

Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by josteink on Thursday June 21, 2018 @03:18PM (#17368417)
Iirc the embedding in the OS (aka the webview) was one of the major complaints.
Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by hshehehjdjdjd on Thursday June 21, 2018 @05:15PM (#17369354)
But ... chromium is not embedded in the OS?
Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by reitanqild on Thursday June 21, 2018 @02:15PM (#17367834)
> And when MS made one with MSIE and used that in Windows, we sent the EU after them.

> How times change, eh?

That was a very short story.

Mine is a bit longer and includes MS intentionally crippling HTML if their servers sniffed Opera headers.

Edit: Google employees here, -please remind your bosses and colleagues what happened last someone abused their position to dominate the browser market.

Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by josefx on Friday June 22, 2018 @02:24AM (#17371832)
> please remind your bosses and colleagues what happened last someone abused their position to dominate the browser market.

They got rich(er) and crippled competition for years to come?

Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by reitanqild on Friday June 22, 2018 @10:21AM (#17374146)
Well they also got a fine so big [0] that they changed their ways somewhat[1] and still make money.

But then again, I know nothing. This is just a feeling I have.

[0]: Yes, and I think they also got the message loud and clear that this would just be a start unless they started behaving

[1]: not saying they are saints yet, but as a nix user out in the trenches I very much prefer the current Microsoft.

Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by scrollaway on Thursday June 21, 2018 @03:47PM (#17368658)
Yes, I had webview in mind when I was writing that comment. But obviously WebViews aren't good enough. We're talking about enough functionality to own a multi-window app.

Edit: What I more specifically had in mind was Firefox Prism, from circa 2007. https://wiki.mozilla.org/Prism

Why this stuff didn't take / isn't more popular now, I don't really know.

Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by tambourine_man on Thursday June 21, 2018 @03:53PM (#17368701)
With the exception of IE/EDGE, all major browsers use an open source rendering engine.

It’s a lot easier to argue that a web browser is an essencial part of an OS this way.

Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by eddieroger on Thursday June 21, 2018 @02:10PM (#17367768)
Except Electron won't do it using their market share to take out Netscape.
Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by josteink on Thursday June 21, 2018 @02:56PM (#17368233)
No. That’s Chrome’s doing to Firefox.

Big difference, sure.

Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by lern_too_spel on Thursday June 21, 2018 @01:53PM (#17367588)
> A native notification bar icon, shortcuts in the menus/app launchers

This already works out of the box. "More tools -> Create shortcut..." in Chrome will create a launcher in the Gnome menu that will open Slack in its own window without a location bar.

> the app not exiting if i need to restart the browser, the app not being affected by extensions I install (adblockers, etc).

I want to be able to modify web apps, and I want to restart all webapps when I receive a security update for Chrome.

I don't think the advantages outweigh the risks for most Electron apps that also have webapps.

Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by wkirby on Thursday June 21, 2018 @02:16PM (#17367853)
> > the app not exiting if i need to restart the browser, the app not being affected by extensions I install (adblockers, etc). > > I want to be able to modify web apps, and I want to restart all webapps when I receive a security update for Chrome.

You guys are sort of talking past each other here --- you both have something different that you want, and since Slack runs in both a standalone Electron shell and in the browser, it's giving you both what you asked for.

Why dismiss the things he likes in a standalone app as not addressing your needs for an in-browser webapp?

Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by lern_too_spel on Thursday June 21, 2018 @02:25PM (#17367943)
I'm saying that the webapp also gives him what he wants but without some serious disadvantages. If you really don't want to run any extensions on Slack, you can do that too: https://chrome.google.com/webstore/detail/extension-automati...
Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by TeMPOraL on Thursday June 21, 2018 @02:14PM (#17367817)
We could have it all.

A shared runtime, with shared security updates, and applications being spawned as "standalone", with a cmdline parameter like --master-config that would let me enable Inspector and any specified addons. Because I agree, being able to freely modify third party software is huge.

Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by zacmps on Thursday June 21, 2018 @03:55PM (#17368714)
chrome --app="https://www.google.com"

Gives you all of that, shame it's not better known.

Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by scrollaway on Thursday June 21, 2018 @05:32PM (#17369480)
Yeah I mean, Chrome tried to do it with Chrome Apps. It's older than Chrome, too. Firefox did it back in the days using a technology called "Prism": https://wiki.mozilla.org/Prism

It just.. it's not taking. It's not a valid way, right now, of telling people "Here's your native electron-like app". Why? It's hard to tell where the limits are.

Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by vvanders on Thursday June 21, 2018 @01:15PM (#17367142)
One of the things Electron gives you with Node on the backend is the ability to break out into C FFI if you find you need a specific API on your target platform.

I've done this for things like serial device control and the like. You still get the productivity of web apis on the frontend and flexibility on the backend with the caveat that you're going to be building a platform specific version of your native code for each release.

Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by adamcw on Thursday June 21, 2018 @03:02PM (#17368282)
While discussing the Node C binding architecture, I think it's also worth noting The Neon Project* which is extending that lower level binding system into the Rust ecosystem. I'm not personally involved in the project, but I think it has a lot of potential.

* https://www.neon-bindings.com/

Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by lossolo on Thursday June 21, 2018 @01:01PM (#17366967)
> What are the remaining APIs that people need in Electron that are not available in the web browser?

https://nodejs.org/api/index.html

I don't think APIs like full access to filesystem will be available in browser because any malware could do anything it would like with your OS/files.

So in a lot of cases you can't really replace Electron with just normal webapp in browser.

Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by Asooka on Thursday June 21, 2018 @01:40PM (#17367415)
Or maybe some form of web archive format signed with a certificate? "Do you want to install Slack? It will have access to X, Y, Z"...

We already download programs off the internet and let them run with local privileges all the time, it should be possible to safely and securely extend the capability to programs delivered as html+css+js.

Also I don't see why Electron+node isn't installed system-wide like Java or .NET. Yes, I know it's because node is a server technology whose devs aren't interested in being Java, while the people shipping electron apps are just interested in the lowest friction to deploying native apps to customers, but it still seems like the kind of thing someone would have done already if only just to show off.

Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by greggman on Thursday June 21, 2018 @02:24PM (#17367939)
Microsoft had HTML apps as a standard feature of windows in the 90s iirc

https://en.m.wikipedia.org/wiki/HTML_Application

Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by pjmlp on Thursday June 21, 2018 @03:09PM (#17368345)
And they are first class citizen on UWP (aka WinRT), long before Electron was a thing.

https://msdn.microsoft.com/en-us/magazine/jj891058.aspx

Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by dvlsg on Thursday June 21, 2018 @04:26PM (#17368978)
To be fair, .NET has the capability to release applications with all the pieces required in a single exe. At least core does, anyways. That's a pretty big selling point for golang, as well, in my mind. Electron is the same thing in my mind, just on a much larger scale. Maybe it's too large to be sustainable in the long term, but there are definite benefits to having a single, self contained package.
Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by voltagex_ on Thursday June 21, 2018 @07:04PM (#17369965)
They're still not there with the Golang-style single exe for .NET Core. The default behaviour of the dotnet build tool seems to be to build a .dll file (!)
Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by pjmlp on Friday June 22, 2018 @01:40AM (#17371637)
Have you looked into "Self-contained deployments"?

https://docs.microsoft.com/en-us/dotnet/core/deploying/

On the Windows side, .NET Native does static linking.

Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by eberkund on Thursday June 21, 2018 @01:06PM (#17367035)
No, but you can use an extension/native helper and talk to it from the web app using network calls.
Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by d4l3k on Thursday June 21, 2018 @01:07PM (#17367052)
Might as well just use electron at that point since it's easier on the developer side.
Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by untog on Thursday June 21, 2018 @01:37PM (#17367383)
Uh, aren't users the most important factor here, not developers?
Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by always_good on Thursday June 21, 2018 @01:48PM (#17367523)
Sure, such that in my experience users prefer dedicated apps most of the time.

For example, Postman (browser-based HTTP client) has some of the worst UX because it's a Chrome app and not stand-alone. Can't event alt-tab to it. I have to alt-tab to Chrome and then find the Postman window.

Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by TeMPOraL on Thursday June 21, 2018 @02:12PM (#17367796)
Users also prefer to be able to use more than one program at a time on their computer, so please, if you have to use Electron, keep an eye on performance characteristics of your application.
Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by seanjs on Thursday June 21, 2018 @05:59PM (#17369633)
I'm not a heavy user of Postman so I can't say if the UX was improved by it, but Postman actually moved to Electron last year: http://blog.getpostman.com/2017/03/14/going-native/
Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by jhasse on Thursday June 21, 2018 @02:59PM (#17368249)
Only to a certain degree.
Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by solarkraft on Thursday June 21, 2018 @01:12PM (#17367106)
But even worse for the user than a web browser already is.

Can we, instead of combining the worst of native apps, web apps and containerizaton, maybe work towards removing SOME of the terrible aspects for users? If developer comfort is the highest priority you might as well skip making the interface look nice/useable.

Electron really is an extension of Chrome and it'd be damn nice if it could be shipped as one.

Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by lossolo on Thursday June 21, 2018 @01:12PM (#17367101)
As market shows it's not about what you can do but what is the easiest and fastest way to make a product.

I've created Electron application also, not because it's the best solution on the market but because it was fast and easy way to get my app to the users.

If I had time and resources I would probably just use Qt or created native app for each platform.

Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by xpaulbettsx on Thursday June 21, 2018 @07:22PM (#17370033)
Can you name even a single app that _actually does this_
Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by hanniabu on Thursday June 21, 2018 @03:34PM (#17368539)
Can't there be separate contained instances?
Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by coldtea on Thursday June 21, 2018 @02:59PM (#17368248)
>What are the remaining APIs that people need in Electron that are not available in the web browser? And what's the timeline to getting those in the browser to deprecate Electron?

The main attraction is the ability to NOT run in the browser, but be a standalone app.

It's not just about the browser not providing some native APIs.

Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by kyriakos on Thursday June 21, 2018 @04:40PM (#17369098)
One thing electron offers that is not mentioned is a predictable platform for your application. Users can use different browsers and even today this is still a problem. But distributing an electron app you know at any moment what apis you have available and how they behave.
Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by saurik on Thursday June 21, 2018 @10:55PM (#17370935)
As far as I have been able to tell the Chrome team considers native sockets something they don't ever need to even pretend to provide in the browser anymore (after removing Chrome Apps support) in no small part because of the existence of Electron, so the powers that be seem to be going in the opposite direction :(.
Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by crooked-v on Thursday June 21, 2018 @04:18PM (#17368918)
> What are the remaining APIs that people need in Electron that are not available in the web browser?

Broad-use network access, including local subnets.

> And what's the timeline to getting those in the browser

Do you want to give RANDOM_EVIL_WEBSITE access to your LAN?

Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by bigato on Friday June 22, 2018 @07:29AM (#17373125)
> Do you want to give RANDOM_EVIL_WEBSITE access to your LAN?

Off course not, I prefer to install it as an electron app.

Re:Electron 3.0.0-beta.1 – Chrome 66 and Node 10 by t1amat on Friday June 22, 2018 @07:23PM (#17378366)
This is already the case. JavaScript from websites execute in the context of the browser which means it has access to your local network.