News for hackers. Stuff that matters.
Re:In Defense of Electron by KirinDave on Thursday August 17, 2017 @02:54PM (#15039716)
> Electron is a crutch. A crutch that people resort to because it's effectively impossible to write quick and dirty cross-platform desktop apps in anything else, but, worse still, a _debilitating_ crutch that, unless you know what you are doing (and I daresay that is something people should be looking into) delivers overly bloated, resource-guzzling apps that wreck usability, battery life and (most visibly) RAM in _any_ OS.

See, the other word for crutch is " force multiplier". And in one sense, the crutch is for the almost comically broken state of cross platform UI toolkits. GTK+ is inadequate and hard to use. KDE not only mandates language choices and tooling but also offers only marginal improvement.

Every "good" and widely praised xplat GUI toolkit is either custom built for a browser or IN a browser. Apple's toolkit gets praise, but is hardly crossplatform. Microsoft is starting to ship an option, but it's not well cooked yet.

It's one thing to note the problems with electron. It's another entirely too imply it has genuine competition. As far as I can tell, it does not.

Re:In Defense of Electron by rcarmo on Thursday August 17, 2017 @03:09PM (#15039862)
It does if you are willing to step out of the "let's do everything in HTML and JS" echo chamber - hence my mentioning there is no alternative for quick and dirty apps.
Re:In Defense of Electron by KirinDave on Thursday August 17, 2017 @04:12PM (#15040440)
The definition of this as an "echo chamber" is itself a value judgment that denies fair debate. Is Qt better? Can it deliver better outcomes with more tooling flexibility? I think not.

While someone else labors for something "slow and clean" to invert your analogy, Electron itself is improving. And many electron apps can be cleanly hosted on a browser environment, which further puts them out of reach.

What's interesting to me is that for every successful cross-platform app I can name, it has a custom UI (and in some cases custom runtime) engine around it. That's great if you have the engineering capacity to swing it. I'm not sure many do.

I wish we had a great, open source cross platform GUI toolkit that didn't mandate the use of C++. I don't think it's easy to suggest using C++ is reasonable for the vast majority of app devs. It's increasingly specialist even in its main domains.

And I'm not in that "let's use JS" echo chamber. Look at my submissions to see where my affiliations lie. I just cannot deny those folks can pull off better looking, better specified, and more accessible products for a fraction of the total effort.overrides this. I refuse to handwave that away.

Re:In Defense of Electron by pvg on Thursday August 17, 2017 @03:59PM (#15040308)
Can you think of a Qt or, heaven help you, Xamarin-whatever based app that is really that much strikingly better than something like VS Code, as user interface and experience? OS X app, to narrow it down a little. I can't.
Re:In Defense of Electron by zzalpha on Thursday August 17, 2017 @05:01PM (#15040966)
Convenient you pick VS Code as your bar, given it's probably the one acceptable Electron app anyone can think of.

Meanwhile, I can think of a dozen native apps that behave better than Slack or Spotify or Atom, just to name a couple of obvious examples.

Re:In Defense of Electron by pvg on Thursday August 17, 2017 @05:28PM (#15041200)
It's not only convenient, it's entirely deliberate. I don't think comparing bad Electron apps to bad anything-else apps is going to be interesting or informative to anyone.
Re:In Defense of Electron by zzalpha on Thursday August 17, 2017 @05:30PM (#15041210)
Sure, but the least you can do is compare averages. IME, the average Electron app is a memory hogging piece of battery exhausting garbage. Cherrypicking outliers to make the case is, to say the least, misleading.
Re:In Defense of Electron by pvg on Thursday August 17, 2017 @06:05PM (#15041476)
It's neither cherrypicking nor misleading. 'Compare averages' is your idea, I honestly don't understand why that's interesting at all. Much more interesting (and sensible) - here's an app that represents the current state of 'peak Electron'. What's a 'peak Qt' app?

There are much better things to complain about in my pick of Electron apps. Here's one - VS Code is a highly specialized app from a field in which users are perfectly ok with highly non-native UI. Sublime, IntelliJ IDEA, NetBeans, Emacs, Eclipse, etc are all deeply non-native yet popular. So that's a bit unfair but hey, there are Qt-based dev tools out there as well. But again, I'd be happy with any example of a non-shitty (UI/UX-wise) Qt app.

Re:In Defense of Electron by zzalpha on Thursday August 17, 2017 @07:11PM (#15041920)
It's neither cherrypicking nor misleading. 'Compare averages' is your idea, I honestly don't understand why that's interesting at all. Much more interesting (and sensible) - here's an app that represents the current state of 'peak Electron'. What's a 'peak Qt' app?

Uh... the entire KDE Desktop Environment and surrounding ecosystem? Of those, KDevelop and Krita are both fully cross-platform.

I've listed many others in other comments.

Frankly, I think you're either choosing not to look, or moving the goalposts in order to rule out perfectly fine examples of native cross platform apps that aren't written in glorified web browser.

Re:In Defense of Electron by pvg on Thursday August 17, 2017 @07:50PM (#15042145)
We were talking about cross-platform apps so 'The entire KDE Desktop' doesn't count. All of the ones you listed are awful on OS X (and VLC's main UI is, I think, native) and don't seem to have any UI advantage over Electron apps. Which answers the question raised upthread - 'why don't people writing x-platform apps just use Qt'. One good reason is because it doesn't appear to produce better apps.
Re:In Defense of Electron by pfranz on Thursday August 17, 2017 @08:34PM (#15042402)
I know at companies I've worked for the split-license for Qt caused concern. This was pre-Electron (although I seriously doubt it would have been in contention). They went with another toolkit and a few years, after conferring with their lawyers or whatever, decided to move everything to Qt.
Re:In Defense of Electron by kuschku on Friday August 18, 2017 @06:20AM (#15044947)
> We were talking about cross-platform apps so 'The entire KDE Desktop' doesn't count.

The entire KDE desktop runs on Windows. So it does count.

> One good reason is because it doesn't appear to produce better apps.

So an order of magnitude lower RAM and CPU usage doesn't count as "better"?

Re:In Defense of Electron by KirinDave on Friday August 18, 2017 @01:14PM (#15047980)
> So an order of magnitude lower RAM and CPU usage doesn't count as "better"?

Depends on the absolute values. In and of itself, it's not better if it doesn't noticeably improve ux. Applications are for users. They're not vying for space in a VM, so up to the point where they don't impact a normal user's workload on a representative machine: no it doesn't count for much.

Re:In Defense of Electron by dagw on Friday August 18, 2017 @06:34AM (#15045006)
I'd be happy with any example of a non-shitty (UI/UX-wise) Qt app.

Maya (the high end 3D animation package) switched to Qt a few years ago.

Re:In Defense of Electron by TAForObvReasons on Thursday August 17, 2017 @05:13PM (#15041072)
I can't think of any acceptable Qt or Xamarin apps period, which is the real point of comparison here. The fact that VS Code is acceptable is truly surprising and represents a victory not only for Electron but the whole concept of cross-platform apps.
Re:In Defense of Electron by pfranz on Thursday August 17, 2017 @08:31PM (#15042379)
I work in visual effects. Large companies (Disney, DreamWorks, ILM, Weta) are all Linux based, while small shops are Windows or Mac. So much of the software is cross platform in order to be relevant (usually Linux first). Maya, Nuke, Houdini, rv, and a bunch more. All of the smaller tools and utilities in open source projects are either Qt or PyQt. Maya, Nuke, and Houdini all had their own in-house toolkits, but migrated to Qt. They all have fairly custom UI requirements, require high performance, and need high end things like accurate color and GPU acceleration.

It's not the same type of app as Spotify or Slack, but is comparable to VSCode.

Re:In Defense of Electron by zzalpha on Thursday August 17, 2017 @05:21PM (#15041138)
Then you're not thinking very hard. I'm too bored of this discussion to look at Xamarin, but for Qt, just looking at the Wikipedia page and cross-referencing with my experience with them, we have: VLC, Stellarium, VirtualBox, Telegram, Google Earth, LyX...
Re:In Defense of Electron by KirinDave on Friday August 18, 2017 @11:16AM (#15046912)
So, a majority of apps that set up a window then use their own internal renderer? Except Telegram and Lyx.

Fair enough, but this is hardly representative of the sort of things Electron does well. What's more, Lyx and Telegram aren't exactly famous for being accessible apps.

It's very difficult for me to envision why someone wants to work 4x harder on an app to cut the memory footprint from 2g-4g (much of which is actually shared with the browser you've probably got running anyways) to 1g.

People demand respect for less able hardware, but I use Electron on 8 year old computers without complaint. And all I can hear in this is the emacs vs vi stuff again.

Re:In Defense of Electron by Matthias247 on Thursday August 17, 2017 @06:27PM (#15041649)
From those two I use VLC and VirtualBox. And while they work fine, I don't think they are great showcases for good GUIs. E.g. the VLC guis scaling is quite bad on my 4k screen. The same applies also for the version QT creator which I have installed (but that's not a very recent one, maybe the current one is better).

To be fair: I have seen various good QT apps, but most of them were not standard desktop apps. Instead they used fullscreen QML for highly custom user interfaces. That seemed to work well, but I think JS/HTML5 would do the same.

Re:In Defense of Electron by zzalpha on Thursday August 17, 2017 @06:45PM (#15041761)
The scaling issue is more a problem of Windows than it is Qt, per se. And, good news, they're fixing it in the next major version!

That seemed to work well, but I think JS/HTML5 would do the same.

With the same memory footprint and CPU utilization? I highly doubt that...

Re:In Defense of Electron by KirinDave on Friday August 18, 2017 @11:16AM (#15046919)
Sure, but the trade-off is a lot more developer time. "Twice as long" seems generous, and certainly Electron makes accessibility easier.
Re:In Defense of Electron by ivm on Friday August 18, 2017 @12:37AM (#15043597)
MonoDevelop aka Xamarin Studio aka Visual Studio for Mac

It's a powerful and memory-efficient IDE written in C#/Mono.

Re:In Defense of Electron by dman on Friday August 18, 2017 @02:09AM (#15043962)
Sublime text?