Slashdot Mirror


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

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.

5 of 138 comments (clear)

  1. Re:So Popular that you need to explain it. by norweeg · · Score: 1, Informative

    Its basically a tool for building desktop applications with HTML, CSS, and Javascript. https://electron.atom.io/. Slack, Visual Studio Code, and Github desktop all use it.

  2. "too memory intensive."? by kbdd · · Score: 4, Informative

    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...

    1. Re: "too memory intensive."? by vlueboy · · Score: 4, Informative

      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.

  3. It's Chrome by dabadab · · Score: 3, Informative

    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.

    --
    Real life is overrated.
  4. Re:Popular? Yes, with shitty hipster startups! by JohnFen · · Score: 3, Informative

    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.