1519 points · by charlieirish · 9y ago · 996 comments
Nobody in the last 5-10 years cared about writing Desktop apps before Electron came along, there's basically zero money in it, and it's massively expensive, both in terms of actual dev time per feature (easily 10x the cost), and also in finding specialist developers who know these dated technologies. And as for Qt, Qt has existed for over two decades - if its massive "Beatles walking off the plane" moment hasn't happened by then, sorry, it's not gonna.
But now? People are making all kinds of great new apps, and more often than not, they come out on all three platforms. People are excited about the Desktop again - Electron is so good it's single-handedly revitalizing the platform that two of the largest tech companies in the world are behind, yet couldn't do.
That is a Big Deal.
The underlying issue here is that Electron reduces the barrier to entry for cross-platform development. That is, it's cheaper to build a single cross-platform application in Electron than it is to build two or three native applications, and you can re-use your existing web experience. I can completely understand why companies might choose this approach.
The trade-off — and there is a trade-off — is that Electron applications are shite in comparison with proper native applications. They fail to integrate with the host platform, they are slow, they hog memory and drink power. It's fine to make those trade-offs – in some ways, it's better that you can get an application at all than the alternative of 'no support for your platform'. But let's be honest here – there is nothing preventing e.g. Spotify or Slack from building native clients for each platform they support, and I find it difficult to believe that the costs would be prohibitive.
There may be an interesting economic lesson here: it really is not that easy to externalize costs. It surely can be done (air pollution), but it requires some special circumstances for those costs not to be internalized in a different form. (These special circumstances might include information asymmetries, harm to a public good, enjoyed by people other than a firm's own customers, etc.--themselves classic risk factors for market failure.)
By the same token, there probably are some truly externalized costs in this example, but I would expect them to be very minor and indirect. For example, most people probably do not pay the 'true' cost of their electricity. So to the extent electron wastes power, some of the cost will be internalized in the form of user dissatisfaction. But some will also be externalized either because the user doesn't know about the extra power consumption, or because the user herself doesn't fully internalize the costs of her power consumption and therefore doesn't care as much as she might if all costs were properly internalized.
GitHub, Slack, Spotify, Microsoft, etc., are all using Electron. As their developers gain experience with the platform and as they experience problems with resource usage, I would expect to see the platform improve. Maybe I'm wrong.
That is definitely not the whole story. Costs are shared between developers and users. If it's more expensive to develop an app, you can bet it's going to cost users more too.
Is that true from a user's perspective? The average user I know would not have the idea that Slack is somehow inherently worse than say MS Word or any other truly native app they use everyday. What would Slack gain by integrating better with my Mac?
Slack starts up too fast for me to read the little quotation (penultimate Macbook Pro). I actually wish it was slightly slower because I like those cheesy quotes when I can catch them. Everything feels almost instant. Not bash instant, but as fast as any mainstream messaging app.
I leave it running all the time and get what feels like normal full hours upon hours of battery life. There are apps or browser tabs that I've noticed destroying battery life, but Slack nor Atom nor MS Visual code are on that list for me.
The anti-Electron complaints all kind of feel like the same argument that comes up as each new layer of abstraction gains acceptance. I'm sure there's a lot that Electron can and should improve. Running multiple copies of Chrome does sound awful, but until I read that I didn't know the atrocities it was committing.
Just doesn't feel productive to try to make Electron go away vs. working to improve it or create a better cross-platform abstraction.
It is for this user.
> What would Slack gain by integrating better with my Mac?
Far better resource management, one would hope, for starters. As the article pointed out, when you're measuring your IRC client's memory use in hundreds of megs, there's a problem.
It isn't uncommon for me to need to choose which "essential" apps to turn off to get something done on a maxed-out MBP. So Slack gets turned off, and maybe someone gets annoyed that I don't respond to something, while I run a few VMs in Slack's former memory space.
As far as other things, well, using a platform's capabilities as appropriate is generally considered good form - HCI concerns, and, generally, just people like things to be consistent. I don't know why we're supposed to forget this now.
I personally don't care if Electron goes away or what, but to the extent that I'm forced to run Slack by my cow-orkers' choices, it sure would be nice if it were less of a bucket of ass.
As a native Mac developer I can drop in things like a predicate editor for defining filters or queries. They come with Cocoa. I can put in sophisticated table views and tree views. I can connect all of this easily to core data which loads from a database objects on demand without any code needed to be written by me.
You see this sort of shortcuts in the electron apps I've seen. They don't have proper GUI for preference configuration like any Mac app as they can't get that for free. Atom doesn't have a regular file open dialog. I use that a lot, dropping a file into it to jump to a particular location I got open in Finder (file manager).
My preferred editor, TextMate has very little development resources behind it compared to Atom, yet it has a far richer GUI. You got a GUI for creating and editing plugins. Not just editing config files. You got native rich UIs for selecting fonts and colors. You don't have to write font names and color names in some config file.
There is a certain irony in the claim about how stuff like Electron saves you cross platform code, when what is usually not cross platform is the GUI, and the electron apps I've seen has very little of it. Try making something with the complexity of Keynote, Pages or Numbers in electron and I think the lack of a comprehensive set of prefabricated GUI components will start making its mark.
Not to mention the numerous native APIs which exist which you have to duplicate, e.g. for vector graphics, animations, 3D graphics, audio, video, font handling, OpenCL.
How about people with disabilities or internationalization? You got great native tools for doing that, how do you accomplish that in Electron without re-inventing the wheel?
This includes chrome and electron based stuff
The problem here is the base platform Electron and underlying Chrome/Nodejs
But as consumers we feel when our browser lags, so browser vendors optimize speed over memory and cpu, caching the shit out of everything. The Web is a dangerous place so they further isolate every tab as process, sandbox them and keeps lots or copies of the same thing in RAM because a security flaw is a lot more shameful than a memory flaw.
You are right, electron is a hog. Last I checked all, electron, chromium and Nodejs were open source. We can actually make a difference.
Making noise also makes a difference. When someone complained about VSCode cpu usage because of idle cursor and it blew on HN, next month's release had a fix (for all platform)
The truth is you can't move fast doing native development with different libraries. Electron keeps your dev costs down and allows you to move very fast.
tired of this argument. if you put in the proper effort, your users won't care or notice.
Edit: Mass downvotes; lol ... Just stating my personal experience!
Are they though? The two applications that use the most energy on my Mac - by far - are Steam and Skype. Steam still has trouble with HiDPI and freezes when performing various UI interactions. The number of problems with Skype are uncountable.
I'm currently booted into Windows for work, looking at my current process stats, the top memory consumers are:
* Visual Studio (hodge podge of all kinds of things, 800MB)
* Chrome (215MB)
* Microsoft Intune (presumably native, 114MB)
* GitHub (.NET WPF application, 108MB)
* Explorer (native, 103MB)
* Search Indexer (native, 107MB)
* Lync (who knows, 98MB)
Meanwhile, the supposedly terrible Electron apps:
* Spotify - 58MB
* Slack - 93MB
* VS Code - 60MB
As far as interfaces go, Spotify, Slack and VS Code easily outclass GitHub, Visual Studio, Explorer and Lync in usability.
Here are stats on my (Linux) box:
* atom - ~500MiB (one window)
* slack - ~816MiB
* chrome - ~935MiB (two tabs + hangouts)
* google music electron app - ~500MiB
The right benchmark for VSCode is not Visual Studio, but Notepad++ (5.9MB on my system right now).
Maybe for one of the processes, but on Windows Spotify needs at least three processes usually to run (five if you count the Web Helper and Crash Service which are probably native code). On my machine the three main Spotify.exe processes take up at least 170MB of RAM, often more. Although I wasn't aware they were using Electron as their app has a standard, native Windows menu bar.
We straight up would have not shipped it without Electron and the CPU it uses to sync is on-par with apps like Apple Mail & Thunderbird.
With electron, every OS is a third class port.
Chrome kills me. :(
So Steam was one of the first "Electron" apps. A very first one was Windows Explorer as of Shell update that came with Internet Explorer for Windows 95 (included by default in Win98). All the sidebars of Explorer were HTML based.
> The underlying issue here is that Electron reduces the barrier to entry for cross-platform development. Precisely.
> The trade-off — and there is a trade-off — is that Electron applications are shite in comparison with proper native applications.
But native applications are shite in terms of portability.
> But let's be honest here – there is nothing preventing e.g. Spotify or Slack from building native clients for each platform they support
See the part where the original post said "it's massively expensive, both in terms of actual dev time per feature (easily 10x the cost), and also in finding specialist developers who know these dated technologies". The costs may not be "prohibitive", but they certainly would multiply effort and resources, and divide profit.
Just as a counter-point, because native app fans often make this point as though it is universally recognized to be a good thing.
I don't want apps to integrate with the host platform. The host platform is not the thing I care about. I use several host platforms in different contexts (I have work and home computers and a smartphone, they all run different OSes) and I would prefer that Slack look like Slack and not have buttons in different places with different UI interactions just because that's the way Reminders.app works.
For me, the web is the host platform I care about. It's the one that I can use anywhere and only have to remember the URL.
* Text selection
* Caret behaviour (e.g. Option-arrows on macOS)
* Clipboard
* Spell check
* Open/save dialogs
* File system access
* Drag/drop
* Window management
* Accessibility (screen reader support etc.)
* Standard right click menus
* Indexing (e.g. Spotlight on macOS)
* etc.
You may be thinking to native UI idioms, which even Apple threw out the window several years ago.
Electron apps are mostly very good at the things in the above list, because the Chromium web renderer has spent years abstracting the mechanisms needed to feel native where it matters.
Non-native toolkits such as Swing and Qt also spent years trying to achieve native look/feel, mostly through emulation and host OS detection, and they still feel pretty crappy compared to Electron apps.
Slack, Spotify and friends do a good job of inventing their own "web but native-feeling" UI. An example of the exact opposite is Google Docs, which still, for all its technological impressiveness, feels like a crummy Swing app trapped in a web page. For example, Google Docs renders its own right-click context menus, which look and feel nothing like native context menus. Google Docs' mini-apps also have a menu bar and a toolbar, but it's part of the host window, so you get two levels of menu bars and tool bars.
2) If you know a platform then you should have no problems knowing how to use it.
It would be ridiculous to have an app from Windows behave exactly the same in Mac OS just because you don't want to remember the difference. You don't want minimize and maximize buttons put on the opposite side of all other mac apps because that is how it is on windows. You don't want copy paste in Slack to use Ctrl rather than command key because that is what you do on Windows.
3) Whatever time you save from doing everything the same across platforms would be wasted, for anybody not working cross platform who suddenly have to deal with an app with completely non-standard alien behavior. I want my standard mac hot keys to work in a mac app. I want preferences to be in the standard location. I want my color and font selectors to work the way they work all other places. I want drag and drop to work like in all other Mac apps.
We Mac users have seen this again and again. When companies don't give a shit about our platform, it is usually just a question of time before a competitor arrives which does, and knocks the other guy out. You don't survive that long ignoring the platform unless you got some lock-in advantage.
Why else do you think people make a big point of an app being native Cocoa? It is because they know it sells better, because they know customers want the native well integrated experience.
Actually, the incentive is even stronger than this. The ability to visit a website and start using an identical version of the app immediately is just as important - I doubt that Slack and Discord would have had half the success they did if users had to download the application before using it, regardless of them being available on all platforms.
Discord has had the ability to give links to others to join a chat server since its inception, resulting in a two-step process to use it: click the link, type a name. This is miles less of a barrier to entry than: click link, download app, find downloads, install app, run app, create account, join server (rough process for most text/voice apps up to this point).
If I were to build an app where cross-platform support was crucial, I'd probably start with Electron as well because of time and budget concerns, and switch to native if the app 'takes off'. But on the other hand, I can imagine there being serious risks to building out an entire platform that way and having to rebuild it from scratch later on. Maybe there's never budget/time for it, leaving me locked in?
I suppose React Native could help in that regard.
I can see both sides of this argument (every time it comes up)
As a consumer of apps, I want the leanest, most minimalist, fastest thing going. I want native apps on my devices (If you think slack is a hog on the desktop you should try it on Windows Phone).
But as a developer, I know that electron is a shortcut that means my app will take less time to build. I can take my existing skills, take work I've already done on a WinJS app and publish it on Mac OS, Linux and Win 7. I can spend more time with my family, instead of spending all my evenings learning py+qt, or xamarin, or react native, or whatever the new fangled thing is. And I know people will use it.
Hell, I've even got better odds of pushing an electron app than a native one, as I can submit a pull request and maybe have it appear on https://electron.atom.io/
Obviously, seeing the Electron hate always gives me pause for thought, but at the end of the day it feels like the hatred is from fellow coders (if a dribbling front-end-js writing low-life such as myself can call you writing-assembly-on-a-napkin-while-you-quote-stallman-types fellow coders) and my apps user-base is overwhelmingly non-technical.
I'm an embedded devices programmer and I'm proud of it. Proud to know a little bit about my hardware, and proud to get the most out of it. And I'm ashamed when I find a more efficient way to do something: it's not an optimisation but a bug fix.
Delivering high-quality web apps generally requires knowing JavaScript and CSS. Delivering high-quality desktop apps generally requires knowing the tools of that ecosystem. Sometimes we compromise to get things out the door, but we should be honest with ourselves when we do.
Proper this and proper that, and don't get me wrong, I agree, but parent is correct -- and that is these apps wouldn't even exist if it wasn't for Electron. It just wouldn't have been a consideration for it to be a desktop app. Instead it would have just been thrown up on the web. For example VSCode would have just been some type of online IDE clone like Cloud9 or something similar.
If you think this is nonsense, you are out of touch, and I don't mean this as an insult, although I realize there isn't a good way to say that.
Yes. Electron enables some new stuff. New stuff that wouldn't exist otherwise.
Yes. Electron is a bucket of bloat that saddles what should be small, simple apps with enormous amounts of crap that has nothing to do with the app's functionality.
Both of these can be (and are) true.
The real reason that parties like slack and spotify choose electron is because its easy for the devs they have that only really know JS/HTML.
Its not that they couldnt hire more/different devs that could do it in a saner way, its not that its too expensive or that the ROI is not good, when we are talking about companies worth hundreds of millions to billions of dollars focusing on a core market, that is just completely laughable post hoc bullshit.
Its that they dont give a shit, either about the user experience, or improving their toolset. They are happy where they are, and see no reason to change.
I think the issue is time and resources. Small teams, like Slack, would like to create a slick experience but they don't have the time.
Companies like Facebook went the other route -- HTML5 on mobile, got their fingers burnt, and went all-in on native. StackOverflow's iOS app appears to have improved a lot too, in v1 it was a thin shell around the web interface.
I hope React Native catches on. I'm not a huge fan of how 'heavy' Electron is myself.
5 years is huge when it comes to web technologies.
Subjectively, I'd say that Electron's performance overheads are not bad compared to, say, Smalltalk in the 90s, where one Smalltalk application could bring a fully loaded state of the art workstation to its knees.
And don't get me started about Flash. I had a whole project cancelled after an engineeer brought up the CPU meter during a fairly simple animation.
For those of you who aren't old enough to have been around, Sun initially pushed Java as a "write once, run everywhere" GUI language. It quickly became clear that Java applications were ugly and terrible everywhere, even in the primitive days of X11R5, when programs used a mixture of Xt, Motif, Qt, GTK, and raw X11 protocol (xv was awesome). Having a Java program for some task was worse than having no program at all, since it would discourage someone from writing a decent native solution.
Fortunately Sun found ways to make money using Java server-side, and Apple helped kill it client-side by not providing it by default.
I think Javas problem was it's Unix engineering roots, with too little focus on UI, and perhaps a little too much of the "we don't care about performance"-mindshare. The latter being the only problem I see with some electron apps.
This goes for mobile too.
It's very far-fetched to call a lower barrier to entry an issue. The easier we can make it for people to get started, the better, isn't it?
Lowering the barrier to entry is great, I agree. It's awesome that Electron and web technologies can be used to quickly launch proof-of-concept desktop apps. I find it significantly less awesome that companies with hundreds or thousands of engineers continue to use it after the concept has been proven, however!
Would you like to use an application that would not have been written without a low barrier of entry? Powerfull and easy tools are not necessarily the same thing.
Unfortunately, no. Just as a trained electrician will wire up your house so as to not set it on fire as soon as you turn on a lamp, a trained developer will make apps that use a minimal amount of resources.
Especially more hilarious if someone writing Electron apps call him/herself an engineer.
> The trade-off — and there is a trade-off — is that Electron applications are shite in comparison with proper native applications.
There's nothing inherently electron-specific that makes an app "shite" any more than writing one in Qt would. You can write shit in any language, framework or platform. The day someone invents a system that protects us from our own stupidity will be the day humans become obsolete.
> They fail to integrate with the host platform,
Untrue. You can—if you need to—integrate with the host platform by writing a native node module, however it becomes less cross-platform at this point.
> they are slow, they hog memory and drink power.
Yes web apps use a bit—sometimes considerably, depending on what you do—more memory, and a bit more CPU (and hence bettery), but they are not perceivably slower, unless you're doing something stupid (in which case the equivalent Qt app would probably suffer in the same way).
> But let's be honest here – there is nothing preventing e.g. Spotify or Slack from building native clients for each platform they support, and I find it difficult to believe that the costs would be prohibitive.
Maybe, maybe not. I think using a cross-platform solution wouldn't be ideal for them (they'd need to either rely on something like Qt, write their own rendering engine, or use something like SFML; all of these are overkill compared to Electron), and the alternative is writing it in different languages for each platform, which would probably inevitably cause the projects to get out of sync in one way or the other over time.
in my opinion this is an hiring problem, they assume that if you know javascript you can be spendable on more things and not only on the desktop to write an application.
I get the feeling that UX and UI designers for web- and mobile apps are just a different breed than their native desktop equivalents. It might just be my Windows bias though, iirc Windows didn't have a strong / great UX guideline until their current one came around - and I haven't used many modern windows apps yet, the ones I do use are stuck in the 90's with their button bars and such.
This is despite their mobile apps being the most minutes used apps of any company. Even then, they tried to go with a electron-esque approach and only backed off when the performance and UX tradeoffs became unacceptable.
If one of the most profitable companies in the world can't see the business case for supporting a first party desktop ecosystem, it's very hard to believe many other companies have the justification.
This isn't an engineering problem, it's a business problem.
There are some applications that do try so - 1password, GitHub for Mac/Windows to name a few that come to mind - but they seem to get less love than the cross-platform webapps. It feels like they get a certain amount of dev time before going to minimal maintenance mode.
In any case, the originator of the phrase, Knuth, specifically said that it related to "small efficiencies".
Nobody would call Electron's efficiencies that need to be addressed, "small".
There's a good discussion here: http://wiki.c2.com/?PrematureOptimization
A single page web app?
That's all most of these are. Particularly the Slack/Hipchat/Discords of the world.
> People are excited about the Desktop again
If by desktop, you mean "need to be connected to mains power to run for more than 10 minutes", yeah, people are excited for desktops again.
Electron only really makes Javascript developers happy; they don't have to learn another language or framework to make "desktop" apps now. As a consumer, I fail to see the value in having to download large single page webapps that are equivalent (or worse) than their online counterparts.
Cross-platform applications like Chrome and Firefox and Steam and Doom and Factorio and... these have existed for years, and so have cross-platform programming languages and frameworks. Java, TCL, Qt, Flash... Electron is simply the lastest in a long line of cross platform frameworks, which is currently in-vogue with developers solely because it uses HTML and JavaScript.
I use the Slack app for Windows, and the value for me is that it gets its own easily identifiable presence in my Windows task bar.
I have a (self-inflicted) problem with tab proliferation, and because I rely heavily on Slack, it's just way more convenient to use the self-contained version than to have it running in a tab buried in one of my browser windows.
It doesn't bother me at all that the Slack app is an over glorified web browser running the Slack web client.
It kinda should, though, because if the browser component isn't up to date on the regular then it's possible you're looking at (what should be) a simple chat app with a potential RCE.
"actual dev time per feature (easily 10x the cost)" Yeah seriously what PLANET ARE YOU ON!!! I can make native app functionality in a fraction of the time it takes to do it in a horrible mess of a language that is JavaScript. Poor type system, shitty REPL, shitty module support, shitty debugger. Shitty GUI design tools. Shitty performance measurement tools.
"And as for Qt, Qt has existed for over two decades" It is C++, and we got great alternatives on Windows and OS X. still if you have to stick to C++, then Qt is probably the most widely used GUI toolkit.
"People are excited about the Desktop again" I don't know what bubble you live in. This is just a bunch of hipsters who are excited because they can suddenly use their only programming skills to hack on desktop apps.
Lets get real, this is all about the numbers and not the technology. Due to the the need for lots of custom made web apps, there is a huge population of JavaScript developers. These can now be utilized for desktop app development. It isn't like it wasn't possible before, it is just that these guys could not be bothered to learn anything else.
And it isn't all that important. Hardly any of the applications I use daily are Electron. I occasionally use Atom. Other than that great apps like OmniGraffle, Pages, Pixen, TextMate, Ulysses, Marked 2, Charles, Dash, Kaleidoscope, Tower, Keynote, GitUp, 1Password, Magnet, iBooks, ScreenFlow, Terminal etc none of them are electron based.
Why is Electron and similar so popular then, if it's easier to build native? Please don't say "because shitty hipsters".
Advanced native tools with a powerful language in the hands of a master programmer will be much more productive for the reasons he cites. The type system in particular, with a well-worn toolbox of primitives can make you extremely effective.
So, web technologies are more effective in aggregate across the entire industry, but native technologies can be more effective in the hands of an experienced single individual.
A higher barrier to entry has that effect. Low quality crap doesn't get in as easily.
>Nobody in the last 5-10 years cared about writing Desktop apps before Electron came along, there's basically zero money in it, and it's massively expensive, both in terms of actual dev time per feature (easily 10x the cost), and also in finding specialist developers who know these dated technologies.
I find this argument absurd. Desktop (and mobile native) apps are multi-tens of billion business. Ask Microsoft, Apple, Adobe, and thousands upon thousands of smaller businesses (down to SMEs like Panic and one-man-shops like Sublime Text).
If anything it's those web-based unicorns that are either merely burning VC money, or selling the user to advertisers -- in both cases, there are not much money in selling them directly.
And there's nothing about web development that couldn't be achieved just as easily if instead of all those money on browser engines and teams to create things like Dart, there was some effort towards a nice, cross platform, mobile and desktop UI library.
It could even have JS bindings for all web devs to use -- just without the web stack crap. React Native is something akin to that, but imagine if it had been going for years, and had more industry support, instead of the nth attempt to put lipstick on the web stack.
In the meantime, here's one of those "web-based unicorns" you so despise: https://www.google.com/finance?q=amazon&ei=viTtWMGfNMWQ2Aa42...
You know what's never going to go out of fashion? Performance. Especially since CPU speeds have stalled in the last decade. you will never get good performance if your design is: "embed an entire browser, and then use a small piece of it"
Wut? So the whole Mac App Store, MS Office Suite, Adobe's apps, many other stuff were just a dream? Until Electron desktop was dead? You're bending facts here, and I hope that's because you don't know much about the stuff you're talking about.
Desktop is big, just that other things have grown bigger. That doesn't mean desktop is/was ever obsolete or losing it's utility.
Electron is just a way to reuse web developers for desktop development - I.e. a way companies now have to cut development costs.
It is and was, however, always built on Chromium Embedded Framework (the UI), even when you say it "was" fast.
So according to you Spotify was able to build a full featured client using a beta technology in a month. Impressive.
Anyway, here's the version I'm speaking about, built by the people that developed uTorrent IIRC, by the way: http://static.filehorse.com/screenshots/mp3-and-audio/spotif...
Also even if the current version is not using Electron, it's still using Chrome, so the same argument applies.
Yeah... I opened a 500KB log file in vim and Notepad++ and they are using 5 MB and 7 MB of RAM, respectively. They both also manage to use no measurable amount of CPU (even to blink the cursor!) unless you interact with the window.
What Electron did is it enabled all those web devs (even front end guys) to write "desktop" apps. And trade offs are certainly visible.
I am boycotting Electron. I have zero Electron apps installed, and recommend strongly against it. I hate that web dev mindset that has been pushed into desktop userland. It just doesn't work that way. Write native desktop app yourself and you will see how wrong it is.
They are very very close to each-other. Obviously they are not exactly the same, and I used QT in this example. But they are not wrong, or completely different.
> How is React + browser rendering any different then QT rendering?
Qt has far less overhead. A small Qt program can be in the single digit megabytes in both disk and RAM consumption, while using near-zero CPU for the UI.
> How is HTML/CSS any different from QT layout xml?
My understanding is that Qt's layouts are translated to native code at compile time, resulting in native performance and overhead on desktop. Browsers' dynamic rendering is relatively intensive and expensive.
> How is QT sockets/threading any different from NodeJS sockets/threading?
When it comes to I/O I don't think there's a significant cost to using Node/V8. I'm totally fine with CLI applications written in Node but when it comes to UI, a browser is just too heavy.
Writing Electron app felt like sketching, at least to me. You place one line of code with tags and boom there's a button. Now QT takes place somewhere in between, and it still provides nice native multiplatform environment that could be appealing to web developers.
Unless they significantly rethink their approach it's significantly flawed without much room for improvement. Plenty of room for something better to come along. Even if it saw mass adoption, the demand for a better base would invite an alternative to gain traction against a sluggish goliath a la Firefox-vs-IE (or Chrome vs Firefox).
Why stick with a doomed formula?
I would acutally pay Spotify extra money if they brought back the old, snappy, pre-Electron version of their Windows desktop app.
<edit>They replaced it with something that is simply too heavy to manage larger playlists (except maybe on the max-spec MBPs it's being coded on) just because they could iterate more quickly on some non-essential features which they might have packed inside a WebView, leaving essential features intact and responsive.</edit>
These technologies you diss have been reliable and stable for over a decade. As an embedded developer, my code has to be running 24/7 for months without rebooting, without running out of memory, without crashing. But forget embedded, and imagine a web service. Can you truly honestly say that an app written in electron will give me that reliability? Or should we just accept that if you want to write apps using "modern" tech, you'll just have to deal with it? I personally can't imagine any web framework ever maturing and being stable enough to where you can invest money in it knowing that it will be around 10 years from now. Having your underlying technology platform in a constant flux makes your entire product stack brittle. That is a Big Deal.
If developers weren't so scared of Swift and C#, this wouldn't be a problem.
> (writing Desktop apps) is massively expensive, both in terms of actual dev time per feature (easily 10x the cost), and also in finding specialist developers who know these dated technologies.
I find the opposite to be almost universally true.
Writing a lightweight native desktop app is almost always cheaper than trying to build a JS-heavy app that has to run well in Mobile, and Tablets, and in a standard web browser, and in Electron fake-native-desktop web browser. Yes, you have separate projects with separate codebases. But two or three small lightweight projects is almost always cheaper than one big codebase with lots of targets, in terms of total cost of ownership.
I think all these "massive cost" comments come from sheer ignorance. Those "devs" are frightened at the need to learn a new language and frameworks, overestimate the time required to learn those, look around them and only see likewise clueless "devs", frightened of changes, and extrapolate some comically high overestimation of cost and time, when in reality, a properly written software is much more accessible to join in and support than a web "app" with the contemporary "sexy" observer pattern nonsense splattered all over, coupled with a horrible, horrible dependency management system and a language/framework combo that requires multiple dependencies to perform the most trivial of array loop.
Anyone would think it to be ridiculous if a carpenter told you he only works with saws because he is a saw carpenter and that for other kinds of work you should see the plane or sander carpenter. To me saying you're an [insert tech here] developer sounds the same...
I can't speak for others, but for me, the "massive costs" isn't about having to learn another language or framework. It's instead the massive costs to my employer. It might even be a massive cost to me as a single developer.
By developing a cross-platform app using a single set of easy-to-use tools, a large audience of users can be gained, that would otherwise be prohibitively expensive to support if native-only was the mantra. Instead, that application would have to be developed for only one, maybe two of the "major" platforms (and guess which platform it wouldn't be developed for - that would be the platform that I like most).
Supporting and maintaining a single codebase for one platform is a monumental task for any company, let alone a single indie developer. Supporting and maintaining multiple codebases for multiple platforms can be debilitating for a company, let alone a single developer.
I lived and played in those times; back in the "second gen" if you will of the microcomputer days - you had games and apps by different companies, and developers. In most cases, a game or app was only developed for one of those machines (usually the Apple IIe or the C=64, sometimes both - maybe an Atari too), but the other systems were all considered "second tier" by most developers. You might get a port of a game or app - but most times, you had to settle for something else, or buy a second system (ha! only if you had real money! I look back on the costs of those systems back then, and wonder how my parents ever managed it).
There's a reason you see a lot less of that going on today; it isn't because devs are frightened of learning a new language or framework.
> JavaScript Hacker at Slack
meaning he works for a company that heavily leveraged an existing protocol, IRC, for which there are already a metric fuckton of native clients and libraries for every platform under the sun.
Implementing their shitty web client was undoubtedly far more work than supporting a handful of native clients.
The codebase isn't lightweight to begin with, and duplicating it for a native app that maybe only one person could maintain was a non-starter.
What'd be a good example for the kind of lightweight project that can reasonable be duplicated for Native Mobile, Native Tablet, Native Desktop, & Web Browsers?
Atom?
VSCode?
Slack?
Couldn't your team learn the technologies? These days there is an abundance of resources available (online tutorials, books, bootcamps, etc), especially for ecosystems as popular as the Appleverse.
I can't pretend to know your situation, but as a reference point we had an iOS project come up at work a couple years ago and I was able to pick up Objective-C and the Apple libs in a few weeks while still being productive on other projects. I followed Apple's official tutorials[0] and built some toy apps, then learned the rest as I went on the real project. This is after having never owned an iDevice and doing mostly web and devops work in scripting languages for many years prior. A few peers of various experience levels were able to ramp up in about the same amount of time, so I'm not special.
[0]: https://developer.apple.com/library/content/referencelibrary...
I don't see how that is any different. If your Windows team members all left, that project would be dead or out-of-sync too. Wouldn't you replace valued team members who leave, in both cases? Or is this a concern that you won't be able to find developers willing to work with OSX and/or iOS tech?
> With my company, our users have always begged for an Mac OSX and iOS app.
Repeating this again because this should be telling. If your getting feedback begging for an OSX and iOS app, there's probably a number of really good reasons for that.
> What'd be a good example for the kind of lightweight project that can reasonable be duplicated for Native Mobile, Native Tablet, Native Desktop, & Web Browsers?
Spotify, Slack, Twitter, Facebook, any streaming video service (Hulu, Netflix, Amazon Prime Video, HBO GO), etc.
Note that I'm not using "lightweight" to mean "small weekend project", but to mean "less complex than the codebase needed to reproduce these features in a browser or Electron browser".
--
If you are truly a small company / startup, and you truly have to support all platforms with a small team, then sure Electron makes sense despite all the drawbacks. I totally understand that.
But I usually hear this excuse from big companies, that still want to perceive themselves as small, but aren't. Slack is a billion dollar company, they are not a small business / small startup. If a company is large enough to have more than two people working in HR full time, then they are probably big enough to do this stuff right. "We're a small team" simply isn't true for them.
I agree though that Electron is a problem. React native will probably be the best way forward. Microsoft has recently taken over RN-Windows and ReactXP, a RN-web clone. RN runs natively, doesn't need a browser, while being able to tap into the JS eco system.
I'm curious, since I use PyCharm and I wonder what I could be missing out on.
Similar arguments were made when Java first came on the scene. "Write once, run anywhere." [1] Years later, here we are again with "native" Javascript libraries. I'm sure in another 20 years or so we'll be rehashing this again, just with some other language.
Yeah, they're that much better, that we grumpy old non-JS programmers keep wondering what the big deal is when somebody comes along and rewrites something that existed 20 years ago.
- Everything GNOME does
- Everything MS does
- Everything KDE does
- All the apps in Mac OS
- Every browser
- Emulators
- Office suites
- Messaging apps
- Adobe's Creative Suite
- Blender
- All the content creation apps for video games
- Video games
- Editors
- IDEs
- Audio production suites
Web developers are excited about the desktop again, because to them the desktop is some kind of new frontier that Electron has opened up to them. I get that, but please be aware that just because something is new to you doesn't mean it's actually new.
Clearly Java never existed. I've been experimenting with Swing lately because Java has a library I'm interested in using. It's a breath of fresh air compared HTML/CSS/JS. It may not be proper "native" development, but I don't have to deal with <div> hell. It has proper layout management instead of, what, 4 quirky CSS layout styles: float, table-, flex-, and now grid-. Sure if you want to hack something together, Electron may be quicker short term. But I question if it will actually be cheaper in the long run for non-trivial applications.
If you want something that's much closer to proper native, have a look at SWT. It's faster than Swing and actually looks/feels native since it's actually using native widgets. It's really a shame that the poster child application, Eclipse, is so bloated and slow, because people attribute that slowness to SWT when it's really primarily the plugin architecture that's responsible. And I actually find the more spartan developer interface to be more pleasant than Swing, so to me it's win-win. Swing will always have an uncanny valley, SWT has never had that issue, yet still allows you to write for the desktop in only Java.
I feel that Sun's choice of Swing was the main reason Java failed on the desktop.
I don't think it is better, to be honest, and so I also wonder why people aren't crying out for decent layout management for the web - is it just lack of awareness of how good things could be, or...?
They have been, and that's why today there are things like flexbox[0] and grid layout[1]. It just took a long time for the browser vendors/standards bodies to be convinced and then spec these things out to work within the confines of the existing layout models.
[0]: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flexibl...
[1]: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Grid_La...
Smalltalk had a GUI based approach to design in the 70s on a 2 mb disk, and most web layout is generating html & css, then tweaking that stuff. It doesn't feel like web layout is a progression.
Imagine being a small shop of 1 person (or even 5) and having to learn desktop programming languages, conventions, and native APIs for the web, Mac, Windows, and Linux. Then on top of that to develop and maintain a product that moves at the pace of customer feedback.
That's why Electron is powerful. I could not write and maintain the Hemingway App for Mac and Windows without Electron. My tens of thousands of users would not get to use that software _at all_.
I think the implication is as much that developers who label themselves like you have as "non-native" or "JS" or "web" developers don't have the perspective to make an informed decision on the matter.
Many of the rest of us know how to build React SPAs (and have been doing it long enough to have used Angular 1, Backbone, Sproutcore, ...) but "JS + Framework of the Week" is just one of the many tools we could turn to when building a UI. Many of us have also used cross-platform native libraries like QT or GTK, or platform-specific toolkits like Cocoa or .NET.
Basically, if the only tool you have is a hammer... it might be time to learn to use some new tools.
Come on man, it's a little too easy, but NOBODY? People write desktop apps all the time. What you mean is "nobody I know", which probably says more about your social circle.
I'm not "excited" that macOS is flooded with apps that have poor accessibility experience while Apple itself is fanatical about delivering first-class accessibility experience - like Safari having accessibility always enabled.
So if the Electron bloat is such as issue for you, just hit Slack in the web directly.
That's even more horrible, i've tried it. Chrome uses his own notifications on macOS instead of integrating with systems notification manager and always when one of these ugly, poor animated guys pops up, i can search through my 100 open browser tabs to find the damn chat. Millions of flamewars were fought about what's the best window manager and we are ending up with a single window with a tabbar? Are you kids serious?
This was the main reason I used the electron version of slack and tbh it makes little difference if I run a dedicated Firefox window or the app since my laptop is less than a year old and could run a few hundred instances of either without sweating..
But I find it to be a humorous typo given the topic of this discussion as ionic is a browser-based cross-platform mobile framework.
You could have expressed pretty much the same sentiment about Java ~20 years ago. The trade-offs (high resource consumption, additional complexity, but less demanding of developer time) and even the fundamentals of the approach (an additional abstraction layer that works as a VM, APIs oriented around all the latest thinking) were also very similar.
Java is used for a lot of things, but mostly not as the basis of mass-market cross-platform applications the way it was originally intended.
It's crazy to think that developing something native on Desktop using the default stack of the operating system means using "dated technologies".
This comment is completely wrong. You know what Slack was before it was an Electron app? It was a Cocoa app. Sure, it wrapped a WebView, but given Slack's nature that's not a surprise. Regardless, the Cocoa Slack app, while not great, was still much better than the Electron crap we have now.
I don't know if you're simply ignorant of the fact that the app this article is focused on actually was a native desktop app before it switched to Electron, or if you're just ignoring that pretty important information in order to try and make your point, regardless of whether or not it's true.
What Electron has done is allow people with a particular skillset to apply it to a domain where it is both unnecessary and wasteful. These "developers" would be better off generalizing their understanding of software and UI design to the point where the tools used are irrelevant
WPF is newer than Javascript and the DOM. Using native desktop GUI frameworks isn't some sort of ancient dark art. It's easier than web development!
>if its massive "Beatles walking off the plane" moment hasn't happened by then, sorry, it's not gonna.
The same thing applies to the quality and performance of javascript apps. Decent performance and feature parity is always just about to happen when the next iteration of the standards is implemented, but it never arrives.
Agree fully with this. I find the complaints about how appalling it is that apps use a few extra 100MB of RAM and disk space really tiresome and impractical when laptops + desktops typically have lots of RAM and disk space now. Many of these cross platform apps either wouldn't exist or would exist on only one platform if everyone insisted on native apps especially for apps made my small teams or individuals.
I'm not saying Electron is perfect but easy cross platform support is a huge benefit and one of many. You also have the huge JavaScript community, pool of developers and available libraries to draw from as well as being able to share code between your desktop app and web app. Tossing that all away to save resources that most users aren't even going to notice isn't a good business decision in my opinion.
Just because it's there doesn't mean you need to use it all, that's like spending your whole paycheck at once because "you'll get another one in 2 weeks!". Any application that does the same job with less resources and the same or greater performance is unequivocally, objectively better.
Also, benefits of claims like easier and faster updated are rendered pretty moot when developers next spend that time changing things for the sake of it: Spotify app feels like it has since pointless, un-requested UI change every month. And VSCode can't even update Idle, decor that being one of the lauded benefits...
Electron isn't a better experience, and if it's in a browser, at least it can share some resources with other web pages.
What are you basing this on? There are plenty of iOS developers, and developing for Mac vs iOS is more similar than pretty much any two other dev platforms you can name.
Developing for Mac + Windows + Linux + Web > Developing for Electron.
1) Electron is obviously a system library now. Treat it as such. Install ONE copy of electron per version, not ten private copies of electron in npm. It should be simple to integrate with at least Windows and OSX install systems - instead of downloading the full electron module, download an installer that installs the required version system-wide. This can be done as a step during installation like desktop programs have been installing required dependencies since the dawn of time.
2) Find some way to make it slimmer. Maybe not every app needs the entirety of the browser loaded. Maybe we can do lazy loading of certain components? Maybe optimise the most used critical paths, and provide tools to developers (if those don't already exist) to show exactly what is causing all those wakeups?
Moving off Electron is not an option any more, it's just such an easy and familiar platform to develop for, it's not going anywhere. Maybe we should accept it as the victor of the cross-platform desktop application toolkit and work to make it better. It's shitty, but it's the right kind of easy, like PHP.
>>all you web devs: Go learn C or Rust or something. Your program runs on a computer.
I don't think that is a realistic request.
When the cost of Slack's ram/diskspace usage starts affecting their profit then they can/will take steps to re-write the application in 'native' code. Until then its premature optimization?
My own prejudice aside - I honestly do think that if you don't have an understanding of how a CPU works at this very low level - maybe even lower - you don't know what you're doing; that, and I have done hand-assembled x86, 6502, and 6809 code in the past...
It's a different time; knowledge of lower level languages isn't needed today to be a successful software developer who knows their craft. And I recognize my prejudices as such, thus while I tell them, I understand that they really can't apply. Would I like it if these new guys all knew this kind of stuff? Well - yeah; but the same could be said of me by guys long gone and dead as to why I don't know how to wire up an analogue computer to solve a calculus problem, or why I can't wire up a plugboard to compute something on a IBM 401 or such. That doesn't make them a better developer, nor me or anyone else a worse one. We're just using different technologies.
That said, I do think developers should branch out, and at least have an understanding of other languages; maybe C/C++ - but even Java, Python, GoLang, Rust, etc - all could be just as useful to know.
Today - career-wise - I am a javascript/node.js developer - before that, I mainly used PHP. At home, I play with Perl, C/C++, and Python (these latter two more recently being involved in machine learning, TensorFlow, and Keras). Occasionally, I'll get a bit nostalgic and break out BASIC (my favorite today is QB64). Can't say I've done any recent assembler coding - but it doesn't scare me, either. Just another way of communicating with the machine.
Even as someone myself who knows (more or less) C, this is quite an elitist statement, and doesn't do justice to say, Lisp and people who use functional languages. The goal of programming isn't necessarily efficiency.
I think it's a mistake to redefine it as optimization that doesn't affect profits. Companies often get away with painfully broken software for a long time because they benefit from some other moat (e.g banks). But they're setting themselves up for disruption by doing that.
Also, profits are not the only purpose in life if you value your craft. (I'm not denying that you have to be able to afford high standards and economics does play a legitimate role)
Hm? How come? Is there a mental barrier here that I'm not understanding? (C and Rust are "hard" languages?) I taught myself to code on my parents' hand-me-down Pentium 100Mhz in the early 2000s, and I started with the K&R C book. Python and C were my swiss army knives at the time. I really can't see this stuff being super difficult, I mean I was a teenager and I had no understanding of algorithms.
I think it's sad that both Apple and Microsoft dropped the ball on desktop because they are only focusing on funneling users to their stores. If the Microsoft of 2017 (with open source .NET and Linux as a focus) had been around a few years ago when WPF was invented, they could have made a decent cross platform toolkit now that didn't come from html/CSS/js
It's graphical GUI builder is out of this world, and it works flawlessly on all three desktop platforms. It did even compile without a single code change on windows, after I finished coding in ubuntu, a utility tool for some researchers in my organization [2].
And about the language ... I finished my utility tool project in 80 hours, from initial concept to happy customer, while learning the language in the process.
It is really such a shame that people have so strong aversions against Pascal, for no good reason other than subjective feelings.
Maybe not a coin miner or a graphics engine; but cpu is never really the constraint for applications such as those inside electron containers. Where you see them chewing 100% of a core, those are bugs.
Also, while th e language has flaws modern; JS vms are pretty bleeding edge....
What?... Are you saying what I think you're saying. I must be reading this wrong because surely you don't wish to imply that people didn't write desktop software before Electron came along?
NW.js uses less resources (less ram, smaller distribution sizes).
It is updated more often (within 24 hours of every Chromium and Node.js release, ensuring access to latest technology).
It supports about twice as many OS's (XP+, OSX 10.6+, Debian 8, Ubuntu 10+). Electron doesn't even care enough about Linux to merge in simple bug fixes.
It's much easier to get started with and takes a no-nonsense approach to everything. (thejaredwilcurt.github.io/website/quickstart.html)
Allows for HTML or JS entry for apps.
It offers actual source code protection, and even recently updated this so that there is no longer a performance hit when using it. Which is a pretty serious technical achievement.
The only thing wrong with it is that it's got a shitty name/logo, and has a smaller ecosystem. If you can get passed that you will have a much nicer experience.
Maybe nobody in the Web bubble.
Have you ever heard of League of Legends? It's a desktop application made in that time frame. It does 10 figures a year in revenue.
Wouldn't it make sense to run a caching proxy on desktop and use a browser that is already there? That way you could still use some functionality not available to plain websites, like access to computer. But use system browser for rendering. Your proxy would also cache your website so it would run faster than normal website.
I understand, that this way you have to support more browsers, but you probably already have a web version of your app.
The problem could be with users seeing localhost address. How to overcome this issue? Virtual interface on which DNS server could run?
Maybe running from a file:// could be a solution for some apps?
You could open the Mac App Store, pick the 'top grossing' category and count the number of Electron apps.
Is that good or bad?
Lost count of the number of times in my day to day work I see decisions made that make devs lives easier at the expense of performance or features.
Extremely pampered.
Everyone in the last 40 years built and sold a multitude of destkop apps and they never stopped. Stop drinking the cool aid, and even if some bozo upvotes you on hackernews it does not mean that you are right (actually nowadays the opposite is more probable).
> I simply have no interest in learning any native
> […] programming
And it is amazing to see how many bad reinventions of the wheel happens because of this.
People claiming that writing electron app is 10x faster than native have absolutely no idea what they are talking about. The only think web-based tech will give you is ability to push out raw cross-platform prototype. Now try to polish that to the acceptable quality across the platforms and the many wins start to turn into loses.What? Have you heard of Adobe AIR, AppJS, Node-Webkit (now NW.js) and Mozilla Prism/WebRunner?
Do you think people 'knew' what was going to kill Flash before it died?
Does the weight of these just irritate you because of how wasteful it is (it irritates me for this reason alone) or does it actually have an impact on you?
People said the same things about gtk or qt when we had motif right? Apps are going to keep getting bigger, our machines get bigger too. I'm not sure what he problem is.
Edit: fat fingers
Nobody in the last ~20 years has cared about writing Web apps before JS came along. There's basically zero money in it, and it's massively expensive, both in terms of actual development time per feature (easily 10x the cost of working in sane languages with sane runtimes), and also in finding trendy hipsters who don't know algorithms or data structures but took four weeks of coding academy classes a couple years ago. And as for Electron, Electron has existed for over three decades (Project Athena launched in 1983) -- if its massive "Nixon throwing the peace signs before getting on the plane" moment hasn't happened by then, sorry, but it's not going to happen.
But now? People are making all kinds of great new languages, and more often than not, they don't repeat JS's mistakes. People are excited about programming again -- JS is so bad that it's single-handedly revitalizing interest in languages which two of the largest tech companies in the world are behind, yet couldn't make popular.
This is a Big Deal.
(You are being parodied mostly for being a Slack developer, not disclosing it up front, and then trying to convince folks that Electron is good, which makes you sound a lot like a pig farmer trying to sell pigs' feet.)
Zero money in web apps? You mean like Google, Facebook, Amazon, Twitch, Netflix, and YouTube?
There's way more money is web apps than desktop apps. hands down. I'm not talking about mobile because this is a convo about electron.
Win32, Java, MacOS, et al lost because there were such strong standards for doing things the One True Way that competing standards couldn't flourish and the APIs stagnated.
In JavaScript, a new framework comes out every year and goes straight at the throat of the old one. The reason there is churn is because these new frameworks are actually solving problems better than the old ones, and because of the LACK of a monoculture developers will actually switch to them. Which in turn is why framework designers are drawn to it, which in turn leads to more new frameworks.
Is iOS solving problems better today than they were last year? Or in 2015? Because JavaScript is solving problems way better this year than last.
Actually - pig's feet are actually a pretty good eatin' portion of the pig. If you've ever had them, you might agree.
https://github.com/jashkenas/coffeescript/wiki/list-of-langu...
>xpaulbettsx: JavaScript Hacker at Slack
Ah, yes, we are all grateful for Slack's 850MB of memory used when idle. I can live without it, personally. Actually, if it could crawl back into whatever hole it came from, I'd be glad.
Electron isn't good. Electron is absolutely awful. Web applications aren't good. Javascript isn't good. At what point of dementia do you say "hey, web APIs are easier to use, let's bring the entire damn browser along with it!"? The normal reaction should be fixing current APIs, making good wrappers around them.
My first computer saved data to a cassette tape; today, terabyte hard drives are nearly give-away prizes in cereal boxes (yeah, I know they don't do that anymore, either). We have machines in our pockets which are arguably (in some ways) more powerful than the machines only government-funded agencies and such could afford when I was a kid (and they took up entire rooms).
I hope I live long enough to think of 850 MB as a small amount of memory (and 8-cores at 4 GHz each a slow machine; actually, there are some multi-cpu server mobos I'd love to have as a desktop, but I can't afford it - yet).
Honestly, I'm amazed that we do have enough memory to support these huge apps. Sure they're bloated; I won't argue that - but at the same time its amazing that we can run them at all - a decade ago it would have seemed ludicrous!
Could it be better? Sure - but in my mind, all software is bloated - because even the simplest piece of compiled code I can't run on my old TRS-80 from when I was a kid (heck, even an Arduino has better specs!).
Desktop development has stagnated because of the proliferation of web technologies, not because desktop frameworks aren't very good. Qt is great, gtk is great, hell, with the right configuration, working with WinForms can be pleasant.
Electron packs a browser with each app, and that's unacceptable. Adobe used to have something called AIR, years before electron, but idk if they were just packing up a browser or not. I used to use the desktop version of tweetdeck, which used AIR, and it was pretty damn fast.
Anyways, you clearly don't know anything about desktop development, so rather than make claims that are wrong, just stick to what you DO know.
What a load of tripe.
Try stuffing all the functionality of a large enterprise desktop app like SAP or Siebel into Electron and let me know how well that goes.
Perhaps someone can clone the outward api of electron with only a ~10% performance penalty instead of Two orders of magnitude
- why are people writing this stuff in C. It's so slow and you don't have as much control on memory. Write it in Assembly.
- why are people writing this stuff in Java. It's so slow and you don't have as much control on memory. Write it in C.
- why are people writing this stuff in Python. It's so slow and you don't have as much control on memory. Write it in Java.
Eventually people want to solve a problem with the best ratio cost/quality for them, not "doing it the proper way".
So unless you provide a better solution for them to do that, or pay big money to create such solution, they will find the ugly-hackish-half-baked-working-for-them solution that let them do this.
We had PHP. Now we have JS.
I hate it. You hate it. We all hate it.
But I created portable GUI apps with an installer before in my favorite language and others and it was a pain. All of it. The UI, the event model, the API, the portability edge cases, the new stuff to learn, the packaging, the dependencies...
It sucked.
So get over it or provide a solution, but stop complaining.
And before you start providing an EXISTING solution, remember people tried it and they didn't like it as much as electron. And since electron is so bad, that should tell you something.
So the market is saying you are wrong. You can ignore it from your better tech tower... Try to boycott electron apps all you want. But we know how it has played for betamax, lisp and the ogg format.
P.S: oh, and if electron is flash, remember that flash won the web for 15 years while it sucked. And you know why ? Because it allowed people to do stuff they wanted easily, like videos and animations. And it's not because we couldn't do it any other way, we could. Yet we had to wait almost 2 decades to see it dies, at the price of battery, stability, security and everything else. Feature trumps everything. People. Don't. Care. We only manage to kill it because we finally replaced it with systems that could compete on easiness and features. So you know what to do.
Managing tradeoffs is a fundamental part of development strategy. You can ramp up quickly in a productive language like Python and then stabilize on a more efficient language like Java. New platforms like Go/Swift/Kotlin are trying to get in this sweet spot (and mostly succeeding), and existing platforms are trying to inch closer towards it (Python/JS with performance and Java/C#/C++ with ease-of-use features) to avoid the "do over"
> And before you start providing an EXISTING solution, remember people tried it and they didn't like it as much as electron. And since electron is so bad, that should tell you something.
I doubt everyone who's built a desktop in Electron tested Qt first. Definitely not in C++, but probably not even in QML or Go.
> People. Don't. Care.
People absolutely care, they're just not software engineers so they can't articulate precisely what they care about. It's like you never heard someone complain about shit battery life, unresponsive web pages and apps, or slowness in general.
Most of these Electron apps work in network effects. People have Spotify because their friends have Spotify; people have Slack because their work uses Slack; essentially people are generally saddled with your app for non-technical reasons. But that should be an argument for giving them good tech, not an excuse for giving them bad tech. "Well, you'd have to use this anyway so I can get away with burning through your battery life and you'd still count towards my usage numbers". Ick.
You just ignore what the market is saying because "you are right".
You are completely missing the point.
I disagree with your assertion, because I don't think the only measure of progress is how productive programmers are (time-to-market, whatever). There are other measures:
- user experience
- program efficiency (battery life, fossil fuels burned)
- program security
- ease of contribution, maintenance, and improvement
I mean, correct me if I'm wrong. But I feel like I've directly addressed your points. I simply don't think that you can say, "well it's X% faster to build an app on Electron, therefore Electron is the best... even though it runs Y% slower and burns Z% more battery". That's why I talked a lot about tradeoffs, because there's more than one issue.
For what it's worth, I also dispute the productivity argument. It's hilariously easy to build an app in Qt Creator. Maybe web devs can build Electron apps faster, but that's because they're web devs. I'd bet if a web dev took a month to get to know Qt they'd be as productive. The difference is that the resulting app would be a lot more efficient.
I work on Wunderlist. One of our key differentiators, the thing customers love, love, love, is native apps on the major platforms (iOS, macOS, Android, Windows), in addition to an outstanding Web app.
We quickly got several million customers, were acquired by Microsoft for "an undisclosed amount".
http://www.theverge.com/2015/6/2/8707883/microsoft-wunderlis...
Complaining is a necessary first step in finding a better solution. Before being able to solve a problem, you need to first articulate what the problem is.
I really miss the simplicity of a self contained swf file that could be embedded in an html page, but was usually also self contained and could be downloaded and run on its own. And of course they are tiny and fast. And I could run them in Linux, or even on my Palm Pilot. Except for battery consumption, were they really that bad?
But I get your point, it's was really handy. Only this year HTML5 videos are starting to be on par with flash videos. Those were so light to download.
And, based on the direction things are going, I think it's only a matter of time until you can't even select text properly or scroll in a predictable way.
I'm hoping react-native like dev experiences will make us re-think how we can have our cake and eat it too.
did anyone ever actually say this?
> why are people writing this stuff in Python. It's so slow and you don't have as much control on memory. Write it in Java.
this one is odd to me considering Python came first...
Wordperfect is famous for failing because they sticked to assembly while the competition moved to C.
> this one is odd to me considering Python came first...
It is indeed. But date of creation has no importance in this. Java became popular first, and is faster and consume less memory than Python. I'm a Python dev now, and I when I picked up the language more than a decade ago, people where looking at me like I was crazy.
>did anyone ever actually say this?
Yes, in the 8bit era.
The market is asking for more and more software, with more and more complex features. And they must be usable on many platforms, by users incapable or writing their name correctly, let alone comprehend a computer.
In the mean time you have a bit more trained programmers, but not that much more. And most of them are not remotely good enough to provide fast, reliable and usable software. The ones that can are expensive.
In this situation, any shortcut you can take, you take.
It's like the quality of food or kitchen wear. You want 1000 of fruits available all year long ? Ok, but the quality will suck. You want everybody to be able to afford 10 machines to do every single things instead of you. Sure, but they'll break in 2 years.
My mothers kept her machines for 20 years, and I can seldom keep mine for 5. I eat tasty tomatoes 25 years ago. Today I have to look for them with expert knowledge and a bag of money or they'll taste like plastic.
As long as everybody wants a piece of the cake but nobody wants to pay for quality and don't want to wait, well, you'll end up in those situations.
For software, this is only going to get worse. Every year, I get paid more and more, I accumulate more knowledge that the newcomers are struggling with. I refuse work. And I don't get penalized for any shortcut I take.
This situation is not going to end well.
But 160MB for a chat app? That's insane.
When did we move on from this stage? Desktop java is a failure for good reason. Electron is an order of magnitude slower again.
Most widely used desktop apps are still written in c/c++.
A good example is the tech competence of the general population. Computer savvy or proudly dismissive? Now we have seen the technological improvements that allow people without tech skills to perform all sorts of tasks that they couldn't before.
The drawback is that the general population is at the mercy of the providers of these magic tools. If the provider decides to increase prices or move to a subscription model, they have to accept it. If the provider adds tracking & analytics and other privacy-invasive functionality they will be outraged, and then accept it. If the provider updates their app and puts features behind a paywall or completely redesigns the UI because their designers were getting bored, those people will have to grin and bear it.
e.g: Microsoft has decided to transform Windows into spyware: they can run code remotely, log keystrokes and upload them to their cloud, etc. Most people either don't have a clue or can't do anything about it, because they outsourced their software skills to Microsoft, which worked well enough until Microsoft decided that their interests are not aligned with those of their customers.
JS developers are another example of this - they are prisoners of JavaScript, although I wager most of them would say that they're happy to live in their golden cage rather than in the technological jungle that they're unfamiliar with. Condemned to go along with any decisions made by Google, Github, Apple or other companies that they have no influence on, because by not challenging themselves to learn, they gave up their freedom.
You mentioned that (some? most?) web developers don't even know what linking is and you support going on the same false path, dumbing down things until they are understandable to those that didn't take the time to educate themselves. This will only result in a generation of helpless individuals cobbling components together in a decent enough way to call it software.
A new kind of browser engine, not based on any existing engine, allowing developers to use a subset of the web (webgl, 2d, layout) without being forced to use a bloated ecosystem (and which also works on mobile and low end device).
Previous HN discussion : https://news.ycombinator.com/item?id=6314961
We're French and it's indeed hard for us to get this perfectly right and focusing on the project itself at the same time.
We're planning to move this to github in order to let the community help us on this.
- They're vs Their and similar normally denote uneducated native English speaker. The code might still be okay, but these typos passing to production makes me check code quality in case some similar QA mistakes are passed in the code.
- Grammar mistakes normally show a foreigner for whom English is not the main language. A small example just in the first line, "to create apps, games that run" => "to create apps and games that run", but this is normally due to a different language constructions. Similar to graphical softwares => graphical software.
So, kudos for OP to write the documentation in a non-native language! (upon light investigation it seems the main writer is French and his coworkers fix typos from time to time).
in germany only grammar nazi's would actually hate such things. they are too common, to say that only uneducated people do it. people who write code and distribute code to the whole world are not writers, there is no need for "perfect" grammar and typos. i mean in my first application i've written quanity instead of quantity (inside the code), somehow it slipped in a lot of places, but i think many many people who will read the code would still understand it. as long as the user interface is checked, i think it's okay if the readme/documentation has typos or grammar mistakes (on open source projects). the most important thing is, is that people understand each other/understand what it's all about. which is just fine for nidium.
Is this abnormally large for a project like this?
- mozilla spidermonkey
- Google Skia
- ffmpeg
- portaudio
- leveldb
- OpenSSL
And various other stuff.
But I was hoping for something like Electron/Node.js with a different/smaller engine like Ducktape. There seems to be a Chakra version of Node.js so this should be possible in the future.
The only heavy weight in this constellation remains Chromium...
Also nidium focus on mobile devices.
Are the needs of specific applications (or games!) influencing the feature set of Nidium?
Given the discussion of the recent ReactXP thread, I'm guessing most people don't realize you can do this today. React Native supports macOS [1] and UWP [2].
Edit: There's even some early work on Ubuntu support [3].
[1] https://github.com/ptmt/react-native-macos
[2] https://github.com/Microsoft/react-native-windows
[3] https://github.com/CanonicalLtd/react-native/blob/ubuntu/REA...
I think the choice is obvious at this point, if the Windows version is complete and stable, I will start using it instead of Electron.
https://en.wikipedia.org/wiki/Usage_share_of_operating_syste...
I would love to use React but if this is not addressed, there's no way I'm ignoring 1/2 users in the Windows ecosystem.
Is that the case or am I wrong? Can you run these React Native forks on Windows 7?
EDIT: Win 7 usage might be higher than is widely reported
https://www.netmarketshare.com/operating-system-market-share...
Do you know if they have anything for linux yet?
You can also currently use React to share code across iOS [2], Android [3], UWP [4], macOS [5], web [6], VR [7] and a bunch of other stuff that is there mostly for fun (like React Hardware [8] and React Sketch.app [9]).
There's also experimental work on defining a set of primitives that works across all of these platforms [10].
[1] https://github.com/CanonicalLtd/react-native/blob/ubuntu/REA...
[2] https://github.com/facebook/react-native
[3] https://github.com/facebook/react-native
[4] https://github.com/Microsoft/react-native-windows
[5] https://github.com/ptmt/react-native-macos
[6] https://github.com/necolas/react-native-web
[7] https://github.com/facebook/react-vr
[8] https://github.com/iamdustan/react-hardware
To be honest, we would have never built this app without Electron. It allowed us to have a small team (2 devs) ship the first version of the app without learning an entire new dev toolchain on multiple platforms. There certainly can be performance issues with building on Chromium/Node but those can be pretty easily addressed.
We even had an early engineer with tons of Cocoa/ObjC programming experience and they still preferred shipping with Electron.
The HN crowd complaining about Electron kind of feels like the early criticism of Dropbox or the iPod. "This is technologically inferior and has fewer features so it is clearly worthless."
For some reason there's a deep-rooted philosophical opposition to Electron-like technologies from lots of hackers. But I predict it will be like Java-- everyone "hates" the JVM for years and calls it slow and then one day it's running nearly every mobile device and being used across Google.
It's not crazy to think Electron will evolve like this-- it certainly has the momentum. And the ideas of a web-based desktop app platform have been pushed by Google, Apple, and Microsoft in the past. Seems like we're finally getting there...
(For the curious: https://github.com/nylas/nylas-mail )
Many people use laptops and their battery life matters a lot, being one "minor" factor. Not to mention that in a technical sense, your app really shouldn't take any CPU while idling. Doing a socket wait is something a Raspberry Pi Zero handles without going to more than 1% CPU, for half a second.
At any rate, other people in this thread explained it much better than I could: https://news.ycombinator.com/item?id=14091782
I understand that you're frustrated, but this kind of language does not foster productive discourse.
As I understand it, Nylas (grinich's OSS Email product/platform) wouldn't have been possible to build with a two-person dev team had they chosen to implement it in something other than Electron.
Are you suggesting we're better off without competitors to the existing email desktop-clients?
This is a false dichotomy and you are aware of that fact. This polarization shouldn't exist in the first place. And it can be eliminated with a small time investment.
As developers of important apps, your contribution to the world influences culture. Other follow in your wake. Is that the influence to the world you really want to give to other programmers and business people? Time to market is not the only priority.
That you treat a non-flattering language as me being frustrated tells me you will not understand that side of the argument however. So let's agree to disagree and move on.
There are a number of email apps around, why would I want to use one from developers that put their convenience above mine (and my batter life)?
> But I predict it will be like Java-- everyone "hates" the JVM for years and calls it slow and then one day it's running nearly every mobile device and being used across Google.
Notice how the jvm is dead on the desktop? Notice how android apps are incredibly slow compared to a native one? Also, android has never run on the JVM, they created their own VM because the JVM was too slow.
I say this as someone currently writing a native desktop app and someone who doesn't like Android (having shipped substantial Android and iOS apps):
Android apps are not incredibly slow compared to native apps, and the ones that are aren't due to Java. Android has always _used_ the JVM, just not run binaries _on_ the VM – they created their own (Dalvik) because they couldn't ship a Java virtual machine, so they shipped a virtual machine and played bytecode games so the thing that ran wasn't Java bytecode, and it wasn't run on a Java-compatible VM.
Also, Android has and will be running on the JVM, because they're transitioning to OpenJDK.
I still have to wait seconds for simple apps to startup. Apps of the complexity that would have opened instantly on a desktop of 20 years ago. Part of that is the speed of java and part is the extra memory it uses.
>Also, Android has and will be running on the JVM, because they're transitioning to OpenJDK.
Android is switching to the OpenJDK class libraries, not the VM, they've already built their own VM twice to avoid it. I think your confusing the VM and the libraries everywhere else too.
* Don't use PHP its a fractal of bad design - most popular server side language before
* Don't use JavaScript its a scripting language - most popular programming language
* Don't use Flash its bad for security and accessiblity - most popular authoring tool for animated web apps.
* Don't use WordPress its a spaghetti mess - most popular CMS
* Don't use VB6! - most popular rapid application development tool
The most popular techs are the most practical and easy-to-use ones. Im not dismissing the arguments. The "dont use" arguments are valid. HOWEVER, you can't just tell people to "do the world a favor and don't use this tech because". That doesn't work. Unless you can release a competing tech that does better, with less amount of work.
Funny how a high priesthood of people who get paid a lot of money would pour scorn on anything that lets the "mundanes" solve problems with computers.
Just did a quick check on my quadcore MBP, having Slack fullscreen out-of-view with nothing animated in view gives it a CPU usage of 0,1% with spikes up to 2,5%. Switch to a conversation with a single animated party parrot emoji, go to another fullscreen app once again, and CPU usage never drops below a whopping 22%. For an animated parrot cartoon.
I'm not sure if this is a bug in Slack or Electron. Doing the same in Chrome does not cause any issues, as GIFs seem to be suspended when the window is not in view. CPU usage goes down to almost 0 when you switch away from your GIF-filled Chrome window. For Slack, however, it barely changes. A big shame.
(On that note, I wonder how much power is wasted by party parrots via CPU usage. Where I work at least one is almost permanently visible in any conversation as a reaction emoji, so it's probably not insignificant.)
Holy fuck, can you imagine the supercomputers that were required to display Geocities websites in the 1990s?
Its also worth noting that blog post is from a few months ago. Its possible the slack team has fixed the issue now. I wouldn't know because I deleted the slack desktop app and haven't looked back.
I have Atom and Mattermost (Slack clone) running right now with very little avg. "energy impact". MM is at about a half gig in memory though.
Personally I think every software engineer should have a CPU meter of some for running on their machine while developing. Its an essential element of seeing what you're doing. How can you write decent software without having even that much visibility over what your computer is up to while your code runs?
These huge CPU sinks making it through to release required nobody to even glance at a CPU graph.
A better solution would be to have CI monitor CPU usage so that increases/decreases could be monitored and reported over time/per commit.
I find them both extremely useful in finding when I'm running wasteful software (either written by myself or someone else).
https://github.com/artursapek/dotfiles/blob/master/battery.r...
https://github.com/artursapek/dotfiles/blob/master/.tmux.con...
Every bug looks egregious in hindsight; just because an app has one is no reason to assume the engineers who made it don't bother to test anything.
Also: that particular issue only hurt idle CPU usage, and the usage was something like 13% CPU usage IIRC. It wasn't exactly the kind of thing that sets off klaxons.
I noticed a few moments after startup that the CPU usage jumped to the 5-7% range for a couple seconds, then it notified me that an update was ready (I assume it was downloading/checking/processing that update). I don't know if this is Electron, or just a general trend in desktop apps, but it seems to be getting a lot easier to update them. So when those pesky CPU/memory hog bugs are found, they can be quickly patched. As for the general trade off that comes with running an extra Chromium process, I suppose it's up to users/developers as to whether it is worth it in each case.
(I continue to be amused that everyone records & shares gifs for "compatability" and "simplicity", but many of the places they're shared re-convert them into videos.)
You're paying for the codecs, might as well use them.
Node.js too was a terrible idea. Who in their right mind would write server-side javascript? It turns out: pretty much anyone who didn't want to have to screw around for hours before being able to respond to a simple http request.
Similarly, it is way harder to write a desktop app than a browser app. DOM / CSS manipulation, however bad they are, are years ahead compared to what you can easily do with WPF and friends.
And what about Python for data analysis? The one language that is known to be 10x slower than C becomes the de-facto standard for a field where what matters most is code performance. Again: ease of programming.
The success of electron only shows that there is a market for a UI library that can be written just like what you do in the browser but for native desktop apps... Please someone, write that !
Almost everything done in Python for data analysis is just a thin wrapper on top of a fast C/C++ library: Numpy, scikit, Pandas, Tensorflow, etc
Pretty sure you could do that as easily in PHP, Ruby, Python, Perl before Node.
> And what about Python for data analysis? The one language that is known to be 10x slower than C becomes the de-facto standard for a field where what matters most is code performance. Again: ease of programming.
When code performance matters most, you're probably still using Hadoop, C/C++, Fortran. Python is mostly in competition with R, Matlab, SPSS and Excel. Julia is the new kid on the block, and it was designed to be more performant than Python and R.
PHP is awful but still the best option for making something simple very fast, as it is supported virtually in every kind of provider, even free ones.
And still when we want actual speed we port it to C++ or at least need to use Cython.
This doesn't make any sense. It's much easier to create UI with XAML (WPF) because it's designed for that purpose alone. HTML / CSS really isn't.
That is likely not the only reason. A lot of the libraries like NumPy, SciPy etc., that are one of the reasons (but not the only one) why Python is used so much for STEM / data analysis / data science etc., are written in highly optimized C or C++ or FORTRAN, with maybe thin Python wrappers over them. So ease of programming alone is not the reason. If it was easy but too slow to run (remember, many such apps process huge amounts of data), then people would not use it.
Edited to change "C" to "C or C++".
Having learned Ruby on Rails before Node, I view Node as "screwing around for hours before being able to respond to a simple http request."
Or, people who like closures. Or other aspects of JS. Or of the Node platform (like event-loop programming).
I mean, programming languages and developer tools could be easy AND with high performance.
We actually have written something similar for our product Elevate Web Builder (commercial, closed-source, written in Delphi), and have considered moving it to Free Pascal in order to allow developers to use it in portable, native desktop applications. The IDE for Elevate Web Builder has to provide a browser-like design-time environment for the WYSIWYG designers, so we created one. It effectively uses a DOM element tree structure like the browser, but doesn't use HTML or CSS. Instead, it surfaces all declarative styling as element properties (with real types, not everything as a string), provides its own layout management that is more application-oriented instead of document-oriented, and has a great batch update functionality that allows you to suspend updates/repaints until you're done making all necessary changes to the element properties of one or more elements.
The reason why it's such a compelling idea for us is because Free Pascal is a blank slate with all of the support code for multi-platform development, and we already have all of the code written for Windows. The reason why we're hesitant is because it's all in Object Pascal, so I'm not really sure if it's a compelling draw for JS developers that want to create desktop applications.
If we ever do something with it, though, we will certainly post it here as a "Show HN".
Developers are often willing and able to produce high-performance code when the barrier to doing so is low enough.
Go to Electron's website and download the demo (called API Demos). It's 3 processes and consumes 0.0 CPU on idle. Is it super efficient space-wise for what it does? Certainly not. And RAM usage is a valid concern. But churning CPU cycles on idle is not Electron's / Chrome's fault. I also suspect that if an app is behaving grossly on Electron, it's probably a bad actor within a generic browser environment, too.
My recommendation would be to not ship simple web apps wrapped in this huge machine without a good reason. But there are good reasons to use Electron or NW. It's just a poor choice when all you need is a thin wrapper around your website.
But I'd also argue that Flash could always be written to be efficient too. The problem with flash was never the little games people made. The problem was that one tab with a stupid punch-the-monkey banner add playing somewhere that would sit on 20% cpu even when the tab was in the background. I think Electron is similar, except in the desktop space. Well written apps seem to be able to keep CPU load down (although they still have a huge download and a huge RAM footprint). But there's been a running trend of noticing some dumb software running somewhere on my machine eating all my CPU. And in the last year or two its been an electron app, every time. Just like flash before it.
Gotta agree with the other response here. If you have shown that what would seem to be much larger and more CPU intensive applications have been able to reliably perform well, why suggest moving away from electron instead of suggesting that users learn how to use it correctly, or perhaps suggesting that electron better educate users on how to use it correctly?
It seems deceiving to conceal that information when your call to action is to ditch Electron for the sake of performance.
https://twitter.com/harisamin/status/727634194814373889
https://pbs.twimg.com/media/ChkTccjVAAAZ0Kt.png https://pbs.twimg.com/media/ChkTcbMUkAIYolx.png
1. Electron makes it trivial for developers who don't regularly reason about native performance to release desktop apps. The result: a flood of apps that "don't do much" but use more resources than you'd expect.
2. At the other end, Electron makes complex apps easier to build. The Slack app might be low-to-medium complexity, but the Spotify app has a ton of functionality, and I bet dev effort was orders of magnitude lower than for a native app like iTunes. The result: in this day and age, complex cross platform apps with higher resource requirements are more likely to be built with Electron.
In short, there's some selection bias going on in both cases, and it isn't directly related to Electron. Electron is just the enabler.
I agree with the author on point 1: performance matters, memory usage matters, and we as web developers should broaden our horizons and learn lower-level languages. I feel that way regardless of Electron though.
On point 2: I spent the last year building a cross platform continuous sync app (basically, a Dropbox V1) in Electron [0]. We were a team of 2. I also write C and C++ for a living, and I simply can't imagine building the same thing in a lower level language in the same timeframe. It's not just a UI concern either: writing a sync engine in node (the backend half of any Electron app) worked out amazingly well. Node is a great I/O orchestrator. The app runs at < 1% cpu when not actively syncing, 40MB backend process, 70MB frontend process. Reasonable for what it does. Dropbox uses more than double that although, granted, it's also not native code.
Hell, if you're not afraid of bloating in the codebase, you could use a large number of libraries to put together a basic, working version inside of a day or two. Stretch that to a couple of weeks (at most) and you have a prototype you can release.
The proof is in Atlassian and Microsoft chasing after Slack on this. Very few people came forward to wave the "Let's just go back to IRC" flag.
It's shiny, new, you can drag and drop gifs and files into it, and it runs pretty swiftly (ignoring all of the obvious flaws). Most, especially less technical, users would find it a charm to work with. In my experience, they do -- and above all of the competitors.
The rest of your points are rather valid. But maybe its not so much obliviousness, as eagerness and impatience, and the reality of the market being as timely and pressing as it currently is. It's a race -- just like the telephone and the radio (for my point I'm ignoring the scale of impact here).
That's the problem right there(?). People bringing a DOM to the desktop because the developers were fluent in JS.
> time to market
If there were no drawbacks in terms of complexity/performance/size etc then I'd agree, but now when you have a perf issue that is too large it might be a huge issue to fix. You also only get one chance for a first impression - and poor performance is a huge turnoff. Looking blingy and having all the features doesn't save an app with a 200ms lockup. or a 10% CPU at idle.
I saw this happen at work. My team were all experts on native mobile development. We could crank out stuff fast, because we knew our tools well. But then some management dude got the idea that we would do it 2-3x faster if we went with JavaScript.
Turns out it was more like 2-3 slower than making all the native versions, because we did not have strong experience with these tools and APIs were more limited, poorely documented, buggy, and the tools were subpar.
Given that constraint, time to market becomes crucial as the huge cross platform barrier is significantly reduced by Electron.
It's also a demographic shift. Young developer's aren't coding in Java peak world anymore. We haven't even reached peak Javascript yet.
This doesn't break the trend.
Some problems:
- Text boxes are non-native and do not support any standard keystrokes for navigation (this is huge!)
- The division between the titlebar and the main app body is weird looking
- Highlighting around a focussed text box is weird
- Weird inline dialogs
- No bounce scroll
Some of those are debatable (not everything has to be done using the standard system stuff, of course), but to me the overall effect is very alien.
Slack, for all its inefficiency & handful of annoyances (not actually using unicode / text to represent emoji, anyone?), "feels" like a better Mac citizen than this app.
Non-native text boxes is a 50/50 issue. I get that it can be alienating for some and that's just as valid as me not caring. But it's still subjective and bears zero argumentative value as well.
Telegram Desktop works very well and is easily the most lightweight messaging app my Macbook 12" has ever seen. And I don't have to fear that I'll get back to my machine after being away for 25 minutes, only to find it losing 40% battery to Slack and Atom.
No argument here that Slack is hideously inefficient.
Right yes. Lets argue against uniformity in the (visual) design of a UI based on pulling in all of known history and the atrocities that have been committed during that time.
I agree with you. Efficiency should be on the top three priorities list.
Also, if you're not making your code LGPL/GPL, be prepared to pay $300/person/mo for Qt Creator (seriously - https://www.qt.io/buy-product/)
Simple applications often lag, because they are written on top of heaps of crap. Yet you look at a 4k demo that does more impressive stuff with a fraction of the resources.
When we step really far back, an application should not require that much code. Nor should the process of abstracting an application on top of a native system. These things only get muddled when you depend on specific functionality of the system that is difficult to abstract (i.e. native GUI component and layout), which you can easily simulate with your own GUI renderer, potentially in a more optimal way.
Anyhow, I'll sit here waiting patiently until someone figures out how to write once, run everywhere in a relatively bloat-free manner. :)
Every place I need to render text or make a thing respond to a mouse click I need to manually do all my own text layout and event handling and so on. (The app is in a domain where it needs special rendering -- I can't just reuse a system widget or library like Qt for this.)
Meanwhile, people are making apps similar to mine on top of Electron and banging out features way faster than I ever could. If they want some popup to have some bold text, or use the GPU to animate, or properly handle Arabic text layout, they get it all for basically free, they just need to bang out some divs. I am jealous.
It can be fine to prototype in Electron, or to make tools in it. But if you're making a chat program or anything similarly long-lived, it's the worst decision you can make for your user.
I find memory/cpu efficient applications not just useful but respectful to users specially when upgrading hardware is not possible due to financial or policy reasons.
What kind of hardware are you on as a developer?
Probably something like this: https://github.com/Microsoft/vscode/issues/22900 (not the cursor thing specifically, but something that feels lightweight, but isn't)
Which is probably fixable. I would guess Vscode is more code than Slack, and they were able to fix this, albeit with very good help from a customer.
Chrome eats a lot of RAM, and frankly, most of these apps don't need all of Chrome. But any solution that requires moving away from JavaScript (e.g. C++/Qt apps) is too expensive in terms of retraining developers. (Facebook found it was cheaper to create Hack and HHVM than to train its engineers to stop writing PHP-like code.)
Maybe the answer here is a "React Native" library that results in native Windows/Linux/OS X desktop apps. But, with larger corps focusing on "mobile first" and "responsive design" memes, I don't imagine either Facebook or Google being the first to build such a thing.
I've made 3 apps with Electron that I could probably never make since I would be busy learning OS specific things.
Can we not have low barrier to entry for creating native apps? Are there any solutions/frameworks that one can utilize? Is it just a matter of poor documentation/support from OS makers? What is it?
Edit: Some of the contents that said something along the lines of: Is it really slow? It opens so fast for me...
The worse thing a developer can do is judge their application anecdotally and not through something more empirical. Its our job to make our shit available to more users and support more platforms (hence Electron is used) but it is also our responsibility to make sure they can use our app and have 50 tabs open and do other more important shit like... watching genitals in a flash player. I was in this Electron phase but I started to run traces and see how much of a hog it is.
If you really care about what you are working on, use Electron as a prototype, get it out there, then start making a native app. I think this is the best of both worlds. You get your shit out there, people let you know how it stinks and in the mean time you make something that is better suited for their OS.
P.S: Sorry for the overuse of "shit". I am fishing for upvotes.
But I really am wondering:
> Can we not have low barrier to entry for creating native apps? Are there any solutions/frameworks that one can utilize? Is it just a matter of poor documentation/support from OS makers? What is it?
I can only encourage everyone to heed this advice.
If anything, we are < 50 years away from only AI and machine learning algorithms understanding chip design and microcode. Soon enough, no human is going to be able to parse the tech stack below the operating system.
Other tips I've ritualized, use /collapse very often when on slack, and avoid message reactions with animated gifs. Animated things are why Slack will idle at 5%+. Lots of them and you're going to idle even higher.
Don't leave slack open on a channel where people frequently use /giphy or post lots of animated emojis (#random, etc). Reactions to comments with animated gifs are the worst, because /collapse wont hide them.
In my test locally, a chat window with no animated things is idling at 0-1.5% CPU. I just added 1 animated gif reaction to a comment and it's idling at 4-6%. It's absolutely horrible. I removed that comment and then posted using /giphy, now it's idling at 2-3%. A Slack Helper task started to run at 12%. Ran /collapse and both are back down to 0-1%.
Reacted to a message with 10 animated gifs, slack is idling at 9-12%. Slack Helper is at 26.9%. Brutal. Can't /collapse to fix this, either.
- In Advanced Settings, just turned on "Disable Emoji Spritesheet" and slack is idling at 7-9%, Slack Helper at 27-30%.
- In Accessibility Settings, disabled "Allow animated images and emoji" and Slack is idling at 0-1% and Slack Helper at 0-1%.
1. Delivering your app with electron 2. Writing a web app versus writing a 'native' app
Yes, delivering an app with electron might be subpar as it brings code to your computer which it probably already has. Most Computers which are targeted by electron apps already have a browser and lots of them have up-to-date chrome or firefox browsers which offer features very similar to electron. So I don't say there is no reason why one should use electron, but I urge every developer to make their web apps accessible to browsers too and let people use their browser if they want. Even offlines usage is no problem anymore as we have serviceworkers in the majority (by market share) of browsers nowadays.
The second point, however, is very poorly laid out in the blog post. Web apps do not have a general problem with performance as suggested by the article. Maybe some are badly developed but in the end, they are all backed by the tremendous efforts that were put into browser performance in the past years. The question if web apps can deliver the required performance was answered by the 60 FPS discussion a few years ago.
At the moment, the web is the only truly OS independent platform I know of. That is a very valuable feature and one we should treat with the deserved respect. So please write quality web apps and do us all a favor, instead of just choosing one specific platform. Yes, react-native is an option too, but I think it is a bit limiting to define just one framework as the one true way.
In a sense what we really want is for the browser to be an OS-level feature so that the browser-based-app is low cost, as is the case with chrome OS and you could argue was Microsoft's vision with IE. This is doable today if you write cross-browser code and wrap your web app in a platform-native web view, but then you lose the conveniences of Electron (cross-platform APIs to solve common problems such as menus) AND you have to deal with browser incompatibilities. All this to save RAM and 5% Of one CPU core.
Perhaps in an ideal world we'd have a lightweight VM with nice JavaScript APIs. The immediate problem we run into is that really fundamental UI gadgets, such as styled text fields and canvases, are not implemented similarly on the platforms we care about (Windows, Mac, Gnome, Android say), so we have to reinvent that wheel and before you know it you have another bloated virtual machine, except this one isn't battle tested and it only exists three years in the future.
I totally see the pain and the burning need out there for a way to write something that works across the "big three" platforms that have grown more and more distant from each other over the years. But Javascript and a browser? Really, that's the answer? I'd even be willing to toss out my investment in Objective-C native code on macOS if I could keep my C++ business logic. Is Qt really viable? My understanding (again, maybe dated) is that a Qt application looks like a Qt application, not a native application. Is this still true?
Yep. I've just got back from spending over a month on a ship in the middle of the Atlantic, with two very flakey 256kbps satellite connections (capped to like 125kbps each as well). Shared between roughly 50 people. Our policy is to let anything through (it's a research ship, so being able to look up stuff on the internet is a must) but aggressively apply QoS rules and caching to the network. With the sheer amount of applications that assume they have a low-latency high-bandwidth connection which they can open hundreds of TCP connections on, just tweaking the firewall / bandwidth shaper / application control is a full-time job just by itself.
First observation, relevant to Slack: Before we locked down the firewall, Slack running on 2 laptops was by far the highest traffic application. Even though the few Slack users just had the client open but minimized - not actually using it. It was persistently using 20kbps, all day every day, until we blocked it outright. What the hell other stuff does it have to do other than download text!? Slack / other devs using Electron oughtta test their apps on extremely slow shared internet.
Second comment, relevant to Facebook intentionally slowing down office internet: The Mobile Facebook site (m.facebook.com) was by far the nicest to use on our severely degraded uplinks. No timeouts, pages took under 10 seconds to load, we didn't have to wait several minutes of blank page while another F%$£ing web font that's Arial but with the letter T slightly more aesthetically pleasing to download. No massively parallel loading of resources. Good use of caching.
It struck me that a lot of our problems were problems because devs never have to deal with that kind of crappy internet, it's not an edge case that gets tested. It results in people unable to load important stuff like Google, GMail, Outlook web app, and as such their products lose users. No matter how much we tweak our network internally, even restricting the internet use to a single computer doesn't result in usable web apps anymore. This is probably something that we share with third-world internet; a much larger market than our "research ship" niche.
Finally: People who put company logos in their email signatures hate other people. Base64-encoded PNG images make one-line email responses increase in size by like a factor of 100.
They go on and on how terrible desktop development is, because hey it wasn't equally fast as JavaScript when they had never tried it. Newsflash it is slow and hard to do things you have no experience in.
As a counterpoint, I was able to create a mobile app with native tools for both Android and iOS in less time than it took me to create one in JavaScript. Cross platform JavaScript is highly overrated. It really isn't all that cross platform, often buggy and with primitive debugging and development tools.
Allowed us to watch videos, drag and drop, consume all kinds of media and have interactive applications on the web which were at the time totally unachievable with JavaScript.
Is the internet's memory so short that you've forgotten how recently we have largely switched to HTML5 video?
Doubtless there's multiple technologies before my time that gave us the same powers, but were abandoned because reasons.
Yes, most of them probably won't notice the performance impact. Most of them also don't notice whether their applications are insecure or overstep their privacy boundaries. It doesn't mean we shouldn't care about security or should build hidden trackers into all the code we produce.
That aside, Electron is just an ugly idea in general (obligatory IMO). I wouldn't want to run an entire browser just to run my own apps, next to the actual browser.
And I say this as someone who works almost exclusively in web development and who likes javascript.
It behooves all developers to learn multiple languages, there is particular benefit to learning languages with differing paradigms.
Even if you only use one language for formal development, the mental agility that thinking in more than one language gives is super valuable
I agree that Electron has its issue like having multiple copies of Chromium (and not Google Chrome).
Obviously native apps are better overall, but only if they provide a better UX. Being a vscode user, I don't know which native editor provides the same UX.
VSCode is clearly aimed at people who disagree with this statement. It's hardly a matter of objective fact.
"Native" should mean that it uses native UI widgets offered by the platform itself, which hardly any editor does.
Seriously, if browsers supported an app:// URL which just ran a local site with special privileges and allowed for some custom branding Electron would be dead overnight.
Those who do not know history are doomed to reinvent it, poorly. Or something like that.
I didn't know that was possible, do people do that?
https://developer.apple.com/reference/webkit/wkwebview
https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.con...
There are working solutions for cross-platform native UI development and high-performance, slim code: http://wiki.lazarus.freepascal.org/Multiplatform_Programming...
The problem is: most people don't bother learning new languages unless it's very easy (well, Pascal is!). I hope Go will have a cross-platform UI soon.
And Go already has bindings for QT which is a cross-platform UI framework.
This has nothing to do with people not wanting to learn new languages, it's just the time it takes to build an app. For you to build a QT hello world app takes probably 20 minutes worth of downloading, setup, and coding. To do the same you download electron, create an index.html with hello world and drag and file into electron, bam a hello world app.
The problem is desktop development is overly complex. React and modern Javascript make creating desktop apps using HTML/CSS with some combination of Javascript easy.
What we need to do is find a way to create a very slim browser that contains just an HTML/CSS to 2d context and a Javascript engine. Call it Electron slim and release that.
It's the RAD choice for beginners since... ca. 1997?
> For you to build a QT hello world app takes probably 20 minutes worth of downloading, setup, and coding. To do the same you download electron, create an index.html with hello world and drag and file into electron, bam a hello world app.
Perhaps the first time ever, the 2nd attempt you will be equally fast.
Does a well-funded startup not have 20 minutes to test a platform?
As far as Lazarus is concerned: give it a try, it won't take 20 mins.
> What we need to do is find a way to create a very slim browser that contains just an HTML/CSS to 2d context and a Javascript engine.
Christ, no. There are no slim browsers anymore and it's a pitiful environment for native applications.
Electron lets you write desktop apps that work decently well everywhere in a language you already know.
Hmm, PyQt would remove the need to use c++ if that is an issue.
I downloaded bunch of cpu profiler tools to observe how much CPU does spotify, slack and atom and also some other fancy react, electron app built apps take. Results are unbeliavale.....FYI: My Ram is 4GB with two 2GB slots. But after a complete cleanup and deletion of above troublesome apps performance is just amazing. I'm having a happy life with my WebStorm. I'm very positive that for my future node.js apps that is running nodemon would be fine too.
RIP Electron Family of Apps .
But everyone is using a slightly different version of Electron and macOS and Windows don't have a good enough package manager, so everyone is static linking everything.
I also recently joined the discussion with a more general idea which I (partially) expressed here: https://github.com/electron/electron/issues/673#issuecomment...
I feel like I agree with most what's said there, the same would apply to NW.js and the likes.
This should be a heads up for GUI developers to [re]consider Qt and QML. It made real progress in the last few months. and there are some nice bindings to it.
Somebody needs to write a variation of Sisyphus that turns the boulder into UI development. Suggest not spreading this web dev lunacy onto desktop. The issue has already been solved with reasonable solutions for 25 years. Desktop development, automatic software updates, all that stuff.
If you want a compromise between easy multiplatform desktop app development and not wasting resources, the ideal way there may be something like Microsoft's React-based desktop framework that they just released. (in my opinion at least)
Real-time update:
I just checked Activity Monitor and Hyper is leading average energy impact followed by Xcode. Looks like I might be switching back to iTerm this weekend.
That's actually the biggest selling point. I couldn't imagine using Hyper: I open terminals very often and waiting for Chrome to load when I need to just run a command would be very exhausting.
I found a patch with dark mode in iTerm which I'm using now: https://github.com/gnachman/iTerm2/pull/318
I find disgusting that Electron (or even UWP apps) can't do that on PCs with high-end hardware. A simple laggy fade effect on a modal and my eyes start rolling to the back of my head.
Electron is very suitable for the particular contexts that it fits within, and OP made some salient points that there are some settings where it clashes with user demands. For the paying market that say, Slack cares about though, they are not sensitive to the tradeoffs made to run Electron underneath to the point that it hurts Slack's revenue to a level Slack cares about. This opens up an opportunity for someone else to step in and take the niche that Slack has currently declined to occupy, and that's not a bad outcome.
There's some excellent software that uses it, but using the Chromium browser as a runtime is a dirty half-measure. I hope they're trying to pare it down in future releases and make an effort to utilize host-OS resources.
The less your code is doing, the better!
And Slack (a company valued at $4 billion) writes some intern-level Electron apps.
This comes from a desktop dev living in Europe (also frontend dev, backend dev, "you name it" dev).
This goes to you bay area folks, you hipster-coders, JS-framework lovers ;) No offense.
But there are a few differences between Flash and Electron that are not small. I mean the first thing is, Electron is open source in a open Standard, and have a fast development cycles to fix performance and security issues.
I think it's like a PHP situation. Electron is easy to use and sells itself as a cheap way to build apps, so this attracts lazy developers so we have a lot of problems, but that doesn't mean the technology is bad. But this is not a Electron problem, I mean web pages right now are heavy and slow for nor real reason. We need better fron-end developers.
I love VS Code, Hyper, and others, so maybe I'm biased, but I think Electron will be a interesting option to make desktop Apps something again.
For most of the computing world, desktop apps have never stopped being a thing.
I was thinking more in the Hype thing for new developers. You know like a small Renaissance in the Desktop UI/UX deparment, you know would be cool see beautiful desktop Apps in sites like Behance, Dribbble, etc spotting the first places, instead of the classic App with default OS UI or weird adapted ports of Mobile apps.
Lots of developers have great ideas when they are given space, meaning when it's in the "sprint". Some developers simply don't know about the existence of benchmark tools, etc., but, by experience, many of them know how to google.
What matters is 1) time-to-market, 2) it's swooshy enough, 3) it does what it's supposed to do.
I may also completely wrong: it's not always management to be bad here. Sometimes, it's a "bunch" of people who think they are doing the right thing (like choosing a technology instead of another). Management can't always be blamed for it (of course not) - especially when one of the people choosing is trustworthy.
I wonder why the author doesn't just use the web app in chrome. The notifications works pretty well.
Personally, I prefer the performance penalty and enjoy apps in Linux than having great desktop apps that only work on Windows and/or Mac. It would be great to not have to choose but we all have limited resources and Linux often doesn't make it in native desktop apps.
This helps in 2 ways:
- Safari is less of a resource hog than chrome
- It avoids the huge 380 meg download of electron
But it doesn't solve the runtime problems. The app is still running inside a VM (safari), so its still going to be way slower than its native equivalent and it'll use way more memory. Also in a real browser background tabs get throttled in dozens of ways. But I bet none of that throttling happens via Fluid, because even background windows can be visible at any time on macos.
I'd be curious to see a quick comparison of CPU and RAM usage of slack-for-desktop and slack-in-fluid if anyone is willing to give it a whirl. I'd do it myself except I deleted slack after writing that blog post.
Slack Electron: 4 processes, 56 MB + 355 MB + 64 MB + 29 MB = 504 MB
This is after signing in to one team, (janky) scrolling through a couple of channels and running for a few minutes.
This app provides video communication, screen sharing and chat so is comparable with the Slack, Skype and others.
Sciter core is a single dll of 5-8 mb in size (StartMeeting uses it as a static library ).
Sciter does not create any processes or even threads (modulo HTTP client that uses thread pool). StartMeeting runs the same UI on all supported desktop platforms: Win/Mac/Lin.
I don't see any meaningful suggestions in this article, just complaints.
You don't like how resource intensive electron apps are? Well, don't use them. If its really a big deal, people not using the apps will inform the people making the apps that they're bad.
That's not happening, so clearly it's not a big deal for most people.
Still... things could always be better in a perfect world.
Are you building desktop applications? What are you using for it then, and whats your cross platform perf story like? How long do cross platform releases take you? What are you paying for your tools and tooling?
Another lightweight alternatives to Electron are: Mozilla Positron (https://github.com/mozilla/positron), Webkit for Android/Windows (https://github.com/daewoong-jang/webkit-android) and Qt Quick (https://www.qt.io/qt-quick/).
Here's some irony for you: You really need an SSD in a modern PC - largely because of exactly this sort of insane bloat - and as a consequence, no, disk space isn't so cheap anymore.
Which one of these is the resource hog?
I'm not going to offer an opinion, but just anecdotal evidence. We don't use Slack, but since we have Office 365 I was tasked with evaluating if Microsoft Teams was something we should start using instead of Skype, etc.
I have advised to wait. I was seeing similar metrics to what OP is describing where the Teams Client was using 200+ Mb of RAM (many times more than VISUAL STUDIO).
Also the UI seemed laggy. I'm not 100% sure it is Electron, but the installer and interface seemed as much.
Electron, on the other hand, is open source and can be built for a wide variety of systems and CPU architectures, as well as it can be audited for security issues.
I expect that's correct - they are sometimes less important to users than other things. Emacs is tiny now, but at one time it was considered a memory hog and people kept using it.
PS, I notice that the author is using Ghost for the blog, so I am guessing the author is in the same line (like Node.js but not Electron).
I do wish big, well-funded companies would invest is proper native apps. I get that making it easy to crank out cross-platform apps has benefits, but is it really too much to ask for nice native implementations of our most important tools?
Fire up Chrome, doesn't happen. Go on a Hangout, yip "Preventing Sleep".
This would be a good idea even if Electron didn't have these problems.
Is the author going to uninstall Slack, Atom, Chrome, and Spotify, then?
Electron has won out because key apps have opted to use it and decided that the trade-offs of user CPU and battery are worth some amount less than their productivity as developers. Yes, there are alternatives to developing native desktop apps in JavaScript (I'm not sure I've seen React Native used this way, but it probably exists somewhere out there.) People opt for Electron because it's holistic, battle-tested and easy to use.
I'm not excusing Electron's (many) flaws. There should be a concerted effort by the team to "disable" parts of Chrome that don't make sense for native apps, or at the very least let it be configurable. He's right, there's no reason Slack should have access to the GamePad API (or WebVR, etc.)
My overall point is that like everything, productivity of the end-user is always going to have some kind of trade-off with the productivity of the developer (or more specifically, the business considerations of the company.) Always. We don't write assembly anymore even though the apps would be a gajillion times faster than writing Electron-wrapped web apps.
Now, complaining that Electron/Slack/etc. are CPU/battery-hungry is completely valid and a good discussion to have, but you only get me to jump into the HN comments once you start delivering global developer edicts with no regard for the other considerations those projects have made.
> The other sad fact is that even most developers have no idea that this is even happening on their computers. They run slack but have no idea how hungry it is. As a developer its your responsibility to know this stuff.
I'm not sure I completely agree here, "responsibility" is a bit heavy of a word.
> Users: Please complain more about slow programs. Its 2016. We carry supercomputers in our pockets. Its simply not ok for apps to be sluggish.
Wait, this is the first instance (edit- second, but mentioned in passing in the previous paragraph) the author mentions "sluggishness" as a metric. IMO sticking with measurable stats like CPU and battery life are better because you have no idea if someone other than yourself experiences or even perceives this sluggishness. What about non-developers at BigCo that only run Chrome, Slack, Spotify, and Word? Would they feel sluggishness? I would guess not, since I rarely experience it as a developer on a Macbook using Chrome, Slack and Atom. (Things only get dicey when I start doing Vagrant stuff.)
> Also all you web devs: Go learn C or Rust or something. Your program runs on a computer. Until you know how that computer works, you're doomed.
Doomed to have a successful career? I prefer being "doomed" then. (For the record, I do know
> And until then get off my lawn shakes fist.
Aaaaand there we go. Maybe next time don't bury the lede? :P
> Oh, and read this talk on the website obesity crisis. Its very funny. And very sad. And very true.
This is an entirely separate concern (and one I agree with.) Heavy web pages are heavy because they are multi-megabytes to download, not because their "installed" wrapper (Chrome) is hundreds of megabytes.
I read Slack in emacs. I write code in emacs. I browse the web in emacs & Firefox. I play music via my phone's native Google Play Music client, although if I wanted to I could use emms, an emacs music-playing mode.
I have no desire to run some GUI-only, CPU-hungry, memory-ravenous, of-the-moment JavaScript nightmare of a program. My productivity as a developer is hindered by those things. I have no desire to write JavaScript: I'd rather write Lisp, or Go, or Python.
Yes, it's possible — and preferable! — to uninstall Slack, Atom, Chrome and Spotify. Try it today.
Side note; many of said devs also used OSX instead of linux, maybe some correlation there.
Emacs is where it's at. Really, it's my main operating system. Email, org-mode, erc for IRC, RSS reader, editor, twitTER, eww (for some things like documentation), dired for folder management etc. Currently working on learning ledger.
"Using a free version of vi is not a sin but a penance."
Food for thought. :)
One serious nitpick with you though. "Heavy web pages are heavy because they are multi-megabytes to download...) In my experience, heavy web pages are heavy because of the dozens of scripts being run on the pages, often based on bloated frameworks. Running uBlock and NoScript in advanced, I see it all, and I immediately think less of any site trying to load more than 3 scripts. Often I come across sites trying to run 20+. That's why the web is heavy today, not because the sites are huge to download.
Memory used is 71 MB Total no. of processes: 5
Measured using Windows Sysinternals - Process Monitor.
Wasn't AIR Flash for the desktop? And didn't that already flop?
see here for more numbers and details https://discuss.as3lang.org/t/adobe-air-by-the-numbers/476
Yeah it makes slow apps, but these apps wouldn't be possible otherwise. It's perfect for prototyping new exciting ideas, it's fun to use, and there's no alternative.
When your app get super popular maybe you should rewrite it in gross native code though.
VSCode gets around this by running an npm node locally.
- using Electron: 1 month
- using QT: 2 years
(by reusing the chrome context, your memory usage wouldn't grow unnecessarily for each new slack/spotify/whatever you open).
Not many of them are good though, as it's hard to bind C++.
If you want to work with Qt, C++ is really the best option. And not many people know that language well enough. They know JavaScript though ;)
- Yes, desktop apps existed before Electron. But the top comment is right. How many desktop apps. NOT utilities but full featured apps (like Spotify and Atom) that you loved either got swallowed up by other companies (Mailbox) or discontinued due to "lack of use" (read: lack of profitability). I'm sure if you dig deep you can remember quite a few...
I'm a game developer with a background in C++. But I'm developing my company's prototype in electron. This is because I can do it myself without needing to tap a bunch of people to help and find funding. I can bootstrap. Electron allows this and it's incredible. I couldn't make a cross platform game engine in a year on three platforms using native. Maybe you can and you're just a better human/coder than me (but seriously, email me in a year with your progress!) but Electron is allowing it.
What does this allow? This allows me to release a product (yay) and maintain a product easily (double yay!) and when you guys don't throw money at me.... I can KEEP maintaining it because of my low overhead. With native code and a staff of 20 I would be forced to shut down the product.
THAT BEING SAID
If the game does well? I'm not only using Electron, I'm using React (yes, it's a game. Yes I know, I've had this discussion. I'm crazy) so the next step is to port it to react native on the desktop and remove the Electron dependency. Totally doable since Microsoft is supporting it on the Univ. Windows Platform (https://github.com/Microsoft/react-native-windows) but macOS? Someone's working on it but it's of course not apple (https://github.com/ptmt/react-native-macos). Ubuntu is on top of shit though (https://developer.ubuntu.com/en/blog/2016/08/05/introducing-...)
I can't speak for Spotify or Slack or any of the people mentioned (yes I know Spotify isn't using electron) but for a small company of 1 and a half people Electron is allowing innovation and project completion in a way that nothing else is for me. It's a great door to open to allow future optimizations. And hey, maybe Electron will slim down too... give it time. Remember how bad Windows development was? No? I do. But .NET has come a long way, maybe electron will too. If not, we can always port!
1) After years of C++ in games, I've written a lot of JS. I believe in where the language is going and I saw an opportunity to use JS to write a cross platform 2-D game engine with low overhead and went for it
2) Unity lends itself very well to 3D games in my experience, or 3-D games with a fixed camera to look 2D. So this would likely lead to overhead involving "Well, let's just render the 2-d components in 3-d" which easily spirals into needing a modeler, a rigger, an animator, a concept artist and a programmer MINIMUM to run the game. As it stands now I need a 2-D artist and a single dev.
Oh, I lied:
3) I can't create a business as easily marketing a unity mod than marketing a stand alone FOCUSED engine on one type of game. But if my plan fails, I can still write a unity renderer for my game since most of my logic is serverside and platform agnostic. So who knows! :)
I don't think it's fair to label Electron as Flash just because it's doing things in the background that Chromium authorizes. We know that Chrome Browser and it's underlying technology is in use everywhere and anyone can open it up and take a peek or embed Chromium in their C++ projects.
On top of that Electron takes care of cross-platform issues, and it's performance is under constant iteration by Google, so you have a much better chance of getting to market without having to do the plumbing work.
While I share the concern that Electron seems to spin up fan on my Macbook, it's quite rare that I don't think much about it.
If anything, Electron improves desktop user experience by leveraging web technology. I shudder to think what Slack will look like if it was done with Java Swing. But in some HN'ers mind, that is the "right" way of building this world. I see a big split in thinking amongst the demographic well marinated by Java Is Everywhere (TM) vs Javascript is Everywhere.
I love getting a chance to get out of web-dev world and go build some ugly tools with WinForms from time to time. You have to do more work yourself, but there's so much less magic involved.
I had no experience with them: did they gain some adoption or recognition at least?
Maybe all cross-platforms app solutions are just doomed to stagnate, at least until the next hype one rises, after all.
The flash analogy doesn't hold in any way. "Well, flash was errr ummm BAD you know.... and this electron thing it's BAD too .... err umm SAME AS FLASH!
Grumpy grump just wants to yell and stomp.
I am developing one electron app, and it is going great. And I don't even know javascript that much. But in my case, usage of browser engine is essential, since it has to do with rendering HTML and so on. I have less than 1000 lines of javascript and almost everything was working after 2 weeks.
It is not that big of a project anyway, but from the begging I knew that it should be fairly easy and doable.
In fact, I can imagine that I could do so many kinds of apps with electron, and I can easily see how I would approach it.
Let's say music player. No problem. I believe that electron can easily play media, and it would all look great. Or some productivity tool, or note taking app. Working with files, editing text files, even viewing documents like .pdf would be easy (would just use some plugin). Or even embedding youtube videos in notes would be easy. And all that with easy control of layout and great rendering of fonts and images, plus animations.
With little knowledge of front end stuff, and some general programming principles, you can already see how you could build app on the top of electron, which is a platform everyone here knows without even trying. It makes me feel kind of powerful to be able to do such a nice apps myself.