r/software • u/rheme18 • 15d ago
Discussion Why did modern software engineering completely give up on efficiency in favor of electron wrappers and web tech?
Remember when a text editor opened instantly because it was written in native code? Now, a simple note-taking app runs on an embedded Chromium browser, consumes 500MB of RAM, and requires a Node.js runtime just to display plain text.
At what point did hardware manufacturers and software devs enter a silent agreement to just waste all our processing power? Let’s talk about the best native, lightweight alternatives you guys actually use daily to escape this madness.
553
Upvotes
173
u/AsrielPlay52 15d ago
Ever heard of Path of least resistance?
That's basically it's
You got a product, you want to publish to as much platform you can. But you only have web developers with a Mac
But you need Android, Windows, and Linux.
The logic is there
52
u/pellets 15d ago
Developer costs are higher than computing costs. So you use the cheapest environment to get the job done, which turns out to be a web browser environment.
36
u/Vegetable-Capital-54 15d ago edited 15d ago
I think it's reversing a bit now. For example, Discord is ditching Electron and developing native app. Now with AI, you can build native apps just as easily. I hope Electron and the likes will die, there is no excuse to use it anymore.
10
u/olddev-jobhunt 15d ago
Speaking as a developer, it's driven by the cost / benefit tradeoffs.
If you just want a text editor, then yeah, no big deal. But people don't just want a text editor. They want notes that follow them from their laptop to their phone. They want it to work on PC, and on Mac. And Android, and iOS. So I build a web app so it'll work online and package that same app up w/ Electron for local execution.
Does it suck? Yes. But no one wants to pay me triple to build the same thing natively on all those platforms. Pretty much everyone picks "3x the features" instead of "native on 3 platforms" every single time.
17
u/bigbepisinc 15d ago
Because it's easier to ship features and easier to support more devices with electron and RAM was cheap. This was the pre AI mentality though. There was no conspiracy or agreement. It was just a different time lol. Idk what else you want to hear.
With AI though, there's not really an excuse now and we're already seeing stuff move away from electron towards native languages like Rust so I don't know what you want. Either vibe code your own clients or wait for someone else to do it.
FYI the issue with electron and JS in general is not the language or runtime itself it's just the misuse of it. Electron and JS are pretty fast and runtimes like Bun are extremely memory efficient. It's when you stuff and app full of 1000 node modules, that's when things get messed up.
20
u/jhaluska Helpful 15d ago
Cause what engineers are doing to bring down software development costs is to use more resources.
It's much simpler/faster and thus less buggy to just have flat arrays in memory than actually work on reducing memory usage through more dynamic structures.
They never made an agreement. It's been a slow transition over the last 50 years.
6
u/DThompson55 15d ago
As a developer of Coleco video games back in the 80’s the stuff we could do with 8 or 16k was stunning.
11
u/MoparMap 15d ago
This was partially discussed in a thread about 80s/90s programmers, but space isn't a constraint anymore like it used to be. When you were dealing with chips that only had 1k of storage and had to fit code on them, you got creative and efficient to make it work. When you only had 30 MB of hard drive, you used it efficiently. Now the solution to the problem is hardware instead of software. Program doesn't run well? Go buy more RAM/a better CPU/GPU. Don't have enough space? Go buy another hard drive. Hardware is cheap (relatively speaking, the whole data center thing isn't helping at the moment).
Give programmers hard space constraints and you'd see more efficient coding, though possibly at the cost of extra features.
4
u/Imnotanad 15d ago
Time of delivery. It is faster . some times it is also cheaper in terms of resources ( developing side ) . Of course it is not efficient for user. But that's it. You build - over - something rather than creating runtimes, functions, APIs, and a lot to make run your custom app. It is a dissaster
4
u/Pale_Height_1251 15d ago
No silent agreement, it's just that we have a lot of software developers who really only know web stacks and very few companies reward efficient code.
4
u/chlankboot 14d ago edited 14d ago
I have a text editor focused on markdown rendering, and what you describe is the exact pattern that pushed me to go native. Old laptop with no GPU. Well, after 6 months now, my editor still looks primitive. The last issue I had for example was a user complaining the save as dialog does not show in his system, he has a tiling wm and I did not think of that. Basic stuff like copy/paste has to be coded, it is really frustrating and complex, but when you click and the app just shows, oh boy that's rewarding. The advantage of electron apps is that you just focus on features, you don't have to care about the mechanics, you can use validated and tested libraries. The dev cycle of native apps becomes increasingly complex. I am today at the 9th release of my editor and the pattern I am seeing is for one feature added, I have 20 bug fixes. Not all bugs related to the feature, rather to edge cases in other parts that were overlooked. Is it worth it? Absolutely, nothing beats the satisfaction of instant response and minimal ram usage on an old machine.
3
u/not_some_username 15d ago
Ram was almost as free, CPU could do more calculation than need. Too much resources was available so developers (or the deciders) decided to spend less time optimizing
3
u/OppositeDamage 15d ago
You know the answer. Laziness.
3
u/kivimango23 15d ago
Laziness. It is easier to use Electron than dealing with different platform shenanigans, because Electron does it for you. The app looks the same on every platform.
3
u/djingo_dango 12d ago
Enough processing power for the median person to run these things. That’s it
Web techs are a modern miracle. The fact that you can build something once and have it run in pretty much any consumer system imaginable is a modern marvel. The differing factor then becomes performance vs ubiquity and as I said before the mean consumer hardware is good enough that the performance is not a big trade off
1
u/ExpensiveCarry1 15d ago
May i know what is mean by native app ( I'm not software background but curious to know and learn? Thank you
4
u/CeldonShooper 14d ago
It is in my opinion an effect of Microsoft losing the Windows developers.
Before many Redditors were born my back-then favorite software blogger Joel Spolsky wrote this long post that might be of interest to this topic:
How Microsoft lost the API war
Attempts later to recapture developers with Silverlight and WPF didn't really work out. It was too late. Then came the giant SaaS wave and the browser became the runtime environment for many different things that would have run on the desktop in earlier times.
2
u/iconhacker 15d ago
Electron app though consuming more memory, it is a perfect fit in certain situations, such as a kiosk app where it is the only main process is running and while you need to support a web version of the same app as well .
2
u/Technical_Ideal_5439 15d ago
Its is simply velocity and ease of delivery being the priority.
2
u/DawaForensics 15d ago
Also, Fuck Electron !
2
u/DragonfruitGrand5683 14d ago edited 14d ago
Main character syndrome, Abstraction, Libraries, Barrier to entry and Size of resources
Every developer had to develop something unique to solve a problem that didn't really exist. I personally blame the Open Source Community for this because it encourages forks.
This resulted in libraries that constantly abstracted something away, each grew huge and then required another library to abstract that.
The abstraction lowered the barrier to entry, developers don't know where x or y comes from or how anything actually works. Nobody knows about optimisation and no-one cares because there is so much RAM and compute.
All of this results in programs that consume a huge amount of RAM and CPU, and aren't optimised.
Companies are starting to take note and the RAM crisis is now forcing people to look at optimised code.
4
u/zunjae Helpful 15d ago
If you enjoy making money then use Electron
2
u/Manacit 15d ago
People want features and software, and they're generally willing to trade 20% of the top line performance or a bit of RAM they weren't using otherwise to get it. The fact of the matter is that a well-written Electron app can still get to be perfectly good. Notepad.exe was fast, but it also barely did anything.
With the advent of AI the tradeoff has shifted the other direction - the difficulty of writing a piece of software for each platform and taking the time to optimise "native" code has been decreasing. We'll see more native apps as time goes on.
2
u/Responsible_Sea78 15d ago
Early WordPerfect gave instantaneous response on 256k machines that ran 10,000 times slower chips.
Given AI datacenter costs, somebody will probably notice stuff like that, learn efficient techniques, and many datacenter buildings will be used to grow mushrooms.
2
u/flooberoo 14d ago
I've been a software developer for 20+ years, and software user for 30+ years. I don't really feel like software is tak8ng longer to start. Quite the opposite: splash/loading screens (even with progress indicators!) were common, while not really needed anymore.
Obviously modern software is less efficient in the sense that they require more resources. But they also do much more.
There is a level of performance where users are content. They would rather prefer features instead of reducing startup time from 2s to 1s (a massive 100% difference in petformance!)
1
u/Devatator_ 15d ago
It's simpler (and cheaper when you're a company). That's all there is to it. Also there are so many frameworks that do things well with a platform and bad with another, or they have weird licenses, or no people that use them that can be hired
1
u/Ambitious_Ad4397 15d ago
Which software exactly you are talking about
1
u/jhwheuer 15d ago
I am expecting a reversal. Robustness and usability needs to go up. Anything native will look at the addressable market and go for native Windows first. Avalonia is currently my bet, given the state of framework from Microsoft. Once code ru s reliably, deploy to Linux and Mac.
The issue is that we got users to expect that software is free
1
u/faziten 15d ago
Money! Well to be fair, time but time is money so...
1
u/Downtown_Isopod_9287 15d ago
because the at the OS level everything collapsed into 3 platforms, MacOS, Windows, and Linux.
These platforms are basically in forever war with each other and are not generally interoperable. This has led to many devs throwing up their hands and making browsers the platform instead. The internet is where all the money has been anyway for the past 25 years.
1
u/Pablouchka 15d ago
Speed and efficiency. Well, short-term efficiency, at least.
1
u/Ok_Entrepreneur_8509 15d ago
Hardware speeds increased faster than the needs of software. Same with memory and storage. If your app needs to be faster or use more space, for many apps, it is just easier to wait 6mo when more people will have faster, bigger hardware.
1
u/dnhs47 15d ago
Efficiency for the user provides very little value to the developer/publisher.
Time-to-market/speed of development provides substantial value to the developer/publisher.
Access to a larger cross-platform market provides substantial value to the developer/publisher.
Access to a larger pool of web-focused developers provides substantial value to the developer/publisher.
Pretty easy call.
1
u/MisterEinc 15d ago
Because when the power of computers is increasing exponentially, you can sacrifice efficiency for UX.
Now that consumer PCs are plateauing, and will be likely phased out over the next decade in favor of centralized computing, efficiency will save money year over year.
1
u/Itchy_Tiger2497 15d ago
Because the entirety of the known software universe decided to consolidate around web-based development, and then those applications became popular.
1
u/Ronin-s_Spirit 15d ago
Not all, and not that many (except corporate employees), your post sounds too generalized.
1
u/thepurpleproject 15d ago edited 15d ago
The trend seems to be reversing. I'm using Tauri to ship it's still web view but a lot less resource intensive. Earlier the barrier was to be good with rust to get into Tauri but with Claude you can get a lot of mileage out of it. A lot of colleagues are able to work on teams that were on some of the desktop apps tool chain as they're able to apply their prior wxp while they slowly the intricacies of rust.
1
u/jerrygreenest1 15d ago
Easy: the ram that your users need is not your problem.
i_missed_the_part_where_thats_my_problem.jpg
1
u/max_wen 15d ago
Because the efficiency you speak of is hard and there was a massive decline in the quality of programmers thanks to webdev. So basically it's a skill issue.
1
u/zoredache 15d ago
A couple years ago I got a 96GB (48GBx2) kit for my home server for $330 on a nice sale. Today that is ~$1500 for similar spec. When RAM was so cheap, why worry about using it? Why worry about expecting your customers to have a computer with 16-32GB of RAM?
For decades hardware has been getting faster, better, and cheaper. The AI boom has killed the 'cheaper' bit, and the faster/better is running into some physical limitations of how much farther we can shrink and speed things up.
1
u/Ferretau 15d ago
In some cases you have the companies directng the use of specific frameworks for ease of collaboration between developers (M$ etc.), you also have developers who are coming from a background of web development which these frameworks are more akin to.
1
u/caasiecarg 15d ago
is it just the "get the job done" kinda thing? problem is.... managers don't have time for quality, they try to struck the balance between the investors that want product out to make money and the devs that want the good quality code... the balance between the 2 is the electron!!!!
1
u/dddurd 15d ago
AI will shift the focus again. Developing cross platform apps that work both on desktop and mobile with QT is so much easier now.
1
u/jeff_coleman 15d ago
Because compute, storage and memory are (correction: were) inexpensive and conveniences like electron wrappers make the work easy.
1
u/twrodriguez 15d ago
Developing and maintaining dedicated UX for Android, iOS, Mac, Windows, Linux, and Web is a lot of maintenance and overhead.
1
u/otor 15d ago
Performance is not the only metric in KPIs, despite the name.
1
u/Dave_A480 15d ago
Because it is easier to do crossplatform (PC, Mac, iOS, Android) with webbythings.
1
u/Guvante 14d ago
Efficiency of what?
Engineers are ludicrously expensive and computers are stupidly powerful
1
u/phycle 14d ago
The development environment for native apps sucks. UI is best served by an environment that supports iterative and quick compile-run cycles, syntax sugar for declaring and styling widgets and data binding. Most native stacks are terrible at that.
1
u/Exact_Wrongdoer9018 14d ago
The RAM number gets me — this bloat is why I stopped chasing the "best" tool and started checking two things: does it run portable from a folder, and what does it actually write to disk. Anything that quietly adds a service or a scheduled task is stuff I uninstall, and I won't give an account to a job that's purely local. Not sure what you've tried, but a portable build has saved me more time than any feature list.
1
u/Available_Safe1818 14d ago
A decade or two ago?
1
u/enchntex 14d ago
I think you know the answer already and just don't like it.
1
u/EmotionalRun3117 14d ago
Uswd to cost more to pay a person to make it efficient than it cost to just brute force it. Doubly so when it runs on client machines.
1
u/OnesimusUnbound 14d ago
Increasing RAM was cheaper and most developers are familiar with frontend web technologies, so no need to be familiar with different GUI libraries.
1
u/BoBoBearDev 14d ago
Because you can build a website with it first.
1
u/Ok-Information-2428 14d ago
Because cpu and memory is ubiquitous and the user can always buy better hardware, whereas platform problems and portability in native is a PITA. Web tech solves this.
1
u/PresentationOld605 14d ago
Not in all areas of "modern software engineering." Efficiency still matters in the applications, where it is required.
1
u/TheLuminary 14d ago
Honestly this question is kind of the same as asking: "Why do we use so much electricity now? Why did we give up on living an efficient low power life like we did 100 years ago?"
The answer is.. Because things got cheaper and more abundant, so we learned to make the most of them.
1
u/vancha113 14d ago
I think this mentality is changing nowadays.. the barrier for making more efficient, native apps is now lower than ever. With ram proces being high, a good example of this change is discord switching from electron and react to rust with GPUI.
1
u/Hot_Money4924 14d ago
I think it's simple -- native programming is a different animal from web technologies and back in the day it was a lot harder to learn and to debug and to do fancy graphics things. The economy and the industry shifted towards cloud apps and web technology, and after a certain break that was a lot of people's only experience with any kind of software development. Those people didn't want to learn whole new languages and toolkits and probably felt that the native technologies were inferior to their web frameworks, and they began to create a world where the same javascript frameworks could power frontend and backend, mobile, web, and desktop. It was about maximizing creativity, not efficiency.
I personally hate it. I wrote programs and libraries for 16-bit DOS in assembly language as a teen and everything web has always made me throw up a little in my mouth.
1
u/plastic_eagle 14d ago
Because it remains the only viable cross-platform user interface tool.
Why don't you go away, and write code that does what that note-taking app does, on web, mobile (android, iOS, windows mobile), linux, ChromeOS, windows, MacOS, and Haiku.
That's the problem. Not that some of the OS's are ever really used, but the point stands. There is no cross-platform toolkit but web. And it works really well.
1
u/Skyboxmonster 14d ago
If your program cannot run on a sub 1GHz cpu you did something wrong.
My Pentium II felt more snappy than my modern i7
1
u/frankieche 14d ago
You don’t know developers, do you?
1
u/PorcOftheSea 14d ago
Lazy developers who think 1 gigabyte of ram as if nothing, when a purely text and image only based program, if coded well without garbage, should be able to run in under 1mb of ram , and a real older computer from the early 90s.
1
u/Tangerine-Either 14d ago
It's not about any agreement. It's a very cold math from project management side.
Having something delivered fast, but inefficient, as long as it's bug free, allows you to reach... Let's say 80% of target group, while 20% will avoid it due to inefficiency (and that's really generous assumption).
To optimize it to reach those 20%, you need to put at least 2x dev hours, maybe even more.
Or you can use that development time to create a new product or new features that will increase initial target group.
As someone said to me once "People aren't paying for .5s faster startup time. But they will pay for a feature that solves even a simple problem without adding a new app to their toolkit".
1
u/Zealousideal_Yard651 14d ago
There was never an agreement, software just figured out that we have alot of resources, and was tired of having 5 versions of a application for 5 different platforms (Mac, Android, Windows, iPhone, Linux). So they built frameworks like Electron, WebView etc. so now they don't have to care about platform specific implementation and just care about their app
1
u/Eymrich 14d ago
This is going to change rapidly, rust is going to take over a lot of stuff
1
u/Willing-Earth-8227 14d ago
I member
1
u/Easy-Reasoning 14d ago
In addition to what was already mentioned, the focus went a lot to Web Technologies. So basically people that formerly wrote stuff with frameworks like Gtk+, Qt or Swing suddenly wrote Controllers and Views using some web framework and jQuery. Eventually that become React, Angular etc. By the time the field also grew massively, so there isn't a direct way back.
That being said, there are tons of alternatives. I personally think iced (Rust) is very interesting. gio (Go) also seems cool but I think it's lacking projects done with help of designers, so I'm not sure how far you can take it.
1
u/ChiefGewickelt 14d ago
You just described the word “efficiency”. It’s an efficient use of development time to use the tooling with the fastest turnover time and easiest framework to work with.
1
u/wellthatexplainsalot 14d ago
It's about the forces of cost of development, ease of development, cross platform access, controlled deployment and hardware ability.
Cost. Developing software is time consuming and expensive. If you can choose an environment where you can get more bang for the developer buck, then it's often a good choice. This choice works well for problems where you don't need very low-level access to the GUI and don't need direct hardware access. There are other possibilities - many of them cost money to license. Electron doesn't.
Ease of development. Electron means that your developers use knowledge that they likely already have - HTML and CSS. And when there's a problem, chances are someone else somewhere has had the problem already and written about it. And you don't need to know details of how different platforms manage their GUI differences. The trade-off is that your app feels less like a native app, but that's something that can be finessed.
Cross platform. Electron is everywhere, almost. And if you take care, you may well be able to repurpose the HTML frontend for a web service. The trade off is that it's heavyweight compared to directly using the platform's native API, but if you do that, then you need to master an API per platform.
Deployment. You don't have to worry about missing run-time elements or the platform changing underneath you - so even as the OS upgrades, your software keeps working; the library versions are under your control. If you depend on Webview, then the runtime you are using can change. Most likely it will be a bug fix, but occasionally there may be regressions. Having everything an app needs bundled together is an advantage.
Hardware. Disk drives keep growing. Processors keep adding power and units. And until recently, memory was increasing reliably too. Software inefficiencies are covered by hardware improvements. When you optimise your software for size or speed, then for it to have value to the consumer, it's got to make a difference to their experience, and size does not, in the recent environment.
1
u/trim072 14d ago
Web standards are just superior to any native tech. It has best text rendering, most efficient and high quality 2d graphics, out of the box cross platform gpu support, accessibility, numerous of Web### (RTC, Socket, Bluetooth, Midi, NFC, ... Etc.) stuff available right out of the box. Almost zero problems with sandboxing. And off course best crossplatform support.
There just is no any other platform, that so much efficient for devs, robust in terms of features and quality, and independent in terms of vednor.
This is most obvious choice, if you wouldn't want to bring up your own, qt/flutter. Just try make some simple app, using for example, NW.js, Qt/Pyside, Avalonia, Flutter. And you immediately realise, that WebBased stuff are miles ahead on every single aspect.
Also, rand about memory, is not so much about base tech, but more about complex memory management (check what virtual memory means), and crap React state management.
In orher words - it just works. Everything else sucks, ether on visual or convenience.
1
u/AmusingVegetable 14d ago
Engineering didn’t give up, it had to be forced by MBAs and CFOs.
1
u/looopTools 14d ago
Turn around time, laziness, “cross platform”, not linking c, objective-c, c++, and c#
1
u/RollingSparkles 14d ago edited 13d ago
Build my own native Win32 apps on Windows, only way to sanely use Windows. Anything else is usually heavy and crap. Even ended up building my own text box because Microsoft's in the past was so crappy.
Edit: These tools are good:
VLC
7zip
Gimp
1
u/udi503 14d ago
For money.
1
u/dekai-onigiri 14d ago
For the same reason why now everything is an AI slop (aka vibe coded).
1
u/esaule 13d ago
Native apps are expensive. (Or at least they ised to be; maybe AI translation can make them cheap.) Amd you probably always had a webapp anyway.
So unless you needed a native app for performance reason, there is not much of a business need to make one. So you could use electron and get 99% of your possible customer base. Or sink in month maybe years of engineer time to get that last 1%
1
u/No-Seaweed-4456 13d ago
Allows them to develop for many platforms with less work, and lets them hire web devs.
Saves a lot of time and money, at the cost of being less robust or performant
1
u/boogiefoot 13d ago
Think of it this way: the choice is between writing for a single platform and using Electron/Tauri and being available on all platforms. Hell, Tauri even supports Android now.
When that is the choice, the choice is easy for most.
And don't forget that the skills needed to work with web apps are much more commonly held than working with a specific platform's toolkit.
I think most software designers fantasize about writing super performant apps, but it's just not practical in most cases.
1
u/LoadVisual 13d ago
This is more of an observation it could be wrong. The type of UI/UX and libraries go hand I'm hand with the type of user meant to handle the software.
Typical productivity software might simply take the path of ease of development since it matter less how much it takes up in resources.
Software for professionals like music production, movie editing, scientific labwork and simulation, the investment is pushed to get as much as possible for the work that needs to be done.
When the developers know the stakes and the performance, responsiveness comes from writing highly optimized native applications with light weight libraries and frameworks, they do it and compromise absolutely nothing.
So perhaps users are not just a whole, they are simply categorized by there needs and ability to put up with any compromise.
Professional software may not look good but, it better work and not cause any distraction.
Productivity software, folks can put up with a few compromises on performance in exchange for features and nice UI.
The target user category makes the call at the end of the day, you will not want your company to sink because the technology was easy to use instead of performant and responsive at all expected levels from a paying user.
1
u/Comprehensive_Star79 13d ago
We had an abundance of hardware, at cheap prices, evolving yearly in both scale and efficiency, there was no reason to make anything but electron wrappers.
Up until about 2-3 years ago, and now Developers are catching up.
1
u/Morganross 13d ago
Its not that slow. Pretty well optimized.
1
u/Far-Championship-883 13d ago
because Jeet coding is easy, script kiddy some BS together in a hurry. for some reason with think developer convenience is more important than performance and security. the rusticles will say similar stuff.
1
u/ArmDowntown3379 13d ago
Design limitations and people wanting a cross platform app that can run anywhere. Why waste time and money building the same stuff twice?
1
u/djfdhigkgfIaruflg 13d ago
Sublime text all the way. I really need an IDE: Jetbrains. Which is Java but really well optimized
1
u/CivilProcess7150 13d ago
Honestly, native development for desktop kinda sucks. It's such a pain in the ass. Electron simplifies things, even tho it's a bloaty mess that violates many philosophies.
1
u/R3PTILIA 12d ago
Why dont companies just build native ios, native android, web, native macos, and native windows??? Its so simple just learn js, swift, kotlin, c# and maintain 5 apps. Is it becuase they are lazyyy??? /s
1
u/Aureon 12d ago
one thing i fucking love about AI is that the cost of rewriting everything in Rust is so much more reasonable than it ever was
1
u/leon_pylo 12d ago
Hardware constraints like RAM, drive space and cpu power became less and less of a factor, so the need for optimization became less and you can pick the tech stack that achieves the result the fastest, not in the most optimized way.
1
u/afops 12d ago
Efficiency means efficiency in developing, deploying and running. As computers got cheaper/faster we gravitated towards efficiency in the first two, at the expense of the last. It also didn't help that during this 20 year period, the efficient systems programming languages were left behind as the big corporations scrambled to create java for Android, and various backend/cloud technologies. It took until 10 years ago until Rust was in a state to be a "main stream" programming language. Meanwhile, microsoft (responsible for the largest desktop OS) dropped the ball on several UI frameworks. There were no good/easy cross-platform UI frameworks available. There were only various poor ones (Qt, imgui, flutter, various terrible java ones, ...) and then of course: html via electron. If one cross platform UI had been very successful and loved by developers it might have been a different story. But the web wave and droves of JS programmers made electron popular. Imagine if Microsoft had made cross platform Avalonia just as electron started to take off?
I think AI and the RAM scarcity will mean the days of bloated apps are over. The pendulum will swing back.
1
u/Electronic-Yam-69 12d ago
1
u/Original_Emotion_509 12d ago
Its easier and consumer devices can handle the overhead.
1
u/New-Anybody-6206 12d ago
It's the same reason Google picked Java for Android even though it had huge backlash... an overabundance of cheap third-world talent that already knew the language.
1
u/Pitpawten1 12d ago
Code ownership and forced updates
1
u/JohnCaner 12d ago
Exactly why I coded NoDOM...
https://osullivj.github.io/nodom_ukprop/ https://github.com/osullivj/nodom https://github.com/osullivj/nodom/wiki
1
u/HailingCasuals 11d ago edited 11d ago
Because writing and maintaining native code for multiple platforms is expensive and redundant. You’re basically developing multiple separate apps that do the same thing. Pretty much the only programs that are native nowadays are from developers that have completely given up on cross-platform support and focused their efforts on one.
AI is significantly reducing this burden. Discord just announced that they’re migrating their desktop clients from Electron to Rust and it’s surely because they used AI for the task. Before AI, migrating a large code base to a completely different language would be a 2 or 3 year effort, which was almost never financially worth it. Because it’s not simply translating the literal code (which would gain none of the benefits); you’re reengineering and retesting large parts of the code base.
1
u/oplukana 11d ago
1
u/higgs_boson_2017 11d ago
A lot of programmers love building complicated solutions to show how "smart" they are. If they began life on call 24/7 like I was, most this shit wouldn't exist and page loads would be measured in ms.
1
u/Brilliant-Ocelot1536 11d ago
I think this is dead branch of pre-AI development, it makes little sense now but people still doing this by inertion.
Looks like the initial goal was to make cookie-cutter project development easier. Stuff must be interchangeable – in a sense that most of the codebase at least tries to run on the multiple platforms without big modifications, and in a sense that coders are interchangeable. You can't replace Swift programmer to the Kotlin one without quite a bit of friction but you can to this with JSers much easier.
The consequence for that is you having dependencies, dependencies, dependencies of dependencies. Multiple hundreds megabytes of shit which is taking space and ram on the user's computer – just to display some text and some pictures like in 2010.
But, there is an upside to that.
I think, because of this approach in particular, the hardware manufacturers we forced to add more and more ram and disk space, so that bloat is still working somehow.
And when you push back and rewrite your software with more efficient tech, which many people do now, usually in Rust – then you can really appreciate, how powerful these machines actually are, and have been for last, like, 10 years.
1
u/Superb_Raccoon 11d ago
EMACS...
1
u/alanvnk 11d ago
capitalism
1
u/Songodan 11d ago
I was educated by my first CS professor about efficiency with memory, things like data type and cleaning arrays in C. He was expected to retire in a few years from that class i i had in 2018, was how he learned, worked in the era of fitting a whole app on a 5.25” disk or something
So when i went from CC to a university, students were very different, they weren’t taught about memory and the underlying workings of data structures, more focused on infrastructure and environments, SOLID, etc
Also the same way at a large company i work at now, by large i mean a 1T+ valuation on nasdaq. I started using short, arrays instead of list, hashsets etc. i got told to not do that and just use int and list, even though i used short to store as an index type of thing for 5 things.
So extrapolate that to many lines of code just using the most familiar data types instead of efficient. This goes to your question, just using electron is easier than rewriting. Just like its easier to use less efficient types for simplicity. E.g. dictionary to store one key value pair for read only reference instead of a tuple. Don’t need the mechanics of a dictionary for it but it’s what people used to
1
u/AnonymousGamerAcc 10d ago
Cuz it's easier which means more people can do it for less money and faster
1
u/bitzap_sr 10d ago
RAM used to be cheap.
1
u/Alundra828 9d ago
I personally feel it came down to managers expecting velocity out of their engineers and reprimanding them for not taking advantage of the latest and greatest tools to improve that velocity.
It then became a game to where you as a developer were required to know and have an opinion on every single tool that was released that week and it sort of turned into a massive circlejerk of adopting tech that was barely, or not even fit for purpose.
Everyone was so quick to adopt Electron, and I bet you the electron team barely had a handle on how to scale this "product" and make it good. Yet here it was, dominating everything, by accident.
1
u/wish_you_a_nice_day 9d ago
Plus, Electron works pretty well. If your business people ask you to develop something with a limited timeline. You make compromises.
1
u/Careful_Might_807 9d ago
Because C++ is hell to write on, and unusable if you don't have 3-4years of experience. Native web browsers are shit because they have gigantic differences especially webkit (i hate it)
1
u/jonnobobono 9d ago
Also let’s not forget developing a Web UI is generally much easier and it works everywhere. Mobile responsive design is a core part of modern CSS and HTML. One app supports basically all devices.
1
u/MasterOfTheWind1 9d ago
What gives you money is deliverying a release. Not deliverying the best release.
Compute power on users' devices made optimization kinda pointless. A simple form uses 2GB of RAM? Who cares, every device has at least 8GB. That form uses 100% of one CPU? Who cares, the device has at least 3 more CPUs.
If going full efficient and optimized makes you deliver one release in the same timeframe that otherwise you would deliver 5 releases, and that may affect your pay, why would you?
1
u/wildsofwald 9d ago
Product managers and upper management. I've literally offered to build applications the way you're describing and always get a no because they're worried they won't be able to find enough low effort, cheap developers to maintain it. It's annoying. I hate that garbage as a user but it's all they want.
1
u/kenwoolf 9d ago
Cause business people want money and they want it now. And consumer want the product and they want it now. And there is a balance between quality and quantity where the consumers are willing to slurp down shit as long as they get the barely tolerable flavor of shit they can still swallow in the large enough quantity they desire.
With ai we will get even worse software but in larger quantity so people will complain for a whiley then forget what it was like before and get used to the new reality.
1
u/Ok-Craft4844 8d ago
No hard data, so add salt accordingly.
First, let us appreciate how weird it is that a technology that was conceived as a big encyclopedia (hypertext, the h in html) took over as a technology for applications.
My take: "The web won" because in the "classic" ecosystem (local executable using the OSs gui libraries) deployment was neglected.
Take a simple alarm clock for your pizza as an example.
If you want to distribute it to windows, you need to package it and convince someone to permanently modify their system with it in a way everyone will yell at them for beeing naive for "clicking at something" when things go wrong. Which they do, when we think of the PCs of our parents and grandparents we used to fix. You may also have fun with whatever restrictions apply to the machine if it's a corporate one.
For Linux, youre in for a lot of "fun" to integrate your app and it's dependencies in some package manager for n distros.
And this is before we're talking about updates you may want to push.
The alternative in this case is a static html page with a little JavaScript.
You don't have to care about windows, Linux, mac, package managers or rollout: here is the URL, just use it. unless the application really needs performance (Photoshop, cad, ...) or network is no option, nobody cares for efficiency - deployment trumps everything else
This is the situation that got us our whole ecosystem. And in this ecosystem, "electron" is (ironically) an easy way to go back to the local app form of deployment, when it's needed for reasons of decentralization or interaction with the local machine (e.g. in an editor).
1
u/IcedMatter60 8d ago
maybe because of compatibility, people are just too focused on building, and others want their product to work with the newly developed tools out there. every dependency and integration adds another layer of maintenance, but removing old layers can break workflows people still rely on.
1
u/hroldangt 15d ago
I don't know why.
I remember using older versions of Photoshop and it felt like, "made for my computer". Then, a new version (still cool), then a new version... and suddenly the chain got broken, the app and others felt like weird things glued together, something some people will never understand unless they go back in time to experience the original applications.
This has nothing to do with your computer speed and RAM, you can't just solve it buying an increasinly powerful computer every year, you can tell things are not exactly smooth.
Used NotepadLite for several years, it felt blazingly fast, then... not anymore. Now I use Notepad++, it does what I need, and it's clean+fast. Microsoft Office doesn't feel the same anymore, but FreeOffice (from SoftMaker) does, it feels smooth like in the old days.
1
u/Philluminati 15d ago
There benefits of web based cloud apps:
* One version of the app in production instead of switched off machines not getting synced.
* production data is easier to protect, no jdbc connection stealing issues
* app appears more resilient. You can login from any machine without group policy or license issues.
* If a machine breaks you can bin it, buy a new one and carry on where you left off.
* no data caching issues on client machines, if required. Caches on the server.
* no db accessible on internet or vpn. Easier to control access patterns
* web apps are horizontally scalable.
* one app for desktop and mobile
That said I dunno who is writing this electron shit. No need for it to be so bloated and bad. It’s totally inexcusable.
1
u/mxldevs 15d ago
Not having to rewrite your app for a dozen different platforms is, arguably, efficiency.
You want to go maintain your own windows, macOS, linux, web, ios, android builds and think it's better because they are native experiences? Go for it.
0
u/zerpa 15d ago
Have you tried the jank that is native applications developed more than 10 years ago? They are stuck in the same old UI metaphors and heavy inflexible frameworks. And a Qt application is _not_ lighter than an Electron application.
VSCode has native accelerated component (e.g. the terminal). Rust + GPUI show some promise in displacing Electron, but generally speaking, Electron is already hyper-optimized, does JIT compilation, has the most robust layout engine. Yes, it trades memory for performance, because memory was cheap.
Sure, some tiny apps that don't need "fully featured" can be made lightweight, but as soon as you add true unicode support, internationalization, accessibility, cross-platform, you can't do a whole lost better than Electron while keeping development costs down.
-1
u/Smooth-Weekend-2314 15d ago
Because most engineers don't understand computers at any point lower than javascript. Ask them how a CPU works and I'll bet most would give you a deer-in-the-headlights look.
I'm not advocating that we all go back to slinging assembly, but we should be able to at least make smarter cost/benefit decisions.
0
u/rcampbel3 15d ago
because it was easier than having a dev team for windows native, a dev team for mac native, a dev team for web, a dev team for iOS and a dev team for Android and supporting 3 almost completely different software stacks and having to do qa on all of those different versions and having to backport bug fixes to all of the different versions.
0
u/werpu 15d ago
Electron does not have to be inefficient my if you dont use electron, my Tauri installers for my tools have around 9-10mb!
Electron would have 65 for the same tools!
0
u/nick_denham 13d ago
Compute is for the most part incredibly cheap in the context of most application types styles, i.e. some sort of web form pulling data from a backend. So you could hyper optimise that but why would you bother when even the most potato android smart phone from 10 years ago will still handle it. Plenty of code gets optimized but it's the drivers, renderers and compilers that they spend the time and effort on as they have the most sensitivity and impact.
0
u/Dussimm 13d ago
Guys, it is almost always upper management delusion. My friend was just asked to to redo android + ios app with flutter. 100% vibe coded. Result by the end of the year. Two multi milion lines of code native app. They are fucking dumb.