17 ms·
As much as HN hates Electron, it's probably one of the best things to happen on desktop, especially on linux desktop ironically. It works, it's beautiful, it's
by thiht 9y ago
As much as HN hates Electron, it's probably one of the best things to happen on desktop, especially on linux desktop ironically.
It works, it's beautiful, it's easy to use, and unlike many people here, I believe the HTML/CSS/TypeScript/React is rock solid and the closest thing to THE solution to the UI problem.
- factorialboy 9y agoI agree it works quite alright - not perfect, but nothing's perfect, right? Of course there are some poor implementations (Slack) and some really good one's (VSCode). Criticism of the platform for the deficiencies of an implementation feels a bit lazy.
- beojan 9y ago> one of the best things to happen on desktop, especially on linux desktop ironically Not by a long shot. It's one of the worst things to happen on the desktop, because people who would have built a proper desktop application just wrap their web app in Electron instead. It's particularly bad for the Linux desktop, where people are used to small binaries that use the system-wide Qt or GTK so they load fast, and use little RAM.
- yoz-y 9y agoI think the idea is that most developers would not make a proper desktop app, and without electron there would just be not app at all. But I think that Electron is a short term good which will cause a lot of long term "bad".
- beojan 9y ago> I think the idea is that most developers would not make a proper desktop app, and without electron there would just be not app at all. Precisely, people will just use something else. The proliferation of Electron apps splits the user base, so there's less incentive to develop a proper desktop application.
- stelonix 9y agoWhen you look at the Linux desktop software stack, I can't condemn anyone for choosing js+html+css over what's available. There's no consistency between the dozen "toolkits", each one with its own way of doing things and a lack of interoperability. If you ever had to work with X11's concepts of drag'n'drop, windows, input etc. you probably know what I'm talking about. Dozens of toolkits, few of them talk to each other. It's a mess. Electron just works. People who would have built a proper desktop application simply don't because the tooling, the environments, the standards (and lack thereof) are awful. The whole concept of "toolkits" is what makes the situation a complete mess.
- beojan 9y agoAdmittedly (as a Plasma user) I'm a little biased here, but the answer is to just use Qt (Widgets) and move on. QGnomePlatform and QGTKStyle means Qt works just fine in a GTK-based desktop, while the reverse just isn't true. Unless you have a good reason (in which case, you'll know), you can just ignore everything other that Qt and GTK.
- stelonix 9y agoIt's not just about development, there are numerous applications built in different toolkits which many of us use everyday. Some of these apps are closed source, so suggesting a rewrite in Qt is out of question. Don't get me wrong, it would be awesome if we could compromise on any given toolkit, but do you honestly see any of them waving the white flag? Meanwhile, on Windows for example, there's a standard way to write GUI apps, standardized, well-known and consistent APIs to deal with GDI's toolkit etc. It's awful to write GTK apps just as it's painful to write in pure WINAPI GDI, but GDI has the advantage of being the default, so that "native look" is consistent across most applications since the 3.1 days. Then comes the community: we have 20+ years of GUI programming happening on Windows, most people simply stick to GDI + self-made custom controls. The outcome is a huge knowledge base that helps get anything and everything done on Windows. Here in the UNIX world over the same time period the GUI developers are spread among different toolkits, so we have many "ok" people in a dozen toolkits and few experts on each one.
- afarrell 9y agoCan you point to a solid Qt or GTK tutorial for newbies?
- thezoq2 9y agoPeople who built proper desktop applications didn't build them for linux. Even microsoft are releasing their electron things on linux (skype and VS code). I very much doubt that would have happened if they built native apps. I much prefer the ability to running a slightly inefficient program over not having that program at all.
- deadbunny 9y ago> because people who would have built a proper desktop application just wrap their web app in Electron instead. Except no-one would have built clients for the linux desktop. Go back before Electron and count how many official clients for Linux there were from major software vendors, hell I'll even take massively feature incomplete answers like "Skype" just to help you.
- nkkollaw 9y agoMost companies would never build a Linux app. One notable example is Skype: their Linux client sucked so much it was unusable until their Electron version made the Linux version just as good and modern-looking as the rest.
- yoz-y 9y agoThe problem I see with Electron (and probably one of the reasons HN hates it) is that it leverages the advances in chip making to work as well as an app from 20 years ago, but is multi platform. It is a huge productivity boost for programmers at the expense of making computers slow. On my work computer I am used to run many apps, and with each Electron app added I feel it slowing down. (latest one to switch was Skype for me). What is the point of having such powerful computers when they feel like slugs crawling through a bog?
- beojan 9y ago> It is a huge productivity boost for programmers at the expense of making computers slow. It's a productivity boost for web developers, who don't have to learn a new language, and for companies that can hire cheap web developers instead of more expensive desktop developers. It's not a productivity boost for someone who knows (or is willing to learn) .NET or Qt.
- laurent123456 9y agoUsers benefit from it too since the alternative to Electron often is not .NET or Qt but no app at all, especially on Linux.
- beojan 9y agoAs far as I'm concerned, I'd rather have no app at all (and use an alternative) than have an Electron app suck users away from the potential native alternative.
- akerro 9y ago>best things to happen on desktop, especially on linux desktop ironically. No, the best thing was flash.
- tjoff 9y agoOne of the best thing to happen on desktop? I can't think of anything good that has come out of electron. Seriously. Maybe slack (haven't used it) but that is probably about the worst use case for electron imaginable and would be utterly trivial to implement in a proper language natively.
- pcr0 9y agoApps that work just as well across Mac/Windows/Linux. Among terminal emulators for example, Hyper is the only one I can think of.
- tjoff 9y agoFor multi-platform to be worth anything it has to be good for something. Why would I care that an app I don't want to use can be executed on several platforms?
- thiht 9y agoYou're not representative of the development world as a whole. You not wanting to use anything electron related is irelevant to its actual success. Don't forget HN is a bubble : Electron is very much appreciated outside of this particular community.
- tjoff 9y agoAnd what particular javascript-centric bubble are you part of? Again, what electron-apps do people appreciate? There might be tons, I just haven't seen anything usable.
- thiht 9y agoVSCode has been cited dozens of times on this thread only, and is probably one of the best Electron apps. I personally like Insomnia, Postman, Nylas, Discord, Git Kraken. Not seeing "anything usable" is pure bad faith.
- simias 9y agoIn my experience (with apps like spotify, the signal client and a couple of others) it's only marginally better than running a Windows app through wine as far as the user experience is concerned. It doesn't integrate very well, it uses a shameful amount of RAM etc... I'd much prefer if these companies used open APIs (some do) and let the FLOSS crowd make clients if they cared for them. I've replaced the spotify application with librespot lately and it works very well, although it lacks a UI so I have to use my phone as a remote. I'm also currently using the signal electron client which works okay but uses an order of magnitude more RAM after a few minutes of runtime than my irssi that's been running for months. It also doesn't have better usability if you don't like clicking everywhere and prefer keyboard control. I don't hate electron, it's just "okay". It's a symptom of the webification of the world as web technologies make a foray into the desktop and server space. I think a framework like Qt is objectively superior, both from a developer and user perspective but I'm sure these days it's probably easier and cheaper to find webdevs than Qt devs and it's all that matters.
- dmitriid 9y ago> let the FLOSS crowd make clients if they cared for them. I've yet to see FLOSS crowd come up with a remotely useful client for anything. Event in the days of much simpler APIs and apps like IRC FOSS apps were universally meh.
- simias 9y agoI'll take weechat/irssi over the signal client every second of every minute of every day. Super small footprint, I can do everything with the keyboard, I can script it, I can run it on a server in SSH, I can customize it any way I want. Meanwhile on my large screen I can barely see 10 messages in the backlog of the signal desktop client because it feels the need to emulate an SMS UI (you can even select if you want it to emulate the Android or iOS UI, how cool is that?), I still haven't figured out if you can create groups in the desktop interface (given the very small number of options available I don't see how I could miss it, maybe it's simply not possible). The input box has english spell checking enabled by default which is pretty distracting when I'm typing an other language since everything gets underlined, I haven't found a way to disable it or change the language. The other day I had to use the Discord webapp for something, what a joke. On my pre-quantum Firefox it was laggy as hell, there was a noticeable delay sometimes while I was typing text. Maybe you'll blame Firefox for being too slow but we're talking about an actual text chat here. It does look better than a terminal window though, I grant you that. Maybe I should print it and frame it somewhere in my office.
- rimliu 9y agoCan you expand on why you believe so? Also, what other solutions have you tried (beyond "Hello, World!”)? The reason I ask: I have 20 years experience with the web tech (and yes, that includes current stack) and almost ten years experience with iOS and eveytime someone says how good web stuff is for apps I just want to shake my head in disbelief.
- chasote 9y agoI'm glad to see this at the top. I do wish though that more Electron threads on here and r/programming would talk about the actual developments happening instead of the constant memory usage complaints back and forth. It's funny, I try Vim and I like it. HN convinces me to try Emacs and I like it. I'm not supposed to like Electron apps but I try VS Code on my 4+ year old chromebook with 2gb of ram and it runs just fine and I like it. Same goes with Slack. Seems pretty damn good to me. This all repeats itself when it comes to programming language debates too. Is something wrong with me if I'm interested in vim, emacs, vs code, python, js, elm, go(!), haskell, rust, and racket? Am I just too inexperienced? Will I develop to have only one true religion or is there just something HN and r/programming brings out in people for these constant "one true correct way" debates.
- Aaargh20318 9y ago> I try VS Code on my 4+ year old chromebook with 2gb of ram and it runs just fine It probably does, if it's the only thing you're running. I know developers think their app is the best thing in the world but they have to realise it's not the only thing running on my machine. RAM is a scarce resource on my dev box.
- twtw 9y agoNo, this is good. Don't get caught up in the Vim-Emacs wars or any of the language wars - they are mostly a waste of time. Recognize that languages have "areas of expertise," but these often overlap. I get mad about Electron because it seems that we should be able to solve the problem without running a web browser for every app. It's unfortunate that Electron is so much more appealing than more efficient alternatives. I wish we could end this trend of software efficiency declining to compensate for hardware improvements.
- Aaargh20318 9y ago> I believe the HTML/CSS/TypeScript/React is rock solid and the closest thing to THE solution to the UI problem Really ? Because rendering HTML/CSS is an extremely complex way to render a UI, and it was clearly never designed for it. HTML was intended to add markup to documents, not build user interfaces. It lacks the most basic layout primitives you want to use in a UI and a lot of behaviour is either not well defined or not well understood, mainly because it's unreasonably complex. It's easily the most complicated way to build a UI we have right now, which is why we need all those stupid frameworks built on top of it to make it somewhat usable. HTML is and has alway been a huge mistake for building UI's.
- rootlocus 9y agoIt's easy to learn, easy to make and easy to distribute, (at least in the beginning) which is why a disproportionate number of new developers start with web technologies.
- Aaargh20318 9y ago> It's easy to learn, easy to make I disagree completely. It's easy to get a 'hello world' type thing working in HTML, sure, but it's very hard to make something behave like you want. Traditional UI toolkits are much simpler and easier to understand.
- lou1306 9y agoExhibit A: CSS centering. Exhibit B: The so-called "Holy Grail" layout. [^1] [^1]: https://en.wikipedia.org/wiki/Holy_grail_(web_design) https://en.wikipedia.org/wiki/Holy_grail_(web_design)
- bfrydl 9y agoThis is really out of date. Even IE11 supports flexbox. It is trivial to center things both vertically and horizontally, and easy to make a “Holy Grail” layout. If you don't need to support IE11 you can use CSS Grid and do the entire layout in one or two CSS properties.
- deleted 9y ago[deleted]
- giancarlostoro 9y agoI've been saying this the past few days among coworkers. The one thing Electron proves is that GUI programming is still not where it could be all these years of innovation later, if that were not the case it wouldn't be used as often as it has by as many companies who build their products around it. The reality is that Electron provides solutions to problems that the browser has had to solve for quite a while now: cross-platform development, and gives you a way to write code that already accounts for most of it taking away many of the cross-platform pain points.
- dvfjsdhgfv 9y ago> As much as HN hates Electron It's not that "HN hates Electron", but some competent programmers, especially ones who have experience creating desktop apps, point out that Electron apps are huge resource hogs. It's not about having an opinion, rather stating a fact.
- thiht 9y agoYeah, and Electron programmers and users are incompetent. Very constructive. Maybe these competent developers don't realize that lots of users don't care if their app use 100-200mo on an 8Go laptop. Nor do they realize that memory usage is one indicator among a few others that are as or more relevant to the various contexts: productivity, talent pool, cost, maintenance, etc. Trade-offs have to be made, Electron is one.
- dx034 9y agoIt's not that users don't care. They just stop using it at some point. Most people don't know about memory or processor speed but that doesn't mean they will keep using a program that slows down everything on the computer. In the work environment (non-tech) I experienced several times that people complained about bad usability and apps slowing down the computer. More often than not, those were Electron apps. But the standard corporate solution is to just upgrade computers to 32gb ram and even faster processors. Not sure if the faster development speed in Electron still saves money then. Don't get me wrong, I think Electron is generally a great idea. VSCode works great. Similar to websites, slow performance is rarely a fault of the underlying technology, it's a result of programmers not caring about performance.
- nottorp 9y agoWhere are those 100-200 MO apps? The Electron apps i run because i have to are more in the 500+ M range...
- rootlocus 9y agoTo be fair, Discord only uses 150 - 250mb on my windows machine during regular usage like text chat, gif meme sharing and even youtube video streaming.
- gameswithgo 9y ago>I believe the HTML/CSS/TypeScript/React is rock solid and the closest thing to THE solution to the UI problem. If it is then we have failed horribly as an industry. We can do so much better, and we should strive to.
- b3b0p 9y ago> it's beautiful Beautiful is in the eye of the beholder. I much prefer consistent UI look and feel and Electron, may come close, it has it's nuances. It's probably my number one gripe. I'm on macOS though, so it could be different on your Linux desktop environment of choice or Windows. I still prefer TextMate 2.
- solarkraft 9y agoMaybe it is. But bundling everything still seems wasteful. A react native equivalent for desktops would in my mind help. The Linux irony hurts.
- jrs95 9y agoTo me it's like the junk food of software. Convenient, but it's hard to make an argument for it beyond that IMO.
- stephenr 9y ago> especially on linux desktop ironically I don’t know what the goals of the electron team are (unless they have shares in power companies and thus want CPU’s running at 100% everywhere) but I doubt their goal was making “desktop apps that aren’t available on linux”. That’s the only way this would be irony.
- neilalexander 9y ago"the closest thing to THE solution to the UI problem." The problem is that it isn't the solution to the UI problem. It's just yet another way in which developers can mindlessly fragment it even further. For example, take Slack, Riot, Atom, VS Code, Keybase, etc. Not one of them makes an attempt to look like the host operating system. They don't use the native UI toolkit of the host platform. They don't even make any attempt to follow design conventions of the host platform. Let's take macOS. In just about any text field in any application, you can right-click and get access to spell checking, substitutions and transformations. You can get macOS to read out the text you highlight by speech synthesis. Except for in Electron apps. Why? Because the text entry fields in Electron apps aren't typically native text entry fields. They're merely imitations and bad ones at that. Also none of these Electron apps look or behave like each other either. Every developer has taken it upon themselves to play UI designer (almost always badly too) and to create their own buttons and their own sidebars and their own menus and their own controls and not a single one of them looks or feels like a first-class citizen in my operating system. So the learned behaviour I've collected from 15 years of using Macs is now suddenly useless in Electron applications. Why? Because either developers want to cut corners, or some incompetent project manager wants 3 platforms supported by last week, and by the way, fuck your users, I need this done. As with everything web-based, design and function are too closely intertwined and the result is consistently mediocre (if not terrible) user experience.
- my_ghola 9y agoMobile has react-native. What about desktop? I see this: https://github.com/Microsoft/react-native-windows https://github.com/Microsoft/react-native-windows for Windows. I wonder if something like that could be done for Qt?
- 2aa07e2 9y agoI once wrote something along those lines on /r/linux. I got downvoted to hell and decided to delete that comment. I'm not a system programmer by any means, but I consider myself well-rounded enough to be able to appreciate useful technology. CSS grids and responsive @media, e.g. [1], are a useful addition to native applications design. [1] https://github.com/MartijnCuppens/rfs https://github.com/MartijnCuppens/rfs