this post was submitted on 12 Dec 2023
937 points (98.8% liked)
Programmer Humor
32495 readers
547 users here now
Post funny things about programming here! (Or just rant about your favourite programming language.)
Rules:
- Posts must be relevant to programming, programmers, or computer science.
- No NSFW content.
- Jokes must be in good taste. No hate speech, bigotry, etc.
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Cross-platform apps - The Linux experience:
No, but when I have the choice between a platform-specific software I like and a cross-platform software I don't, I usually go with the former.
I've used Linux for much longer than Electron even exists, and I've learned to live with what I have available.
I'd rather wine about it than use an electron app
I do use some Electron apps, but I also can't say I enjoy it much.
Yes & no is my take. Usually no Linux support means a free software app is born to replace it which is awesome--or better, a previously-obscure or deserves-revitalization free software application gets its moment in the sun (rather than reinventing shit that already works cough Matrix). …The downside is when employers/client/etc. demand you use some proprietary sludge so luckily you have Electron app to get over that hurdle--tho 90% of apps in this category largely should be fine in PWA form instead of needing Electron.
I'd rather just have it working properly inside a browser, instead of it telling me that it has this neat cross-platform app, which turns out to just be Electron. On mobile that can be fine, but I dislike it on Desktop, personally.
Do excuse me if this is false, I have never actually worked with Electron on the developer side myself, however I don't believe it offers anything you couldn't do through a normally provided website. I know for example Discord only allows screen sharing in the desktop app, however I've also seen websites which allow screen sharing, so that seems more like an arbitrary restriction than anything. I mean, in the end it's just a dedicated Chromium install for one single website, so where is the need to force the website onto your pc?
UX-wise, having a standalone “app” you can open and CMD-tab to is superior to “which of these 50 fucking tabs I have open is that app I was using…”
But, Electron also wraps your “website” and provides APIs to OS-level stuff like the camera, files, etc. It’s really quite elegant and probably the way of the future. It will absolutely get more performant as it matures.
It can do stuff that running in your browser can not. Since electron runs both the client-side code and the server-side nodeJS you can communicate between the rendering engine and the back-end for tasks that a web browser alone wouldn't allow you to do, like accessing and navigating your local file system for example. Or if the app has a lot of assets and it needs to work offline, you can have the nodeJS backend download the files and encrypt them and have the front-end query the nodeJS and to get the decrypted assets and use the whole web app offline completely with a local database that you may sync with a webserver at some point later if or when internet connectivity is restored.
For most apps its overkill, but Electron and NodeJS can do pretty much anything a native app can do (just slower and while using a LOT more resources than a native app) but can be done entirely by someone experienced in web frontend development and nodeJS.
I am glad that atleast it ends there. It could have been worse.
Though calling them "cross platform" when all you're doing is opening a website in a browser is IMO a bit rich. Is lemmy cross-platform, too?
If at least they had native UI elements on each platform, we'd be getting somewhere. Fitting design and all.
It's not just "opening a website in a browser". The UI itself is displayed in a WebView, but Electron (and Tauri etc.) also have code running outside the WebView which interfaces with native APIs etc. Just for a simple example - a normal browser application couldn't open a file on your drive before without showing a dialog (and it still can't without getting permission first), which Electron etc. can.
And this code is absolutely cross-platform. So how is it rich to call an application with a cross-platform UI and cross-platform functionality "cross-platform"?
Would you prefer new terminology? Like platform-neutral UI? The way I see it there's CLI, GUI, and WebUI. When discussing platforms for the first two, were discussing the OS, but for the last the platform is the browser.
I honestly don't care what the user interface is as long it's efficient at getting done what I need it to do.