32 ms·
Here's the thing. You know what the alternative to all of these Electron apps coming out is? If your answer is "A native Cocoa/WPF app", you are on another plan
by anaisbetts 10y ago
Here's the thing. You know what the alternative to all of these Electron apps coming out is? If your answer is "A native Cocoa/WPF app", you are on another planet, the answer is, "It wouldn't exist at all".
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.
- hn_throwaway_99 10y agoThe other thing I find ionic about this whole article is that it's perfectly easy to only use Slack within Chrome as a normal web app. And the UI is almost exactly the same because it's nearly all the same code. So if the Electron bloat is such as issue for you, just hit Slack in the web directly.
- joshstrange 10y agos/ionic/ironic 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.
- cozzyd 10y agoIndeed, we should start calling electron-less applications ionic.
- apexalpha 10y agoI do this. Go to Slack and click 'add to desktop' and Open as Window and you're good to go. Same for Whatsapp Web etc...
- stiGGG 10y ago>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?
- srssays 10y agoUse Safari then.
- stiGGG 10y agoSafari just doesn't work for me. It's my favorite browser ui wise, every time i'm getting a new machine i first stick with safari, but after a while under heavy use i notice all the problems with Safari getting slow, doing weird things, etc and i find myself on the Chrome download page again :(
- cyberpunk 10y agoWhile I was on mac i got an extra few hours of battery life from using safari. I'm on Firefox these days; with noscript (once you go through the initial few days of pain whitelisting things) it works brilliantly; I would suggest you give it another chance.. Unless you try to book flights from britishairways though.
- cyberpunk 10y agoSo just run it in a dedicated chrome window so you can alt+tab to it directly? 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..
- jbreckmckye 10y ago
- matthewmacleod 10y agoThat's nonsense. Desktop apps have been frequently released since forever. 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.
- Touche 10y ago> They fail to integrate with the host platform 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.
- matthewmacleod 10y agoI accept that not everybody will feel the same way – I do care about my local platform. I want to hit 'space' when I have an item selected and see quick preview. I want my documents indexed in Spotlight, I want to drag-and-drop files between applications, and I want all the rest of the UI niceties I am used to.
- 10y ago
- deleted 10y ago[deleted]
- currysausage 10y ago> Nobody cared about writing Desktop apps before Electron came along, there's basically zero money in it 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>
- matthewmacleod 10y agoSeconded for the Mac app. The current experience is shameful.
- enobrev 10y agoI have no opinion about their app on those platforms, but as an Ubuntu user, I very much appreciate their electron app.
- nojvek 10y agoYes, the big companies really don't give a fuck about Linux because it's user share is tiny for the desktop. The fact that a Microsoft editor works on Linux is amazing. Underlying thanks to Electron.
- tommoor 10y agoThe Spotify app is not built on Electron - it's built on CEF and always has been, author was wrong.
- tcoff91 10y agoSpotify was not always based on Chrome -- the first version came out only a month after Chrome itself first was released.
- joshstrange 10y agoCompletely agree. I simply have no interest in learning any native desktop programming and if I did it would be for my platform only and I wouldn't waste my time writing it for linux and definitely not for windows. I'd release what I had on github and move on. Now I can throw together a small (small by custom code sizes, I know electron is heavy) amount of code and get a cross platform app that doesn't look terrible in relatively short time. I think it's a great first step for a PoC. If it gains enough interest AND (<- big and) you NEED to go native for some reason you can go native later. There are a lot of things you can say bad about electron, yes it's heavy and "bloated" for most uses of it, but if people think empowering others to build things they couldn't or wouldn't before is bad because of how they built it then they are already a lost cause and probably think we should all be writing assembly still.
- rimliu 10y ago> 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.
- joshstrange 10y agoI am a web developer, I know that might be a dirty title in some circle but I really don't care. There are countless amazing things built on technology that people hate for whatever reason. PHP, JavaScript, and even Flash comes to mind. Guess what wins in the end? The thing that gets the job done quickest and easiest. It's one thing I really dislike about HN, the need to let everyone else know how terrible their decisions are because they didn't go as low level as the person posting the comment. "Oh you used PHP? Real programmers use C++" "Oh you used C++? Real programmers use C" "Oh you used C? Real programmers use assembly" "Oh you used assembly on a CPU? Real programmers design and build their own FPGA's for their code". Nothing is forcing you to use things built in electron so if it's so terrible then don't use it and move on with your life.
- deleted 10y ago[deleted]
- mentos 10y agoI agree and the author fails to mention the tradeoff between ram/diskspace and development time. >>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?
- fauigerzigerk 10y agoPremature optimization used to mean optimizing something that doesn't cause any noticeable performance degradation. 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)
- overgard 10y agoC is not that hard! If you're a programmer, and you don't know C, you're not good at your craft. I realize that sounds incredibly harsh but it's true: your job is to make a computer do a task efficiently. If you can't even read the language that makes that possible, you don't know what you're doing.
- cr0sh 10y agoI could re-write your argument by replacing "C" with "x86 assembler" - but I won't. However, the argument could still stand, but I'd hesitate at saying it's a wholly valid argument. 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.
- gkya 10y ago> Nobody cared about writing Desktop apps before Electron came along, there's basically zero money in 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.
- spiderfarmer 10y agoI guess he meant Indie developers. I am one. I didn't care, but do now.
- mantas 10y agoEh? Indie developers thrived on Mac ecosystem for years.
- vram22 10y agoAnd also on Windows, and even on DOS, before Windows. Googling terms like "shareware" and its history (not the only model, there were, of course, outright paid products too), will show some stories, maybe not a lot, since some of this was before the web, so not archived. But will show enough to get an idea. Jim Button was a classic example, but there were many other indie devs (many of them one-man shows), who may not have made it so big, but made good money from desktop apps. Google term: shareware jim button Edited to add: http://asp-software.org/www/history/the-origin-of-shareware/ http://asp-software.org/www/history/the-origin-of-shareware/
- LeoNatan25 10y agoBy "nobody", he means JavaScript "hackers" (his term) and webdevs. How joyful that those types of "devs" are now excited and "care" about desktop and mobile development.
- gkya 10y ago
- anon1385 10y ago> finding specialist developers who know these dated technologies 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.
- pikzen 10y ago>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. >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.
- cr0sh 10y agoOne of these days, you'll look at 850 MB of RAM like I used to see 4K of RAM: Amazed at how small it was, and how much we have today. 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!).
- Volt 10y agoAnd yet, we live in the present. The rate of software bloat is outpacing improvements in commodity hardware.
- pvg 10y agoNobody cared about writing Desktop apps before Electron came along, there's basically zero money in it You could open the Mac App Store, pick the 'top grossing' category and count the number of Electron apps.
- carlosrg 10y agoBullshit. Spotify, for example, existed before Electron, and it was very fast. Text editors existed before Electron, and they didn't require 300 MB minimum to run. Same with collaborative chat programs. Electron is just a way to reuse web developers for desktop development - I.e. a way companies now have to cut development costs.
- burnbabyburn 10y agoclearly you aren't talking about emacs :)
- coliveira 10y agoI remember a long time ago people discussing that Emacs would never be popular on PCs because nobody had 10MB sitting around just to use a text editor...
- agos 10y agoaren't all tools a way to cut development costs?
- wishinghand 10y agoVim and Emacs are probably much slimmer, but a comparable GUI editor- Sublime Text, is using 311 megabytes for just one window of a folder that has 200 files in it.
- kenferry 10y ago> 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 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.
- addicted 10y agoDeveloping for Mac may = Developing for iOS. Developing for Mac + Windows + Linux + Web > Developing for Electron.
- falcolas 10y ago> You know what the alternative to all of these Electron apps coming out is? 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.
- slantyyz 10y ago>> 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. 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.
- disposablename 10y agoIE10/11 let you pin any website to the taskbar with its own icon, complete with notification overlays: https://msdn.microsoft.com/en-us/library/gg491738(v=vs.85).aspx https://msdn.microsoft.com/en-us/library/gg491738(v=vs.85).a...
- lerpa 10y agoSame for Chrome: http://www.geekpen.com/wp-content/uploads/2016/12/Chrome-More-Tools-Add-to-Desktop.jpg http://www.geekpen.com/wp-content/uploads/2016/12/Chrome-Mor... Probably Firefox also has this.
- BuuQu9hu 10y agoHere's the thing. You know what the alternative to all of the JS that's been written? If your answer is "Keep writing more JS," then you are on another planet. The answer is, "We have fucked ourselves as an ecosystem by permitting a monoculture to flourish, especially one which prides itself on worship of bad languages, bloated runtimes, convoluted abstractions, and general fuckery." 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.)
- frozenport 10y agoI know it's a parody but: https://github.com/jashkenas/coffeescript/wiki/list-of-languages-that-compile-to-js https://github.com/jashkenas/coffeescript/wiki/list-of-langu...
- cr0sh 10y ago> like a pig farmer trying to sell pigs' feet Actually - pig's feet are actually a pretty good eatin' portion of the pig. If you've ever had them, you might agree.
- devmunchies 10y ago> Nobody in the last ~20 years has cared about writing Web apps before JS came along. There's basically zero money in it 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.
- Philipp__ 10y agoWow, that's bullsh*t. Sorry but what you said was factually incorrect. 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.
- dubcanada 10y agoCan you expand on your last sentence? How is React + browser rendering any different then QT rendering? How is HTML/CSS any different from QT layout xml? How is QT sockets/threading any different from NodeJS sockets/threading? 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.
- Philipp__ 10y agoHaven't wrote a lot of QT, but Cocoa/DELFI felt totally different than writing Electron app GUI. 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.
- cr0sh 10y ago> Writing Electron app felt like sketching, at least to me. You place one line of code with tags and boom there's a button. Runtime issues aside (bloat, cpu, etc), why is this a bad thing? I like that I can write a single line of code and "bam!" get a button (or any number of things) to appear. Why would or should I want things to be more difficult for me to develop a piece of software? Sure, I could do things in some other language - I mean, I know a ton of others. But implementing the same functionality can be a much larger pain in those other languages (and honestly, for app gui development, I haven't found anything that beats the drag-n-drop editor of VB3/4/5/6 - there was something close to it in Visual Studio for C++, but it still required some manual "hook up" with the code for callbacks and event handling and such). I mean - if I really wanted to do things "right" - why don't I just whip out my text editor and write assembly for whatever CPU I'm targeting? I can full control over everything, then! Best performance! Those guys and their compilers, I tell ya, they don't know what they're missing! (heh - sometimes they don't - there's a whole generation or more out there who've never coded for a CPU by looking at a datasheet and finding the byte values needed to represent op-codes to hand-assemble a piece of code - sometimes I do miss hacking on the Apple IIe and monitor - CALL -151 ftw) Anyhow - as someone who's been coding for longer than I really care to say (of course, I kinda gave my age away above!) - I don't want to return to those days; I kinda like living in the future of computing I could only dream about as a kid.
- hawski 10y agoHow many electron apps can run on the same machine? For many of them it can be beneficial to just be a website. 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?
- deleted 10y ago[deleted]
- goatlover 10y agoWasn't this basically true of Java in 1995? Everyone was excited about finally being able to easily write cross platform apps. And then there was flash that anyone willing to pay for the designer could build apps that could run on any platform. So now we're on to the third thing.
- jjtheblunt 10y agoBologna: nothing truly performant uses Javascript because Javascript can't get at hardware accelerators in their full glory. Apple's macOS and iOS are themselves desktop apps, in the latter case for a pocketable desktop, and they resolutely don't rely on the very constrained subset of 50 years of engineering called Javascript.
- cyberpunk 10y agoHave you seen how many messages you can pump through and transform on a node process? Yes, there is an abstraction and that's a cost, but v8 perfomance is "good enough" for almost everything. 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....
- Asooka 10y agoThe weird thing is I'm almost certain you can build the exact same thing with e.g. python+Qt, do literally all the drawing using python code in custom widgets, and the result would still be nicer to use than the status quo. I'm not advocating switching to the PyQt stack, I just want the electron stack to be saner, in particular 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.
- Lagged2Death 10y agoPeople 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... 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.
- adamlong5 10y agoI can't speak for large companies trying to make the call on Electron versus multiple OS-specific apps, but for indie devs this is absolutely critical. 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_.
- jrowley 10y agoOff topic but I just checked out your app. Very clever! I'd love to see a world where it is integrated tightly with iOS. Writing concisely is especially useful on mobile. Also I dig the demo. Great example of why developing electron apps can be really beneficial.
- brandon272 10y agoThanks for your insight. The part that confuses me as a non-native developer is the folks in this thread who seem to be implying that there are only marginal amounts of additional time needed to release cross platform, fully native apps.
- mi100hael 10y ago> as a non-native developer 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.
- 10y ago
- cpburns2009 10y ago> Nobody 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. 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.
- goatlover 10y agoJava isn't new and shiny anymore. Having been around for the great Java hype of the 90s, it's crazy that Javascript has now replaced it. Nobody would have predicted that back then.
- lerpa 10y agoJavascript, Java, it's all the same after all ducks
- goatlover 10y agoI really hate Netscape & Sun for causing that confusion, and making Javascript look like Java on the surface, particularly as it obscured the prototypal model of JS and made anonymous functions clunky until the arrow functions of ES6. But it was good marketing.
- edko 10y agoIf, instead of Swing, you use JavaFx (which comes included with Java) your UI will look nicer. It even has an embedded Webkit browser that can easily interact with JVM code. This means you can program your UI in any HTML/CSS/JS framework you want, and any other logic in any JVM language (Java, Scala, Groovy, Clojure, Kotlin, Ceylon, Frege, etc.)
- maxsilver 10y ago> If your answer is "A native Cocoa/WPF app", you are on another planet 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.
- mlsarecmg 10y agoNo one is scared of C# and Swift, XAML and so on, but these technologies aren't even close to what you have available on the web. React and Redux make apps possible that you wouldn't get with older technologies, not even with 10 times the effort and code. The animation possibilities, transitions, the flexibility overall, the eco system, debugging capabilities, hot module reload - if you have worked with it, you will not want to go back. Case in point, modern apps like VSCode, Atom, Hyperterm, Discord do things that would be very hard for a native app to mimic, and they do that with absolute ease. 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.
- true_religion 10y agoWhat is VSCode doing that's impossible to do in a native application? I'm curious, since I use PyCharm and I wonder what I could be missing out on.
- zo1 10y agoYou get to write plugins for it in Javascript. That seems to be the big thing about it. I've tried it, the hype is just fluff.
- ivm 10y agoOne more "Big Deal" is that both Chrome and Electron are not accessible by default like native apps and take performance hits when VoiceOver is enabled. 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.
- andrepd 10y ago> Nobody in the last 5-10 years cared about writing Desktop apps before Electron came along 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?
- jernfrost 10y agoWhat planet are you on? I've been using great native apps since forever. I don't know what it is but there is a certain segment of the computer user population who don't seem to notice that awesome native apps exists for all sorts of stuff. "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.
- endless1234 10y ago>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. Why is Electron and similar so popular then, if it's easier to build native? Please don't say "because shitty hipsters".
- erikpukinskis 10y agoHe's right, and you're right. Web technologies have a low barrier to entry, so it's easy to go from inexperienced to productive. 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.
- overgard 10y ago> 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. 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.
- LeoNatan25 10y agoBy "nobody", he means himself and his JS "hacker" "dev" peers (his words from his profile).
- siddhant 10y agoSure, but that's not what the argument is. The argument is that electron apps are way more resource hungry than native ones.
- cyberpunk 10y agoSo what? We have those resources. 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
- Neeek 10y agoI think I'd like to do more with my machine as it's getting bigger and faster, not the same things from 10 years ago that now hog all of my excess. I have twice the cores, four times the RAM and an order of magnitude more disk space to play with than 2007, I don't think it's acceptable to just have applications take up an extra thread, twice the RAM and more GBs just because it's free; that hardware certainly wasn't free when I bought it.
- coldtea 10y ago>Here's the thing. You know what the alternative to all of these Electron apps coming out is? If your answer is "A native Cocoa/WPF app", you are on another planet, the answer is, "It wouldn't exist at all". 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.
- Touche 10y agoMaking desktop apps might be a nice lifestyle business for niche segments, but there aren't many (any?) big businesses built on desktop apps any more. Microsoft and Adobe are doing well on the desktop, churning out new versions of apps they've been building for nearly 30 years, but I can't think of any company built in the last 10 years (at least) that came up that way. In the meantime, here's one of those "web-based unicorns" you so despise: https://www.google.com/finance?q=amazon&ei=viTtWMGfNMWQ2Aa42K_4Dw https://www.google.com/finance?q=amazon&ei=viTtWMGfNMWQ2Aa42...
- overgard 10y agoIf you can't think of any companies that have built significant desktop apps recently, you're just not looking. I don't even get how this is an argument. "Well I haven't personally installed a native app recently, so obviously they're unimportant." 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"
- camgunz 10y agoThere have been so many desktop apps released since 2007-2012 that I really don't know where to start: - 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.
- spdionis 10y ago> finding specialist developers who know these dated technologies It's crazy to think that developing something native on Desktop using the default stack of the operating system means using "dated technologies".
- BrunoWinck 10y agoAgreed, I'm back to thinking desktop apps, thanks to electron. I did a project with Qt last december. It's usable but very old style and the license is not very permissive. A small electron app is not as heavy as I though first.
- kakarot 10y agoWhat? Qt is very popular and I use several Qt apps. Same for GTK. And there is MUCH more desktop software out there than functional web apps. I don't know what kind of Windows 10 fantasy land you live in but there has long been an answer to desktop apps. 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
- ksk 10y agoWhat is there to be excited about? Having your battery drain every-time your browser runs some JS app? Wasting CPU and memory that I paid for? Lost productivity waiting hundreds of milliseconds (sometime seconds) for any UI response? I dread using any technology coming out of a SV startup, and its rather sad. I want to be excited, but can't get myself to be. As an aside, with all due respect to these startups, calling them successful is premature. They only appear successful because they're burning through someone else's money. 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.
- easuter 10y ago> Nobody in the last 5-10 years cared about writing Desktop apps before Electron came along, there's basically zero money in it 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.
- zwetan 10y agowell... actually "flash for desktop" best known as Adobe AIR is a pretty good alternative to Electron.
- BatFastard 10y agoAnd is Electron more secure? I guess it doesn't have hackers all around the world trying to find vulnerabilities. Is that good or bad?
- zwetan 10y agothat does not apply to desktop app
- BatFastard 10y agoWhy not? Is it not using a VM for desktop app?
- zwetan 10y agoit is not the same security context between web/browser apps and desktop apps wether there is a VM involved or not. A browser can load remote payload (not under user control) that can then exploit browsers flaw, Flash AVM2 flaw, etc. On the desktop the user run a local exe/app which has de facto "full system access". A bit surprised you don't know that, it's kind of basic ...
- deleted 10y ago[deleted]
- ronreiter 10y agoYOU ARE SO RIGHT AND IT IS VERY SAD THAT PEOPLE DONT REALIZE IT
- Volt 10y ago>Nobody in the last 5-10 years cared about writing Desktop apps before Electron came along Maybe nobody in the Web bubble.
- drtse4 10y agoNice rant, can you name at least one of those mind-blowing apps that happens to be sold for real money? 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).
- killin_dan 10y agoYou couldn't be less coherent about this. 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.
- eridius 10y ago> Here's the thing. You know what the alternative to all of these Electron apps coming out is? If your answer is "A native Cocoa/WPF app", you are on another planet, the answer is, "It wouldn't exist at all". 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.
- ori_b 10y agoIf you ship an electron app, I don't bother downloading it. I usually just move on. If I don't have a good choice, I suck it up and use the web app. Electron isn't a better experience, and if it's in a browser, at least it can share some resources with other web pages.
- jackmott 10y agoIt is good that there is a nice cross platform 'thing' you can use to make desktop apps. But it would be better if the best thing that existed for this wasn't so slow. Perhaps someone can clone the outward api of electron with only a ~10% performance penalty instead of Two orders of magnitude
- ziikutv 10y agoThere was also node-webkit. Never forget.
- alkonaut 10y agoWhy would native apps be so expensive? Are they 10x slower to write? Isn't the tooling etc for making a WPF app at least as good as it is for electron? Obviously if you have a web app or node backend already you might have code you can re use but that's not the case generally. Just being able to not use Js should be a pretty big win (although .ts is also available for electron I suppose). Not to mention that libraries etc are specifically created for desktop and not web (e.g the xaml layout model vs the DOM). Or are they expensive because traditional desktop devs are hard to find and/or cost more? 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
- seanwilson 10y ago> You know what the alternative to all of these Electron apps coming out is? If your answer is "A native Cocoa/WPF app", you are on another planet, the answer is, "It wouldn't exist at all". 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.
- FridgeSeal 10y ago"Everyone has Jesus of memory, or doesn't matter if we chew through a bunch of it because we were to lazy to use the right tool for the job". 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...
- syrrim 10y agoWho gives a shit. The point of writing natives apps isn't just to check it off your bucket list - natives apps can have advantages over web apps if done right. Those advantages include better performance, integration with native UI components, integration with native APIs, and integration with the file system. The only one a "native" electron app can accomplish that a web app can't is the last one. If your app doesn't require integration with the file system beyond a file selector then an electron app offers no benefit AFAIK. Companies do it purely so they can tell everyone they have a native app without having to invest the work required to get a real native app. My suggestion for the author is to find a browser they like, and then run all electron apps as web apps within the browser whenever possible.
- deleted 10y ago[deleted]
- ender89 10y agoor, you know, a chrome app which works exactly like an electron app except they don't all require their own separate chrome instance. I mean an electron app is literally just a chrome app packaged with its own version of chrome.
- nebabyte 10y ago> You know what the alternative to all of these Electron apps coming out is? Do you think people 'knew' what was going to kill Flash before it died?
- ionised 10y agoYou should throw a disclaimer in here that you're an Electron Maintainer/Slack developer.
- ionised 10y agoYou should throw a disclaimer in here that you're an Electron maintainer/Slack developer.
- intoverflow2 10y agoDeveloper comfort over user needs in a nutshell for me. 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.
- z3t4 10y agoA better alternative is actually making a web app, and ship the server together with the client, for example a Node.JS script that does the stuff not supported by the browser, and runs the default browser for the graphical user interface.
- xiaoma 10y ago>"Nobody in the last 5-10 years cared about writing Desktop apps before Electron came along, there's basically zero money in it," 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.
- niutech 10y ago> Nobody in the last 5-10 years cared about writing Desktop apps before Electron came along What? Have you heard of Adobe AIR, AppJS, Node-Webkit (now NW.js) and Mozilla Prism/WebRunner?
- jaredcheeda 10y agoWhat about NW.js, It's the real hero here. They spent 5 years building up the platform, being used by thousands of companies and apps, basically inventing this technology; just to have GitHub buy up their intern and pay him to make a shitty knockoff called "atom-shell". You're excited because someone tossed a marketing department at a shitty knockoff? 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.
- samuell 10y agoIf more developers had a second look at FreePascal/Lazarus [1], they'd realize they could do pretty much the same thing, but with native compiled speed, minimal memory usage (no bundled JREs) on all the desktop platforms. 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. [1] http://www.lazarus-ide.org/ http://www.lazarus-ide.org/ [2] https://github.com/nbisweden/mdc-file-export https://github.com/nbisweden/mdc-file-export
- Fire-Dragon-DoL 10y agoThanks, you summarized my thoughts.