Will Electron take over native macOS development?
Electron is hated on Hacker News. I personally critique it quite a bit.
But here are a list of things that Electron does better than any other desktop GUI framework.
1. Skills portability. Just use HTML and CSS to build your layouts. Hundreds nee thousands of web developers become instantly desktop developers, at least when it comes to UI development
2. Non natively cross platform. Your app looks exactly as you designed it across all major platforms. Down to the last branding design element. Without any additional effort.
3. Vast CSS, Node and JavaScript library ecosystem.
4. Flexibility in UI. I have yet to see a traditional UI library have the flexibility of CSS + markup.
5. Good enough native integrations. Users don't lack any of the major native integrations.
I am sure there are downsides of Electron. But unless a pure native library challenges some of the pros of electron, it will continue to grow in popularity.
And what are the downsides to Electron apps? All I hear is file size is bloated and slow but slowness is likely to be the fault of the developers who use frameworks blindly without knowing what they're doing and can be improved.
You can see some web sites can be snappy...
macOS has terrible resource management (probably a fault of the developers of various major apps). EDIT: Lmao, look at kernel_task, a mysterious phantasm that seems to be using 2gb at any moment. Look at other abstract, undocumented Apple processes that just exist, and you have no control over them. It's literally insane.
Electron has even worse resource management, since its built on top of Chromium, which doesn't even attempt to make any reasonable decisions about how much resources can be utilized. I find it truly remarkable that 5 years ago I could use an 8GB MBP with no issue, and now with a 16GB MBP I get daily warnings about running out of space, because of RubyMine (I get it), Discord, and Chrome.
Maybe instead of writing all these articles about how JavaScript is great and the new-wave, actually writing apps that can stay bounded to 250MB memory?
Because of how the compositing works, it’s not uncommon to have 100 or more megabytes of RAM taken by the UI alone. Not a bad thing though, it allows for simpler and more performant animations.
Other than that, I’m not familiar with any particular features of the OS that unnecessary spend resources. Do you have examples?
Finder (made 10000x worse by their "inadvertent" disabling of DaisyDisk because of "security")
Mail (completely garbage, can't update 300 emails within 5 hours), yet takes up 400mb in the Activity Monitor
Not identifying what exactly is the 1.18gb "java" process thats running right now (maybe elasticsearch? why not surface this info in activity monitor?)
I mean I have a million examples, I try to do lots of novel research and development and my machine is paralyzed by all these insane background processes, despite the fact that I have a 16gb, top of the line MBP as of last year. It's an insane joke.
EDIT: it is really interesting you are telling me that animations and UI graphics processing are important when it takes away from actual serious work/processing. Everyday I have to shut down my conputer to get to a clean slate because I have no visibility into the background processes occurring.
I guess that drop shadow is really worth the extra 100kb memory footprint!
Are you sure you're looking at the "real" RAM usage? Apps nowadays are allowed to claim up to 4 GB of virtual memory. On my machine I'm seeing Finder reported to have taken 800MB in total, but only 160MB of real memory.
I'm not sure if animations, blurs and shadows are important to everyone, but I find them pleasant to look at while I'm doing my serious work. Although I must say that if I could virtualize macOS, I'd prefer a Linux laptop.
I might be characterizing the nomenclature improperly, all I know is that I'm running a handful of processes that are critical to my work and things are hung up constantly on a machine that is dated 2018. Shrugs
Isn’t this elasticsearch’s fault?
Personally, I’ve never experienced the resource management issues you describe here, even when running similar workloads. I have a 2015 MBP with 16 GB.
It seems to me like there's a high chance Catalyst will take over macOS development for a lare part. If Electron works with that, maybe. If it doesn't I think that will significantly hurt its popularity with Apple ecosystem developers.
I don't think that's the plan. SwiftUI is where Apple development is heading.
i hope not. Electron should just die...Its resource hog and its use should have never left MVP part of the project build!
Only if native bindings are freed up of Chromium ties.