mjtsai.com
Blog - Is Electron Really That Bad? - Michael Tsai
Excerpt
First, this observation – which I strongly agree with – regarding the desktop apps we ended up having > thanksto Electron and why we often consider them “buggy”[…] > […] > As documented in the thread from late 2023, this is a common issue for the majority of AI clients built with SwiftUI, which is often less efficient than Electron when it comes to rendering real-time chat messages. … ... > As usual, the commentary from @mjtsai is so spot on... The developer experience with Swift is so terrible. The language has brought many modern features to developers on Apple platforms, but at the significant cost of productivity and efficiency. > If you spend any time on other platforms, the differences smack you in the face almost immediately. ... While I've never found an Electron app as good as a native app, I've also never found a Native app as bad as a Catalyst app - even the first party ones from Apple. So much basic stuff, and it's hard to know if it's because the APIs are garbage, or because Catalyst just inherently attracts iPad-first developers who are bad at doing Mac apps. … Electron is still a leaky abstraction. Basic stuff doesn’t work as expected. My biggest beef is that most of the apps ignore regional preferences set at the OS level. The quickest way to tell an electron app from a native one is when you notice the whacky datetime formatting. It's pretty ridiculous that Swift UI / Catalyst often ends up as being worse than Electron. Outside of the obscene memory and CPU usage, the big problem with Electron apps -- as I'm sure many of you have experienced -- is the way they don't adhere to OS conventions. Things like system-wide keystrokes don't work properly, or UI elements don't behave properly. But somehow Apple managed to bungle Swift UI and Catalyst in the same way, even though it's presumably AppKit underlying it. … One of the issues with Electron that Apple should acknowledge, is that those Electron apps which don't adhere to HIG, undermine the platform and in turn one of the main reasons customers used to (past tense) buy Apple; great hardware and great software, built with a standard. Once that goes out of the window, and my user experience for non OS-apps on mac is the same as it is on windows, that is one less reason to buy a Mac. … - Multiplatform is a common business requirement. Apple refuses to bring back Yellowbox or acknowledge non-Apple platforms exist. - Apple's dev stack doesn't offer 10x speed or 10x simplicity to produce on Apple platforms. You still have to sweat the details (which Apple rarely does). The frameworks have not kept up with user and dev expectations. Meanwhile, it's not radically difficult to build a web app. - Hostile developer outreach. Poor experiences with app review, bug reports, and a "deal with it" attitude towards yearly breaking changes. - Apple's lost the UI/UX high-ground. "They don't have any taste". The HIG is gone. Catalyst and SwiftUI are negative starting points. There's no standard anymore, just common design patterns. That web apps are so widely-accepted proves the shift. … It is right to point to Apple's failure to embrace the web whilst squeezing out their own shitty cross-platform toolkits, I think, without simply apologising for some of the worst apps ever written. PHP rightly has a reputation for encouraging security vulnerabilities in web-apps, and Electron rightly has a reputation for slow, fat, not native and questionably inaccessible desktop apps. Of course, in both cases, there are great exceptions, but let's be honest here, making Electron look good is only possible if you're very selective in your criteria.