Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
Desktops (Apple) Programming Windows Linux

In Defense of the Popular Framework Electron (dev.to) 138

Electron, a popular framework that allows developers to write code once and seamlessly deploy it across multiple platforms, has been a topic of conversation lately among developers and users alike. Many have criticised Electron-powered apps to be "too memory intensive." A developer, who admittedly uses a high-end computer, shares his perspective: I can speak for myself when I say Electron runs like a dream. On a typical day, I'll have about three Atom windows open, a multi-team Slack up and running, as well as actively using and debugging my own Electron-based app Standard Notes. [...] So, how does it feel to run this bloat train of death every day? Well, it feels like nothing. I don't notice it. My laptop doesn't get hot. I don't hear the fan. I experience no lags in any application. [...] But aside from how it makes end-users feel, there is an arguably more important perspective to be had: how it makes software companies feel. For context, the project I work in is an open-source cross-platform notes app that's available on most platforms, including web, Mac, Windows, Linux, iOS, and Android. All the desktop applications are based off the main web codebase, and are bundled using Electron, while the iOS and Android app use their own native codebases respectively, one in Swift and the other in Kotlin. And as a new company without a lot of resources, this setup has just barely allowed us to enter the marketplace. Three codebases is two too many codebases to maintain. Every time we make a change, we have to make it in three different places, violating the most sacred tenet of computer science of keeping it DRY. As a one-person team deploying on all these platforms, even the most minor change will take at minimum three development days, one for each codebase. This includes debugging, fixing, testing, bundling, deploying, and distributing every single codebase. This is by no means an easy task.
This discussion has been archived. No new comments can be posted.

In Defense of the Popular Framework Electron

