Comment by briandear

Comment by briandear 3 days ago

10 replies

I still don’t understand why we’re using any of these Electron-style “apps.”

Ship a web application, or write actual native apps. Electron and that flavor of “app” development is the worst of all worlds.

Just like the JavaScript web frameworks have turned what should be small web applications into huge monsters — Electron has made what should be relatively small, high performance applications into these bloated resource hogs.

I get it, JavaScript developers want to be part of the fun and there is definitely a use case for tiny resource-constrained startups still changing product-market fit. But companies like Slack for instance — worth billions of dollars and can’t find a way to write a high performance desktop app in Swift for MacOS instead opting for Electron.

Think of the climate! All that extra power required to run these resource hog Electron apps on tens of millions of computers isn’t trivial, not to mention a neutered user experience that results from not taking advantage of actual native applications.

JavaScript isn’t the panacea people want it to be.

Electron makes it easy for companies but it makes it rougher for the victims.

And Tauri and all the others are simply different flavors of the same shit sandwich.

pzo 3 days ago

Go to app store on your iPhone, swipe refresh and see how heavy all those native SwfitUI apps are and we are talking only about app updates. You will barely find app less than 100MB and few that are even 300MB+. Didn't check if they are also as heavy on desktop. So that's at least regarding app size on environment impact native apps at least using SwiftUI not making it better - I would say they make it even worse since javascript apps can just autoupdate non native part without downloading whole bundle (and I think this is what slack and discord doing for some updates). SwiftUI apps are also not as fast as UIKit apps not sure about memory performance.

In practise I will take any JetBrains IDE or VSCode over native XCode IDE anytime - XCode is such a big heavy hog.

lost_womble 3 days ago

It's great that you mention the climate impact of Electron apps, because those bloated monsters truly are a huge problem; though I think you underestimate how much the Tauri team's focus has been on shrinking app size to alleviate the environmental impact made by the download of said huge Electron apps.

One of the things that actually made me interested in Tauri in the first place was their 1.0 Release[0] which included information on just how much CO2 output would be saved by switching from Electron to a similar Tauri app (600Mb vs 3MB)

Of course you're right that if, instead of using Web UI in the first place, companies went straight to native apps then there'd be even more savings to be made -- but there's trade offs to be made with regards to aligning OSs and reusing components and onboarding engineers and writing good cross-platform tests when working in native that just aren't there when working with a WebUI, and something like Tauri which has many of the upsides with fewer of the externalities of Electron should be applauded at least as a step in the right direction.

[0]: https://tauri.app/blog/2022/06/19/tauri-1-0/#environment

  • rmdashrfv 3 days ago

    I understand where this guy was coming from with the comment about Tauri being the same type of thing, but when you really take a look at Tauri, it seems to really hold up. There are some Tauri apps that have performance that is easily on par with native.

    The only thing is that Tauri apps seem to be quite easy for the developer to botch and end up with performance problems. One of the worst performing apps I ever used in my life was a Tauri app.

    • nicoburns 2 days ago

      > The only thing is that Tauri apps seem to be quite easy for the developer to botch and end up with performance problems. One of the worst performing apps I ever used in my life was a Tauri app.

      I'd say that's generally true with web-based UIs. It's possible to create web UIs that perform fantastically. But you have to know the platform and be disciplined, and it's easy to mess it up.

conradludgate 3 days ago

For me, writing JS is not great, but using HTML and CSS is what just resonates for me when it comes to building front end applications. If I need some device privileges that a browser cannot grant me, then I will use a HTML/CSS based renderer for that app.

Now, I have grand visions for an embedded servo renderer that can be driven using native compiles rust, not JS. But who knows if we will get that one day

danenania 3 days ago

This does make sense from a "crafting great software" perspective.

But building three separate codebases in comparatively niche GUI frameworks full of platform-specific quirks when you could achieve 95% of the quality with a single JS/TS codebase comes across pretty terribly as a business decision. It's hard to justify what is likely a 10x-ish cost multiplier with "it uses less RAM" or "the scrolling feels more natural". While large companies can afford it, the cost-benefit still doesn't look good to them.

adhamsalama 3 days ago

The only thing I like about Electron apps is that they just work on Linux, otherwise not many companies would bother porting their apps to Linux.

I think web apps/Electron apps may be a factor in reaching the year of the Linux desktop.

  • squarefoot 3 days ago

    If Lazarus supported other languages beside Object Pascal, that would be the truly native multiplatform integrated development system the world is looking for.

    • actionfromafar 11 hours ago

      Hm... maybe there is a case for Lazarus bindings to other languages like Rust. (Or, dare I say it, C++)