So whether their productivity app is written in Electron or hand-crafted assembler isn't going to make much of a difference to the end user experience.
Electron and similar apps serve a legitimate purpose in the marketplace which is to allow developers to deliver a cross-platform app for the same cost as a single platform one.
Sysadmins used to know a lot but earn pittance compared to “devops” or “SRE”; then those more expensive folks outsourced the majority of their hard work to cloud vendors who charge 5-11x the cost for compute.
Developers earn 5-10x more than 15 years ago, yet continue to choose solutions for their own convenience and time saving. Stating that its better for the company if they have to work less.
Surely at some point its just your job to consider the entire ecosystem and your contribution to it.
Otherwise why are you worth all that money?
Seriously.
I don't know why engineers manufacture worlds in which there is complex rational to explain how money goes from one pocket to another. Life isn't remotely sensible despite all our efforts to put on that thin veneer.
And more than that - if you have a team that only/mostly has web experience, they're going to use Electron, and... what kind of company would want them to stop and go learn native app development, or hire extra people just to get a native app?
Note: I fully agree with you, I do feel that as a profession we really have descended into a weird "ship the MVP, ship new features non-stop, forget quality" reality, and I dislike it. I'd love it if everything was resource-thrifty native apps, and dev teams could stop chasing new and shiny things and work on improving their existing apps until they were shiny polished diamonds. I'd love to point to an app and say "see? this is 20 years of development, look at how nice it is, how perfectly thought out everything is, how everything just works flawlessly".
But the fact that that's not happening is not because devs are lazy, or not worth their money. It just doesn't make business sense.
Salary for developers that we discuss on HN seems to be in the region of $250k base, but that's not factoring in TC- which seems to be the bulk of income for the last 5 years. It's not unheard of around here to hear people talking about pulling in half-million if they are ex-FAANG. Which is nearly everybody these days.
[0]: source is here: https://www.datamation.com/careers/developer-salary-levels-2... based on https://e-janco.com
This is why performance matters even with a machine that is mostly idle. A faster system will respond faster to events. It will have lower latency when communicating over a network. It will handle user inputs faster. Users will complain that a program takes a second to respond even if the load average is 0.01.
(I know CPUs enter lower-performance states when lightly loaded. They can go from idle to their highest performance state in much less time than it takes for the user to notice latency.)
Subjectively, every Electron app I’ve used including the local beloved VSCode has been a painful UX. I can always tell. Nothing makes a fast computer feel slow quite like them, it’s amazing. I would settle for React Native at this point.
I do remember. And it now takes A LOT longer on insanely fast CPUs and SSDs. And I hate it every time I have to wait for it.
I think most software is designed to load once and never be quit; you’re probably just supposed to leave photosnot running in the background and let it swap to disk if needed.
But I have a hard time running like that, I quit programs when I’m done using them.
Inefficiency sucks, and electron enables that on a large scale.
I have to assume that photoshop could start faster, but trade offs would be made.
Photoshop still takes a good 30 seconds+ to open.
Targets Windows, UWP, MacOS, Linux, BSD, Android, iOS, and Web: https://docs.godotengine.org/en/stable/about/faq.html
Nothing says you have to use it to make a game. I recall seeing articles here on HN about using it as a cross-platform app development framework. GDScript may be less appealing than JavaScript, however.
So how's the QuakeC development ecosystem these days? How good is ChatGPT at generating QuakeC?
Who's still programming Unity3D in Managed JScript or Boo?
Yes, so we can go back to writing a hundred lines of imperative code to render hello world.
11 for the HTML document template
7 for the boilerplate package.json
3 more for the scripts addition to package.json
3 more for the “devdependencies”
20 for main.js
from: https://electronjs.org/docs/latest/tutorial/quick-start
A fairer assessment would be C++ with Qt to be honest though.
build with e.g. gcc hw.s `pkg-config --libs gtk+-3.0`
.globl main;main:
push %rbx
xor %esi, %esi
xor %edi, %edi
call gtk_init@PLT
lea .HW(%rip), %r8
xor %edx, %edx
xor %esi, %esi
mov $2, %ecx
xor %edi, %edi
xor %eax, %eax
call gtk_message_dialog_new@PLT
mov %rax, %rbx
mov %rax, %rdi
call gtk_dialog_run@PLT
mov %rbx, %rdi
call gtk_widget_destroy@PLT
xor %eax, %eax
pop %rbx
ret
.HW:.string "Hello World!"But more importantly it's really not about the lines you code write once, or very few times in comparison -- it's about the computer does any time the application starts up on any machine, or any user does something. Obviously, to an extent. You wouldn't write a thousand lines of code instead of 100 to make something that is already very fast 10% faster. But I certainly would write 10 line instead of 1 if it meant the code is 10 times faster. It's just typing after all.
Wasn't the whole OSX's new paradigm a switch to high level language and frameworks , with compositing window management to display super fancily rendered hello worlds ?
Decrying cycle burning for the sake of high level abstractions feels like a complete rebutal of everything OSX/macos ecosystem stood for.
No, not really. You're making it sound like Classic MacOS applications were written in assembly, when it was mostly C++. Switching to Objective-C was more of a lateral move, not a clear step forward in time or level of abstraction.
The Mac OS X graphics stack was a pretty big change from Classic MacOS, but it wasn't that much of a change from NeXTSTEP, which worked with 12MB of RAM + 1.5MB VRAM. NeXTSTEP just wasn't as eye-catchingly colorful. Early OS X did poineer gratuitous use of some effects like translucency with blurs in desktop GUIs, but since this was the time period where GPUs were becoming mainstream, these effects weren't egregiously resource-intensive.
And considering that OS X was adapted with relative ease to power a smartphone with 128MB of RAM, it definitely wasn't fundamentally bloated in the way that today's Electron apps are.
NextSTEP itself was a big change compared to X or Windows's GUI stack. NeXT machines were beefy and adjusted to high workloads so the user experience wasn't problematic, but it's still more resource use than the standard stacks of the time. I don't see it as a bad thing, but we should acknowledge resource economy wasn't a target of the neither NeXT nor Apple at that time.
> 12MB of RAM + 1.5MB VRAM
NeXT launched in 1988, basically around the times when "640k should be enough for everyone" was a meme. Even in 1996, 12MB of RAM was nothing to sneeze at. So, sure those are not enormous numbers, but they're far from the lower end of what was sold to consumers at the time.
> smartphone with 128MB of RAM
We should take a minute to note that 128Mb or RAM is not small for a phone at the time.
Otherwise, sure electron apps use a lot more than that, but the point was always to pay for powerful hardware and use it at full potential to run fancy apps. People loathe electron apps' bloat, but ease of development has also always been one of the core values. Better have apps that aren't fully optimized than no apps at all.
I say that looking at macos' pretty big market share compared to what it was a decade or two ago.
And we see tons of users choosing VSCode or IntelliJ's offering above Textmate, Codea, or even BBEdit, so the market for handcrafted delightful editors is also pretty slim. And that trend was there since the Eclipse days, so nothing new either.
All in all, I really think the choice comes down to electron/cross compiled apps or no apps, in many many cases.
But yes I also remember the days when lots of software just didn’t exist for macOS and I was thankful for a webtech version.
Cocoa and Electron are not the same.
Web technologies are fine, but what we really need is some kind of lightweight browser which allows you to use HTML/CSS/JS, but with far lower memory usage. I found https://ultralig.ht/ which seems to be exactly what I am looking for, but the license is a major turn off for most paid services. It makes sense for smaller, indie projects to adopt it, but I haven't seen many "desktop apps" using this in the wild.
Ultralight (https://ultralig.ht/) looks pretty cool. I think another possible option is Servo (https://github.com/servo/servo) – it was abandoned by Mozilla along with Rust during their layoffs a while back (but the project still seems to have a decent bit of activity). It would be great if some group of devs could revive the project, or a company could fund such a revival.
Eventually, we'll need to reflect on, and explore whether HTML+CSS is really the best way to do layout, and we could maybe perhaps consider proting the Android/iOS layout approach over to desktop.
GTK, QT, etc which are also superior to the single app, limited size focused Android/iOS UI frameworks. More importantly, unlike iOS/Android, they’re even cross platform.
HTML/CSS/JS are successful because of the same reason electron exists. The success of the web means there’s a huge developer base that knows how to work with HTML/CSS/JS which was the original lingua franca of the web, and there are tons of libraries, frameworks, tools, components, etc available in the HTML/CSS/JS world that makes development easier and quicker.
The actual reason is a different one IMHO. The implementation of web standards enabled cross-platform engines that provide every UI customization one could possibly need for a SaaS product. This decision included many benefits for businesses and developers alike, such as:
- User data stays in the walled garden
- Users most probably already have a web-browser installed
- Responsibility to keep the runtime (web-browser) up-to-date is on the user side
- Automated updates (POV user)
- No installation instructions
I think it as much as a business decision as it was the decision from developers to bet on HTML/CSS/JS instead of GTK, QT, etc.
I think your path to this future is getting a DOM API specced for WASM (as in, not going via a Javascript bridge). WASI might help.
If and when that happens, then you can repurpose that same API without necessarily needing to compile to WASM. The biggest hurdle is that the current DOM API is a Javascript API, not an API describing e.g. memory layouts.
If you want to get rid of Electron, you personally have to volunteer to be responsible for 5x the work of anyone else, and accept bootcamp-graduate pay. Do you see why it's not happening?
And HTML/CSS may have its quirks but I'll take it every day over fumbling with GTK or whatever
Like consumers that want to buy a phone that fit in the hand… there is none at a reasonable price.
Kinda like headphone ports and microSD slots on android phones. Are there models that do this? Yes! Is anyone willing to pay more for it? No! But they are very very loud online about it.
There do exist smaller android phones as well, just like a headphone port nothing is stopping you from buying one instead of complaining on the internet!
> Is anyone willing to pay more for it? No!
Is anyone willing to pick a phone over another (despite what paulmd's opinion might be)? YES.
> There do exist smaller android phones as well
No they don't. There is NOTHING on the market currently that is sized and priced like a samsung S5 mini today.
iphone mini wasn't priced like 6 phones, and it still didn't sell well. again, you can't seem to grapple with the reality here that what you want is a very niche thing and it doesn't sell well as a mass-market product regardless of price. that is, after all, why apple stopped making that size once again.
the iphone SE is about as small as the market wants. Below that is the domain of mini phones - which do exist, but mostly from smaller android vendors.
> No they don't. There is NOTHING on the market currently that is sized and priced like a samsung S5 mini today.
s5 mini: 131.1 x 64.8 x 9.1 mm
cubot pocket 3: 133.2 x 55 x 12.3mm
unihertz jelly pro: 92.4 × 43 × 13 mm
just with literally a few minutes of searching.
again: the whining is a lot more intense than the reality. you are being catered to, you just want a niche product to be as cheap or moreso than the mainstream products that sell a zillionty units.
Still costs 4x than regular android phones.
> you can't seem to grapple with the reality
You can't seem to grapple with the reality that 839€ for a phone is completely insane, and not everybody is a rich spoiled person like you.
> unihertz jelly pro: 92.4 × 43 × 13 mm
Funny… I am returning a unihertz because of software issues (default google apps just crashing)… sure it's small… but I implied that stuff must work.
> just with literally a few minutes of searching.
Too bad that being rich and spoiled didn't enrich your brain uh?
I hope it's ok for you that unlike you, I knew what I was talking about.
For your small phone example, even Apple is cutting production of their smaller phones because not enough people are buying them. The entire premise really is overblown online.
You've ever heard a anyone say "This computer is too fast" or "this computer doesn't burn enough electricity"?
> For your small phone example, even Apple is cutting production of their smaller phones because not enough people are buying them.
Yeah I did mention "reasonably priced", which apple is not.
And you know that because you’ve analyzed whole market and know opinion of users of every web software? Definitely not because you only live in bubble of other software engineers so you’re not exposed to complaints of common folk?
Discord has gotten pretty solid, vscode is spit fast. The hate against Electron feels so selective & antagonistic, picks it's targets, never acknowledged any value, never recognizes any points for the other side. It is just incredibly lopsidedly biased. Over what doesn't feel real to so many.
I was hoping Tauri would be the one, by using a shared library model. That would drop memory consumption down significantly. But they use webkit on Linux and I'm sorry but I want a much better base that supports more modern capabilities.
Just changing their high level data structures alone would yield 10x improvements, easily.
The problem with Electron is RAM, disk space, and download size, which is because every app needs to ship its own copy of Blink. This is a solvable problem, but nobody is incentivized to solve it.
For example all Electron apps I use have their own implementation of a spell checker rather than hooking into the system one. Normally in Mac OS if I add a word to the system dictionary all apps will learn that word, but in each Electron app I will have to do it again, and again, ...
Many also implement their own UI widgets like basic buttons and input fields whose UX is not at all in line with native apps.
It's horrible having to constantly context switch _within the operating system I am using right now within this very moment_. Context switching when switching devices is not a problem at all.
I wonder if anyone did that comparison, an Electron app vs Chrome + a local copy of node+express whatever running the backend
(There basically aren't memory metrics that can show the effect of binary sizes on macOS. It'd show up as disk reads/page ins/general slowdowns instead, but SSDs are so fast that it's very hard to see one.)
> For every extra cycle an hardware engineer can squeeze out of silicon, you will find a programmer adding one hundred cycles to their program[6]. In other terms, I fear that once devs figure out how powerful the M1 is, they will throw more "features" at it.
Can we please stop replicating the "growth" fallacy into software ecosystems? Haven't we learnt enough about how unsustainable and damaging this is?
I hope Electron/CEF die soon, and people get back to building applications that don't consume hundreds of megabytes of RAM to render a hello world.