It's super annoying when you are trying to create a desktop app and you get issues (multiple of them) essentially going "Why are you using Electron? it eats up my RAM, please use X framework and you should be fine"
This would be fine if:
1. You attached that with a PR for said framework or
2. You searched before and read this being answered earlier
From a maintainer's point of view - this is super annoying.I'm sure the author built this to satisfy his itch first and open sourced it because it might help others (either to directly use the product or to learn from the code). It's super annoying when you have people who think they know better come and tell you to use X because they have a problem with Electron (not necessarily your app in particular but Electron in general). I say this as it appears the author might be using arch linux and as a linux user, I always appreciate an electron app vs no app (obviously a native app is better but that's generally never the option - it's generally electron or nothing).
I'm sure it could have been worded nicely but eitherway it got the effect the author wanted - it drives away people who'd be annoyed by Electron in the first place.
Eck, please don't do this. Think of this with any other language/framework. "Your app was written in C++ but I rewrote it in Arc because the code is way nicer. You're welcome." or "You used Java but that is a pain because it has to be compiled, so I rewrote it in PHP and now it's possible to make changes live on production servers."
There are many reasons a maintainer may not want to do that (eg, not knowing or wanting to learn the language/framework, having an ecosystem of plugins/branches that would be negatively affected, different opinions on what the project objectives are and how best to achieve them, etc). It's very hard as a maintainer to have to close a massive PR that someone put a lot of time into, and it's obviously a waste of time for someone to work on something that is ultimately rejected.
What you can do instead is open an issue and say "This is very memory-intensive because of Electron, are you open to addressing this? I'm willing to rewrite using <framework/language>."
You can also fork (or effectively just start a competing project) and become the maintainer of the new project. If you're not willing to do that, it's really not fair to expect someone else to -- as effectively with a massive PR you're basically asking them to take on maintenance of your code.
Other comments here (and probably GP) dismissed the software, due to the note, before even checking its utility. This is good, because the polarizing note deters people who value tone and identity more than utility, preventing these arguments down the chain. Basically it's leveraging outrage against people quickly susceptible to outrage, so I would say it serves its purpose effectively!
I've had experience both in work and my personal life with a wide variety of open source project maintainers/creators, some have been amazing, and their attitude encourages you to contribute, others have been so horrible you don't want to have to think about it again.
For me, personally, I have no problem with what this person is saying, it's how they're saying it that means I'll never touch this project, because I've formed an opinion on the kind of response I'm likely to get if I was to raise an issue.
Why should someone use a language/framework/etc they dislike just to make something in their spare time and FOSS?
Don't get me wrong, I think Electron is a problem - but I don't blame people for choosing it. Often our FOSS development aspirations are limited by time, energy and shockingly enjoyment.
I can choose to use what I want, and you can choose to not use it.
Disclaimer: I've never used Electron, but I'm shocked it's not blatantly obvious why people would choose it.
It's super annoying when I'm looking for a desktop app and everything I find is really a poorly-disguised web app which eats RAM.
Just develop programs for X11 & POSIX: every system, from Windows to Linux to macOS to *BSD supports them to one extent or another.
Most annoying for me personally: it doesn't support proper HiDPI scaling. X11 apps are blurry on my HiDPI Wayland desktop, which makes me not want to use them.
In general, X11 is absolutely inadequate for the modern world. It's a legacy protocol that has the "any client can be a keylogger" security model, drawing primitives from the 80s that no one uses anymore plus all the history of bolting on more modern ways of rendering. (And don't get me started on the input systems, of which there are several and no one knows how that code even works.) And the protocol is synchronous, so you'll always have some slowdowns. Oh and the fucking screen tearing! In modern display systems, every frame is perfect, by design, by protocol design. X11 only has various "tearfree" hacks in the server that work with varying levels of success.
I think other programmers don't understand that many people get into front end web development because it uses other skills that writing C++ doesn't require.
Learning HTML, CSS, and JavaScript doesn't mean you can pick up a systems level programming language and start writing desktop programs.
Not everyone is capable or has time to learn other programming languages, and not everyone should try either.
Electron empowered Web Developers to be able to create cross platform desktop apps in a familiar environment.
It's not about quick or cheap, it's about using what you know to explore your ideas.
I've written my fair share of low level systems languages but if I needed to write a cross-platform GUI app I would write it in electron no questions asked.
Sure there's cross-platform UI applications out there like VLC, but like you said web technologies are maintaining attention right now and DO provide a lot of benefits.
I, like you, would not be embarrassed in the slightest to release something in Electron. I know about its bloat. I'm also aware that it means I can create a good looking application without spending a ton of time trying to figure out how to implement it.
But having worked with that for a decade - I have to agree with you. If you work for customers (as opposed to in-house software), it makes much more sense to use the web technologies for that.
We use Go for the backend though, so you can use a "real language" on the backend.
I do have some hopes for Go on the frontend as well with webassembly. :)
Interesting, that's exactly what I'd say about your comment...
The way I interpret the author's point is, with a lot of real-world programming/engineering experience also comes the appreciation of tradeoffs and priorities. Like, people don't use Electron because it's well-designed or efficient, but because it allows you to quickly and easily create new software that mostly works mostly everywhere. If you can come up with a better alternative, or substantially improve Electron, you should definitely do it!
Electron made many trade-offs indeed but writing "this is electron based so I'll not use it" and "great idea but unfortunately built with Electron, so I closed the tab" kind of comments on every bloody HN thread is extremely tiring.
Current GUI programs running on my computers:
- StumpWM :: not Electron
- emacs :: not Electron
- Firefox :: not Electron
- st :: not Electron
- Chromium :: not Electron
- dunst :: not Electron
- redshift :: not Electron
- xautolock :: not Electron
- nm-applet :: not Electron
From my own perspective, 'most desktop apps' are not written in Electron.
Can't tell if this is a joke or not.
Flash was a browser plugin allowed to run by default.
How are they even REMOTELY similar?!
There are legitimate technical grievances with Electron, but how many time must those be expressed? If we data mined every Hacker News comment for negative comments about Electron would it be considered big data? I just don't think the persistent Electron criticism for each and every Electron app is very productive.
As other commenters have expressed. If someone could provide an example of an alternative to Electron that provided the same affordances (multi-platform, open source, permissive license, proper web view support), then by all means.
Not everyone is Spotify and can invest the technical know how to make things with Chromium Embedded Framework. To this day the Linux client for Spotify is not an officially supported client. It is something the Spotify developers maintain of their own volition.
And QT, a popular window toolkit, is quite expensive unless you release your software under GPL (at which point you can use QT for free under the GPL license).
Also, a single maintainer does not have time to work on three or more window toolkits for their app (Windows Forms, Cocoa, and GTK).
> web view
https://docs.wxwidgets.org/3.0/page_class_cat.html#page_clas...
However, a "web" view could be interpreted in many ways; are you just looking for an easy way to layout formatted text/images/etc? Many toolkits (including wx) have lightweight HTML widgets.
If your app doesn't actually need a "web view" (many don't), Tk is easy to use[1], has strong cross platform support, is BSD licensed, and bindings are available in many languages.
WHY do people keep repeating that?! Qt is NOT under GPL, you do NOT need to release your software under GPL to use it!
If you don't want to abide by the LGPL requirements you will have to fork out 459 USD a month. For an established development company this is not a big deal, but for a side project?
LGPL is mostly a problem on iOS, since as far as I know it collides with App Store licensing rules, but not that big a deal on desktop platforms.
Every time until it's no longer used. JavaScript delenda est:
https://news.ycombinator.com/item?id=11447851
> And QT, a popular window toolkit, is quite expensive unless you release your software under GPL
'Doc, it hurts unless I do this.'
Then do that! Don't be a software hoarder.
> Also, a single maintainer does not have time to work on three or more window toolkits for their app (Windows Forms, Cocoa, and GTK).
As I mentioned elsethread, X11 & POSIX are supported on Windows, macOS, Linux & the BSDs. Just write against that, and you're done.
The fact is that Electron is a good platform for ONE application. Once everybody jumps in and makes their application with Electron, and all applications running in your machine are electron, then you as an user have a big problem, basically no battery life.
I wrote an incomplete PopcornTime clone with QML, I've also practiced by cloning the UI of some known apps such as Slack and Spotify, it was very pleasant and immensely saner in terms of resource usage of the machine. But alas, yes, you need to know C++, and that means you need to know about memory managenent and fine details of how things are done under the hood (although maybe that one is not a bad thing at all...)
That's a huge cultural problem right there. Some devs seem to think that their software is a special masterpiece (obviously, since it's made by an ensemble of rockstars), and therefore it'll run alone on users' computers. But that's nearly never the case; even the least technical users run many applications at the same time. Unless you're writing a fullscreen videogame, your software should never assume it has 100% of machine's resources for itself, and these days, even most videogames shouldn't.
(Or, in other words, tragedy of the commons.)
Only if the conclusion was arrived at independently and wasn't a product of groupthink. Software development is extremely prone to groupthink and exaggerated dogmatic thinking (blind hatred for PHP (and Javascript up until SPAs became a thing), religious wars over linux/mac, your text editor of choice, language of choice, OOP vs FP and so on). Often an idea catches on and suddenly a large percentage of vocal developers are all echoing the same sentiment.
Electron is a memory hog and a weird platform given it ships with so much overhead, sure. But it's fast to develop on, and with modern machines you can run multiple electron apps at the same time. There's just no viable alternative - building a cross platform desktop app without it requires going back in time 20 years and having to learn a bunch of complicated nonsense about memory management and object lifecycles (and I'm saying this as someone who knows said nonsense fairly well) just to draw some buttons on a screen. And all that effort for 1/10th of the UI flexibility that HTML/CSS/JS affords you.
In other words, electron is OK because the alternatives suck. That doesn't mean it's good but it's the best of a terrible bunch.
learning a second layout system just for desktop apps is going to be a bit of a hurdle for gaining dev enthusiasm.
The attitude this person portrays seems to fit in line with that. Defending your position with arrogance and irritation shows everyone a great deal about you.
I'll go ahead and lump myself in with the rest of the group that remains thoroughly unimpressed.
Visual Studio Code is amazing. I started using VIM on my Amiga 500. I use VS Code 90% of the time now.
RStudio is and was life changing for programming R
I use Discord everyday and use it as a real time Reddit for many non-gaming communities.
Time saving is a huge factor in why apps are developed. There is always a balance between performance/resource usage and development time.
Your talk of balance is ironic considering the subject. It's absurd that a single blank window with no content should spawn multiple processes and consume over 100mb of memory before any logic has been added. Demanding better would almost certainly be met with calls of selfishness so I'll settle with contempt.
When your dev machine has 16gb RAM and at least a quad core processor, you're not exactly going to be benchmarking how well you manage memory space or complexity of execution.
Electron does allow people to build projects quickly using simpler HTML/CSS/JavaScript technologies than prior-era desktop applications, and you get cross-platform for almost nothing.
Free cross-platform is a good thing, I agree, though it comes at the cost of lowered interoperability and inconsistency with other applications and OS's conventions - which is a big usability issue. But the "build quickly using simpler web technologies" part? That's a problem right here - it essentially makes it easier to create low-quality cookie-cutter app, instead of forcing people to do this well. It's not that much more effort to learn something beyond JS, but it seems that these days a lot of devs think their education ends at their first job.
Could have been gchat if google had any clue how people work outside google. Instead they’re trying to write my emails for me.
To be fair: the high-and-mighty types that create issues saying that using Language/Framework/Architecture X is bad and that you should use Y is another reason why working in IT or contributing to FLOSS is so draining at times.
> What if I am religiously opposed to using Electron for any and all purposes?
> Then you are not the target audience of this program. See mps-youtube (link above) for a similar program that will not taint your machine with a library you happen to dislike.
> On an unrelated note, highly polarized opinions about languages and frameworks are characteristic of people who lack real-world programming experience and are more interested in building an identity than creating computer programs.
The phrasing of the question is unnecessarily offensive, but whatever. The Q and A stands alone just fine. They really didn't need that second paragraph jab at Electron-dislikers to make their opinion of such people clear.
It's not. People who have grievances about specific platforms and frameworks should complain (or, in the case of Electron, submit patches) to the actual project than whine about it on the issue tracker of every project that uses it.
Picking Electron is ALL about developers. Nothing more or less.
What's arrogant is ignoring that it's 2019, hardware can easily do multiple electron clients, and frequently do. Nobody has made better, and in the real world you use what's best designed to complete your goal.
However, there are some use-cases when some specific technology for building it as a PWA is unavailable and therefore, building it with Electron might be the best alternative. But as a result, the author shouldn't just state that you are the problem ('... not the target audience'), but instead, state his reasons for choosing that technology (e.g. why he is using Electron instead of building a PWA).
Totally agree. The problem is the biting Q&A is misconstruing such moderate opinions as religious zealotry and then mocking the people who hold them.
> Then you are not the target audience of this program. See mps-youtube (link above) for a similar program that will not taint your machine with a library you happen to dislike.
Which would be fine. It even goes the extra step to recommend an alternative, which is unnecessarily gracious.
How incredibly arrogant. It can't be that people have legitimate grievances with elecron, like not wanting to use a program based on an incredibly bloated and poorly designed platform, oh no, they just "lack real world experience" and are "more interested in identity" (whatever that means).
High-and-mighty types like this are exactly why working in IT or contributing to FLOSS is so draining at times.