News for hackers. Stuff that matters.
Re:Electron 2.0.0 beta by always_good on Thursday February 22, 2018 @05:03AM (#16436515)
Well, you have a choice, so I don't understand the hate.

Okay, maybe you have to use Slack or Discord at work.

Life and engineering are about trade-offs. That people use Electron apps despite the downsides just shows that these apps are delivering value to the world. Value that might not have existed had Electron not made it that much easier for people to get into desktop software.

The complaining on HN reminds me of how my users get mad at me for not spending more of my free time developing the forum software. Like I'm trying to spite them. As if I just need to pull some knobs and levels.

What's happening is that software is getting more and more accessible to people. Beginners are making games in Unity and iOS. Cultural channels into tech like Twitch and cryptocurrencies have been opening up. I watch my cousins' children open up the browser's console to delete annoying DOM nodes.

What I suspect is that more and more people are getting into tech, so there are more and more people for you to disagree with about trade-offs.

Re:Electron 2.0.0 beta by gameswithgo on Thursday February 22, 2018 @08:44AM (#16437453)
>Life and engineering are about trade-offs.

Electron is not a sensible trade off. It is not necessary to accept that level of inefficiency to get that productivity boost. It only has happened that way because our industry has been so web focused for so many years, that very little brain power has gone into cross platform desktop apps for a long time.

And we end up with a ridiculous Frankenstein solution that is fractally wrong. But it is "Easy" because 90% of programmers are used to HTML,CSS,Javascript and so they can suddenly make 'desktop' apps now.

And no, we don't have a choice when almost every desktop application being made now is being made in electron. Its just awful, and you should quit dismissing the people telling you how much they hate the situation, its real.

And of course those of us that hate it should be aiming to help fix the situation, but of course it is difficult, since anything you propose that is not HTML/CSS/Javascript seems alien to so many modern programmers that they reject it out of hand.

Re:Electron 2.0.0 beta by zach43 on Thursday February 22, 2018 @09:28AM (#16437713)
> It only has happened that way because our industry has been so web focused for so many years, that very little brain power has gone into cross platform desktop apps for a long time.

While there is an ongoing trend to move towards web apps, I think you are mixing up the causality here a little bit. The main reason why developers are increasingly choosing to move towards web technologies for UI is the sheer pain of doing any kind of cross-platform development on the desktop.

Most of the nice desktop development frameworks (like the ones in C# or Swift) are not cross platform. Meanwhile, we have a decent cross-platform UI framework in Qt, but this requires dealing with C++, which doesn’t even have a good package manager behind it. You could also use GTK+, wxWidgets, FLTK, but these don’t provide a good look and feel and non-Linux OSes.

Basically if you want to easy-to-use cross-platform desktop UI development, your choices boil down to Electron, and maybe pyQt.

Desktop developers have years to make this a better situation by perhaps promoting cross-platform UI standards or building better tooling, but nothing good has really gained much traction, so more developers are justifiably moving to Electron for now.

Re:Electron 2.0.0 beta by dgreensp on Thursday February 22, 2018 @09:58AM (#16437934)
The reason the causality sounds backwards is the GP is talking about secondary effects of what you are talking about — the other half of a vicious cycle.

We are already a decade into neglecting native app technologies in favor of web app technologies, because web apps were much easier to write and deliver than cross-platform native apps (and largely still are). It’s to the point where even big companies with lots of resources are hiring web programmers and web designers to build their UIs.

It’s interesting to me that mobile changes the trade-offs. The quality gulf between web and native apps is greater. The web sucks more on mobile, and expectations for native apps (animations, touch, etc) are higher. Mobile OSes also make it much easier for users to install and manage native apps than it is on desktop (because of the app store, no custom installers, no users locked out of installing apps by their employers as far as I know). I’m excited about React Native for addressing the cross-platform part.

We’ve learned since Java that even if you don’t have “write once, run anywhere,” you can still have “learn once, write anywhere,” a la React. Also, we expect apps to come with their own systems of UI widgets these days, not necessarily “native look and feel.” It really changes the game.

Re:Electron 2.0.0 beta by jrs95 on Thursday February 22, 2018 @11:54AM (#16438991)
Java FX is a decent solution as well. It's just not cool.
Re:Electron 2.0.0 beta by xeeeeeeeeeeenu on Thursday February 22, 2018 @02:57PM (#16440851)
>You could also use GTK+, wxWidgets, FLTK, but these don’t provide a good look and feel and non-Linux OSes.

Wx is using native widgets on every platform.

Re:Electron 2.0.0 beta by edvinbesic on Thursday February 22, 2018 @09:28AM (#16437712)
Claiming that everyone is worse off because electron apps consume more resources then they would had they been written in a "native" language is only true if the only value you get from an app is low resource consumption.

(I use native in quotation marks because we can probably not even agree on what that is.)

This attitude seems to be common here but everyone hating on electron seems to ignore any positive aspects of it and only focuses on the fact that it is slower and/or more resource intensive then had it been written in <native-language-of-choice>.

You can dislike Electron on a technical or principal level, that's fair, but until there is an alternative that would be considered better by most things will simply not change.

Until then, repeating the negatives over and over again only serves to de-value the efforts of those actually producing and shipping code and the only possible outcome is another "tabs vs spaces" holy war.

Re:Electron 2.0.0 beta by dgreensp on Thursday February 22, 2018 @10:16AM (#16438068)
As an industry forum for engineers and people developing products, this is a great place to share positive and negative opinions about technology and how it impacts product quality. That’s good conversation.

Generic reactions to negativity, saying there are two sides to every coin, do not really contribute to the discussion, IMO, so I disagree.

Re:Electron 2.0.0 beta by bradstewart on Thursday February 22, 2018 @09:39AM (#16437796)
It's a sensible trade off when you're a single person needing to deliver a web, Windows, and MacOS application.
Re:Electron 2.0.0 beta by yoz-y on Thursday February 22, 2018 @05:20AM (#16436582)
You can criticize something even if it does not directly affect you though. For example, I can live with Slack & Skype eating half of my ram but I really wish I would not have to.

I really like Git Kraken, in theory, but if I imagine it as a native app it would be so much better.

I see the appeal of Electron, and to be fair we also use it at work. However our application is destined to be running on a dedicated hardware which runs it and nothing else.

Ultimately I'd like to see products like Slack starting with an Electron app and when the means permit it migrate to a native application. Not the other way around.

Re:Electron 2.0.0 beta by gldalmaso on Thursday February 22, 2018 @06:34AM (#16436868)
If you consider that the browser is where most Electron app users actually begin using the app, you can only expect Electron to be replaced by some native app that runs the same code as the browser. This is the killer feature of Electron.

Having a web app + native app means a huge leap in cost.

Having no web app + native app means a huge loss in user reach.

The only viable replacement would be something like Electron but with a stripped down browser fit to purpose instead of the huge surface-area of Chrome.

Re:Electron 2.0.0 beta by josephg on Thursday February 22, 2018 @07:09AM (#16436988)
The replacement is react native. Same web developer friendly environment with practically native performance. And yes, it’s available for desktop as well as mobile.
Re:Electron 2.0.0 beta by luladjiev on Thursday February 22, 2018 @08:16AM (#16437308)
Just curious can you give a link to desktop app made with React Native or an example / tutorial for this?
Re:Electron 2.0.0 beta by piracykills on Thursday February 22, 2018 @08:51AM (#16437502)
I see a few attempts -

https://github.com/Microsoft/react-native-windows

and http://reactdesktop.js.org/

The Windows one is from Microsoft, but is single platform. Nothing officially supported by react devs as far as I can tell.

Re:Electron 2.0.0 beta by luladjiev on Thursday February 22, 2018 @09:16AM (#16437642)
I see. Thanks.
Re:Electron 2.0.0 beta by agumonkey on Thursday February 22, 2018 @09:21AM (#16437669)
turbo pascal ide and compiler are 600KB

at one point I don't care about multilayer super cute guis

btw turbo pascal had shadowed windows in TUI

Re:Electron 2.0.0 beta by peatmoss on Thursday February 22, 2018 @10:39AM (#16438254)
And don’t forget Free Pascal and Lazarus. I opened it up the other day on a whim and made a hello world app.

Everything about the thing felt 1990s... in the best way. The IDE was clearly designed not for initial discovery by a novice, but for someone who they ultimately expect to become proficient and thus able to capitalize on the expert-friendly UI.

The reasulting binary felt like the 1990s too: A single small executable with instant load times :-)

Re:Electron 2.0.0 beta by jacobush on Thursday February 22, 2018 @09:29AM (#16437725)
The sick thing it's a smaller download to write your app in Turbo Pascal and distribute a virtual machine running DOS than an electron app.