Comments Filter:
  • Honestly this is the first time I heard of it. Most likely as the explanation illustrates it isn't a tool that I need to solve my problems. But still if a tool was really that popular I would had heard about it before.

     

    • Re: (Score:1, Informative)

      by norweeg ( 4623843 )
      Its basically a tool for building desktop applications with HTML, CSS, and Javascript. https://electron.atom.io/ [electron.atom.io]. Slack, Visual Studio Code, and Github desktop all use it.
    • Now you've heard of it.

      It must be popular!

    • It is a framework, not a tool.
      If you only listen for tools, obviously you don't hear the framework.

    • Honestly this is the first time I heard of it. Most likely as the explanation illustrates it isn't a tool that I need to solve my problems. But still if a tool was really that popular I would had heard about it before.

      Obligatory: https://xkcd.com/1053/ [slashdot.org]

      (To be fair, I'm another one of the 10,000)

    • by Anonymous Coward
      Modern appy app apps like Apptron let you app apps while apping other apps! You can't do this with LUDDITE C++!

      Apps!
      • by Whibla ( 210729 )

        I can't work out, given the topic, if this is an apt comment or not...

        • I can haz Perl-Gtk+? I can haz multiple platforms? I can haz 1999 in 1998? I can haz 1999 in 2017? I can haz LUDDITE Gtk back?!

    • Java, a popular framework that allows developers to write code once and seamlessly deploy it across multiple platforms, has been a topic of conversation lately among developers and users alike. Many have criticised Java-powered apps to be "too memory intensive."
      • JavaScript. No relation to Java.

    • On a typical day, I'll have about three Atom windows open, a multi-team Slack up and running, as well as actively using and debugging my own Electron-based app Standard Notes. [...] So, how does it feel to run this bloat train of death every day? Well, it feels like nothing. I don't notice it. My laptop doesn't get hot. I don't hear the fan. I experience no lags in any application.

      Translated:

      Hey, it seems to work for me. I don't know, or care, if it works for anyone else, but it's OK on my work machine so that's all that matters.

      The Developer's Creed for far too many companies, unfortunately.

    • Surely Desktop Applications have gone from being all pervasive to being a small niche I haven't written one for nearly 10 years.
    • That's the disadvantage of living in a cage in the Himalaya's for as long as you have.
  • by Anonymous Coward

    The headline makes it sound as if Electron is being defended. Then it starts talking about how slow Electron is. But then some "developer" (of what?) says that his fast PC runs it without any lag. Okay. And *then* it talks about how bad Electron is for not being supported on cellphones... or something. I can't make out the point of any of this.

    • Platform independent doesn't equate to platform optimized. Normally we will get a few winners and loosers.

    • Re: (Score:2, Insightful)

      by Anonymous Coward

      But then some "developer" (of what?)

      "my own Electron-based app Standard Notes"

      So I imagine this is slashvertisement purchased by the developer of Standard Notes, an Electron-based app from the developer of Standard Notes.

      • So I imagine this is slashvertisement purchased by the developer of Standard Notes, an Electron-based app from the developer of Standard Notes.

        More like a slow news day. Firehose looks awful and some of the posted stories are uncredited.

  • In Defense of the Popular Framework The

  • by kbdd ( 823155 ) on Thursday August 17, 2017 @02:32PM (#55035745) Homepage
    I had never heard of it so I googled it.
    Oh, a new text editor, maybe I can use it. Click on the download link.
    163MB for a text editor, ouch!
    I do not know about RAM usage but that thing is already a hog on my hard drive...
    • by Swistak ( 899225 )
      20th century called. They want their computer back.
      • by tepples ( 727027 )

        20th century called. They want their computer back.

        A lot of laptops still in use have one or two SODIMM slots that take modules up to 2 GB, for a maximum of 2 or 4 GB of RAM unless you somehow connect a USB RAM drive and put swap on it. These include netbooks, used ThinkPad X61 computers made in 2007 or thereabouts, and more.

      • by vlueboy ( 1799360 ) on Thursday August 17, 2017 @05:08PM (#55037023)

        20th century called. They want their computer back.

        Get real. Not everyone is on the desktop world. Every MB counts. Your $400 retail computer comes with 1 Terabyte now, but most home users out there only replace their 10 year old machines when death is imminent, and they have more humble 300-500GB setups.

        Laptops and SSD drives bring another dimension to the situation. SSDs are laughably small even on desktop PCs. The "new" professional grade HP laptop that work assigned me a year ago was a downgrade from the regular HD in the 6-year old it was replacing where I had at least 300GB.

        The formatted SSD 100GB started out losing 30GB from my files transfered from the old PC (I had a couple virtual machines and respective linux ISOs because shells and SSH on Windows is deficient, even with Cygwin)

        Another 20GB was occupied by Windows 7 and I ended with about 10GB free, which was a bit of a worry preceding the Windows 10 download / upgrade process.
        Every megabyte counts, especially when you now automatically have programs doubling in size.

      • Do you not consider it a waste that the state of software these days means you need a 21st century computer to perform the same things that you used to be able to do with a 20th century computer?

        Just imagine what could be done if software were actually efficient.

    • by tk77 ( 1774336 )

      You got me thinking ...

      $ du -sh TextMate.app
        31M TextMate.app

      $ du -sh Atom.app
      506M Atom.app

      WHY?

      152M Electron Framework.framework
      221M node_modules
        86M apm

      But I guess I could use Atom on Windows.... if for some reason I wanted to stop using NP++.

      • by Anonymous Coward

        If you like Atom but don't like its bloat, you should check out Sublime Text.

        • by tk77 ( 1774336 )

          I'll have to check it out as I've heard about it for a while but never gave it a try.. I liked Atom for a little while but couldn't find extensions that did things exactly the way TextMate does so I just stuck with that.

  • by Luthair ( 847766 ) on Thursday August 17, 2017 @02:33PM (#55035749)
    16gb being standard on PCs is probably still a decade away.
    • by Zaelath ( 2588189 ) on Thursday August 17, 2017 @06:15PM (#55037447)

      [thing] which uses a LOT of [constrained resource] works just fine on my [device] which has [unusually large amount of constrained resource], maybe your [device] is too old? - Said every fucking developer ever.

      Followed by; "What do you mean lag makes the game unplayable? It works just FINE on my LAN, asshole!".

  • by Kaptain Capslock ( 3898379 ) on Thursday August 17, 2017 @02:51PM (#55035909)

    Let's face the truth: Electron delivers a Chromium engine, Node.JS and V8, all rolled into one package to you. So of course it's a memory hog, depending on what you are going to program, like a terminal, clipboard manager or tiny frontend to FFMPEG [all existant projects]. All those programs alone need 200 MB for the runtime engine, to just do really simple stuff.

    It also needed 13% of CPU time to just draw a blinking cursor (!).

    It's mostly used by shitty webhipster design startups, which are just way too lazy to learn a proper programming language, and it even doesn't fit well with the UI of your operating system. And since the underlying parts of it, when a program gets delivered, aren't for sure update as frequently as Chromium alone, it's a security nightmare as well.

    • It also needed 13% of CPU time to just draw a blinking cursor (!)

      Gotta wonder WTF is going on that it takes 13% CPU. There's lots of ways to do a blinking cursor with CSS and it sounds to me like the chosen solution is probably not one of the better ones.

    • Electron lost me a "Javascript".

      Cross-platform frameworks are intended for one thing and one thing only: to reduce development costs. And they all do it at the cost of software quality.

      • by tepples ( 727027 )

        Cross-platform frameworks are intended for one thing and one thing only: to reduce development costs. And they all do it at the cost of software quality.

        Say you need to run five applications, the first exclusive to macOS, the second exclusive to Windows, the third exclusive to X11/Linux and FreeBSD, the fourth exclusive to iOS, and the fifth exclusive to Android. You'd have to buy and carry a MacBook, a RAM upgrade therefor in order to run virtual machines, a Windows license, an iPhone or iPad, and an Android phone, Android tablet, or recent Chromebook. That's a lot of cost, weight, and chargers to keep track of.

        • Exactly. You're making an argument based on development costs. That's what frameworks are intended to address. But regardless, the tradeoff is going to be that your software isn't going to be as good as it could be otherwise.

          • by tepples ( 727027 )

            And for the majority of users, suboptimal software beats completely unavailable software.

            • by JohnFen ( 1641097 ) on Thursday August 17, 2017 @06:16PM (#55037455)

              Sure, if I need some software and literally the only thing available sucks, then I'll use it anyway.

              But, in practice, it's extremely rare that you can't find a natively compiled version of what you need.

              But none of that changes the fact that applications built with frameworks tend to suck, and the effort required to make them not suck negates much of the advantage of using frameworks.

              • by tepples ( 727027 )

                But, in practice, it's extremely rare that you can't find a natively compiled version of what you need

                Find me an iOS app development tool natively compiled for Windows or GNU/Linux. Find me U.S. individual income tax return preparation software natively compiled for GNU/Linux. Or are those among the "extremely rare" examples?

                • Those are highly specialized (i.e., tiny market) examples and so, yes, I'd call them rare.

                  But understand -- I'm in no way saying that developers are wrong for using frameworks and I an not really trashing frameworks. There can be excellent reasons for using them, depending on what you're doing.

                  All I'm saying is that using them comes with a cost to users that must also be considered, and a lot of framework developers seem to either be unaware of it, or think that it doesn't matter.

        • by Ash-Fox ( 726320 )

          Say you need to run five applications, the first exclusive to macOS, the second exclusive to Windows, the third exclusive to X11/Linux and FreeBSD, the fourth exclusive to iOS, and the fifth exclusive to Android.

          I remember the days we had problems like that in one of my work places. Most of it was resolved with a Citrix-like solution that ran on a webpage.

          • I remember the days we had [to use applications exclusive to several different platforms] in one of my work places. Most of it was resolved with a Citrix-like solution that ran on a webpage.

            Except nowadays people expect to be able to use applications while away from a desk. In order for "a Citrix-like solution" to work, then either your task would have to be one that can always be performed in Wi-Fi coverage, or your work place would need to cover the cost of cellular Internet.

            • by Ash-Fox ( 726320 )

              In order for "a Citrix-like solution" to work, then either your task would have to be one that can always be performed in Wi-Fi coverage, or your work place would need to cover the cost of cellular Internet.

              This isn't a problem at all in the UK.

    • Thankfully they didn't multi-thread the cursor rendering or it would use more than 1 core (13% is 100% of a core).

      Back in the day they used to apply a memory hack to EverQuest to put a sleep(0) into main() which took the CPU usage from 100% to about 20%

    • by Anonymous Coward on Thursday August 17, 2017 @06:29PM (#55037521)

      "...as a new company without a lot of resources, this setup has just barely allowed us to enter the marketplace."

      OK, so you've solved your problem as a startup. And you did acknowledge the user, barely.

      "But aside from how it makes end-users feel, there is an arguably more important perspective to be had: how it makes software companies feel."

      And then you let us know what your priorities are. The users can pound sand, you're a Startup dammit! And you have Needs! All your users need to upgrade to High End Equipment for the privilege of using your indispensable App!!

      You might want to rethink your priorities, before your precious startup collapses due to market disinterest in your bloated POS. Maybe Facebook can get away with that attitude, and maybe Twitter. You cannot.

    • It's mostly used by shitty webhipster design startups, which are just way too lazy to learn a proper programming language, and it even doesn't fit well with the UI of your operating system.

      Why waste developers with knowledge of a proper programming language on trivial tasks like this.

      The whole point of "shitty hipster design startups" is that we lower the barrier of entry for uncomplicated tasks so that less talented people can still deliver a usable product. We don't need genius level assembly-level programmers putting together bespoke UI for various BS tasks like Uncle Frederick's Antique Shop and Ice Cream Parlor.

      Tech was supposed to be democratizing and liberating. We were supposed to mak

      • There's nothing wrong with lowering the barrier, but there's quite much wrong with using an overkill for simple tasks. Using Electron for many tasks is like using the engine of a truck to make scrambled eggs.

        Is it possible? Of course. Is it a waste of resources? Entirely. So does it make sense? No.

  • by Anonymous Coward

    "Electron, a popular framework that allows developers to write code once and seamlessly deploy it across multiple platforms"

    Oh, my. Someone has balls of brass to even imagine that someone could fall for that old line.

    It still can't beat that timeless classic, "Would you like to come up to my apartment and look at my etchings?"

  • by Junta ( 36770 ) on Thursday August 17, 2017 @03:16PM (#55036075)

    So far my experience has been atom and mattermost desktop.

    For atom, everyone was swearing*so hard* about how good an editor it is, and it's frankly not that good, a resource hog, and just generally a bit glitchy around the edges. Slow to start. Sure it's 'extensible', but the extensions have thus far for me been extremely ill-fitting and low quality. It reminds me of the 'plugin' fad of the late 90s/early 2000s when a lot of applications pretended to be incredibly extensible but really it was just providing clunky entry points to pretty much standalone apps.

    For mattermost, it was basically loading the web gui in an app.... no value over the 'normal' web gui. For atom at least you have the excuse you are dealing with offline material so a 'normal' browser hosted approach doesn't fit, but in mattermost you are connecting to a server anyway. I might have found other reasons to be dissatisfied, but the complete lack of benefit over the browser version just made my interest evaporate.

    I don't understand the fascination with using the web development trappings when you don't have to. It's one of the most tedious approaches to application development.

    • by Anonymous Coward

      I don't understand the fascination with using the web development trappings when you don't have to. It's one of the most tedious approaches to application development.

      It pretty much just boils down to ignorance. There are a lot of "programmers" (I use that term very reluctantly) who only know JavaScript, HTML and CSS. Only a fraction of them know PHP or Ruby on Rails. That's as deep and as wide as their knowledge and experience goes.

      They don't know C. They don't know C++. They don't know Java. They don't kn

      • They don't know C. They don't know C++. They don't know Java. They don't know C#. They don't know anything other than web development.

        That or a developer has tried writing applications in C++ before, but he has run into political problems getting corporate, school, and public library IT departments to permit installation of applications written in C++ on machines that they own. In addition, most end users have shown themselves unwilling to download C++ source code and learn how to compile it, nor to install a Linux virtual machine in which to run an executable version on Windows or macOS. Or should a developer instead build web applicatio

        • by JohnFen ( 1641097 ) on Thursday August 17, 2017 @06:23PM (#55037481)

          has run into political problems getting corporate, school, and public library IT departments to permit installation of applications

          Yes, if you're aiming your software for specialized environments then you have to adapt to what the environment requires.

          most end users have shown themselves unwilling to download C++ source code and learn how to compile it

          If you're requiring users to compile the code themselves, you're doing it wrong. The least you can do is actually produce a build for the operating systems you support.

          • by tepples ( 727027 )

            Yes, if you're aiming your software for specialized environments then you have to adapt to what the environment requires.

            And in practice, adapting to the environment of "people who regularly use a PC that someone else owns" means script-in-the-browser.

            The least you can do is actually produce a build for the operating systems you support.

            Between C++ and script-in-the-browser, C++ will leave more users staring at "Sorry, we do not support your operating system yet."

      • This desperately needs to be modded up. This sums it up exactly.

    • by ItsJustAPseudonym ( 1259172 ) on Thursday August 17, 2017 @03:30PM (#55036199)

      I don't understand the fascination with using the web development trappings when you don't have to.

      Maybe "when all you have is a hammer, everything looks like a nail"?

      People need to get out of the rut of web development.

    • Sure it's 'extensible', but the extensions have thus far for me been extremely ill-fitting and low quality. It reminds me of the 'plugin' fad of the late 90s/early 2000s when a lot of applications pretended to be incredibly extensible but really it was just providing clunky entry points to pretty much standalone apps.

      Sigh. If only VIM and Emacs had a plugin system. Or Eclipse. Or Gedit. Or even Visual Studio. What a world that would be, where plugins were no longer a differentiating factor between editors.

  • It's Chrome (Score:4, Informative)

    by dabadab ( 126782 ) on Thursday August 17, 2017 @04:15PM (#55036625)

    Electron is basically Chromium.
    There are a few extras here and there but in the end an Electron application is some html, css and javascript code packed together with a browser - so it's not that suprising that it eats up ram just like Chrome.

  • by jpop32 ( 596022 ) on Thursday August 17, 2017 @05:39PM (#55037237)

    Seriously. 'Framework' part is just a wrapper around a whole, full fledged Chrome browser. And there's your problem. If you have Atom, Slack and any other Electron app, along with your 'regular' Chrome, you have *four* copies of Chrome on your computer. If you think that is silly, yes. It is.

    Which is why it's crazy to run any Electron app that is available on the web. Run Slack in Chrome, pin the tab, enable notifications and that's it. Identical, and one less Chrome installation.

    • by davecb ( 6526 )
      Tried that, it works way better that the app, which is scary. Can you say "pessimal" ???
    • And lower memory utilisation. As the carefully designed memory model of chrome's multiple processes, share everything they can.
  • I think the editor left off the sponsored tag.

    • If it's an ad, it's a pretty terrible one since it doesn't give the impression that Electron (or Standard Notes) is a desirable piece of software.

  • Didn't you programmers have this conversation 20 years ago with Java? I understand the performance gap between java and C is almost imperceptible now. Nevertheless, the reports of C's death remain exaggerated.

    • I understand the performance gap between java and C is almost imperceptible now.

      How true this is depends on exactly what you're doing. Java-based applications can actually outperform naively coded native C/C++ applications in certain things like communications between threads. But it can underperform in other types of things.

  • And why are those particles so popular? Are they more popular than Protons? What makes an electron a "framework" electron? Framework of what? Something beyond what electrons normally do?
  • "The search Electron developer jobs in Raleigh, NC did not match any jobs."

    Not touching it.

ASCII a stupid question, you get an EBCDIC answer.

Working...