119
submitted 7 months ago by LemmyHead@lemmy.ml to c/linux@lemmy.ml

Electron is a widely hated framework on Linux, but what about the alternatives like Neutralinojs?

In their own words: In Electron and NWjs, you have to install Node.js and hundreds of dependency libraries. Embedded Chromium and Node.js make simple apps bloaty — in most scenarios, framework weights more than your app source. Neutralinojs offers a lightweight and portable SDK which is an alternative for Electron and NW.js. Neutralinojs doesn't bundle Chromium and uses the existing web browser library in the operating system (Eg: gtk-webkit2 on Linux). Neutralinojs implements a secure WebSocket connection for native operations and embeds a static web server to serve the web content. Also, it offers a built-in JavaScript client library for developers.

Do you experience alternatives like Njs to blend more in the desktop layout, install less junk, use less memory, are more compatible with Wayland,...?

top 50 comments
sorted by: hot top controversial new old
[-] secana@programming.dev 94 points 7 months ago

https://tauri.app/ is very popular and does not need electron. It uses the OS native we view.

[-] starman@programming.dev 26 points 7 months ago* (last edited 7 months ago)

And 2.0 will support Android and iOS

[-] xlash123@sh.itjust.works 5 points 7 months ago

I wanna use Rust to build mobile apps so bad. I don't really know what I want to build, but I want to use Rust to do it

[-] lazylion_ca@lemmy.ca 3 points 7 months ago

Reinvent Winamp for Android and iPhones.

[-] starman@programming.dev 4 points 7 months ago

I don't know, but probably soon. They release beta versions already.

[-] lengau@midwest.social 26 points 7 months ago

Tau'ri, you say?

[-] Fisherswamp@programming.dev 7 points 7 months ago

I have been using Tauri for a personal project of mine and I absolutely love it

[-] kib48@lemm.ee 4 points 7 months ago* (last edited 7 months ago)

what apps use Tauri? I only know about Dorion which doesn't really work well from my experience

edit: ok so Dorion works well in an Ubuntu VM but it doesn't have a build for any other distro :/ also i found this https://github.com/tauri-apps/awesome-tauri

Came here to say Tauri.

[-] bjoern_tantau@swg-empire.de 44 points 7 months ago

No matter how much I like an alternative to Electron. It cannot save me from bad Electron apps.

[-] Secret300@sh.itjust.works 13 points 7 months ago

Are there any good electron apps? Like genuinely

[-] cygnus@lemmy.ca 41 points 7 months ago* (last edited 7 months ago)

VSCode and Obsidian work great.

[-] joyjoy@lemm.ee 5 points 7 months ago

Until you want to integrate with the system and use gtk window controls.

[-] Secret300@sh.itjust.works 4 points 7 months ago

I hear great things about obsidian but I haven't used it since it's not open source

[-] why@lemmy.sdf.org 11 points 7 months ago

Im willing to give them a pass on that since they don't vender lock the notes I'm taking.

[-] cygnus@lemmy.ca 6 points 7 months ago

Sure, but all it does it give you a nice UI for local markdown files. There's no lock-in.

[-] acockworkorange@mander.xyz 5 points 7 months ago

I will catch flak for this, but discord works fine. You could be fooled into thinking it’s native. Audio, video, attachments… pretty seamless. Zoom sucks ass though.

[-] morrowind@lemmy.ml 9 points 7 months ago

Count yourself lucky because discord desktop is one of the worst pieces of crap I've ever used

[-] slazer2au@lemmy.world 7 points 7 months ago

Na, Teams is worse than discord any day.

[-] missingno@kbin.social 6 points 7 months ago

Desktop audio streaming has never worked. Bug report has been outstanding since the beginning and Discord has just... never addressed it.

[-] dan@upvote.au 4 points 7 months ago* (last edited 7 months ago)

You could be fooled into thinking it’s native.

It doesn't look like a native app at all though. It's not really following any operating system's design guidelines.

[-] acockworkorange@mander.xyz 2 points 7 months ago

It’s not like all native apps do either. It’s obviously a foreign toolkit. My point was there were no obvious issues accessing hardware, files, drag and drop, etc.

load more comments (1 replies)
[-] 4am@lemm.ee 4 points 7 months ago

Hey hey; discord is rumored to be doing ads now. No talking good about them!

[-] kugmo@sh.itjust.works 2 points 7 months ago

I would say it's seemless on Windows, not Linux.

load more comments (1 replies)
[-] Secret300@sh.itjust.works 2 points 7 months ago

Really? Even on windows I feel like it's slow and you can tell it's an electron app.

[-] winnie@lemmy.ml 2 points 7 months ago

Is zoom Electon?

It looks like shit and feels like shit. I thought it was native tbh... given how chunky UI is. Looks like GDI programming to me. Or they took design from Android 2 and ported it to Desktop.

[-] acockworkorange@mander.xyz 3 points 7 months ago

I’m at least 60% sure the Linux client is. Either way, it’s sandboxed as hell. I have to copy backgrounds to its own special snowflake folder or it can’t use them.

load more comments (5 replies)
[-] winnie@lemmy.ml 20 points 7 months ago

I haven't use any alternatives, and haven't developed with electron, but I know that there are another alternative -- Tauri. It also uses web-view. It's built in Rust and allows apps to be developed in JS (providing JS api) and in Rust.

What I can say -- JS support won't be cross-platform, like we have with NodeJS in electron. Special debug per platform might be required.

[-] dan@upvote.au 14 points 7 months ago* (last edited 7 months ago)

Have you tried Flutter? https://flutter.dev/

React Native is good, and isn't just a web view. It uses native UI widgets so the apps feel truly native. Many Android and iOS apps use it, and Microsoft ported it to Windows and MacOS and use it in some of their apps (notably, the Xbox app, parts of Office, and parts of Windows like the old Mail app in Windows 10, use it). Unfortunately there's no stable port for Linux :/

In theory, someone could port React Native to use Gtk, Qt, or WxWidgets, but I haven't seen any such efforts recently - there's a few old projects but they've all been abandoned.

load more comments (1 replies)
[-] bizdelnick@lemmy.ml 9 points 7 months ago

Alternative for what? I never used electron apps and I don't see any reason for that. If you are a developer, try Qt.

[-] moreeni@lemm.ee 20 points 7 months ago

Qt and Electron are different technologies that achieve somewhat different goals

[-] intelisense@lemm.ee 12 points 7 months ago

Yet the telegram client is written in Qt and has great cross-platform support.

[-] jbk@discuss.tchncs.de 4 points 7 months ago

They have like 3 different, official codebases and clients (and so many 3rd party ones) for so many platforms. No other app I know of is like that, not really a great example imo

[-] bizdelnick@lemmy.ml 6 points 7 months ago

Qt and Electron are different technologies

Yes.

that achieve somewhat different goals

No.

[-] moreeni@lemm.ee 4 points 7 months ago

You can't get a website working as a "native" application with Qt, which is exactly what is Electron's goal.

[-] nyan@sh.itjust.works 13 points 7 months ago

Which is why Electron reminds me of a little kid who's just done some extremely difficult but utterlly pointless thing.

Websites belong in a browser. If it doesn't work in any random standards-compliant browser, then you should be delivering it as a true native application, not some horrific fiji-mermaid-esque hybrid.

[-] moreeni@lemm.ee 5 points 7 months ago* (last edited 7 months ago)

You are talking as if all people can make a native app with the same knowledge and amount of effort as it would take to develop a website.

Sometimes, web developers would want to go further with their app and deliever "native" functionality. Sometimes, a person wants to build an app but only happens to know how to build a website.

It's a much more complicated matter than just some idiots deciding "let's build an utterly pointless thing and then let other idiots build horrific fiji-mermaid-esque hybrids!!".

https://asylum.madhouse-project.org/blog/2018/10/26/Walking-in-my-shoes/

[-] wewbull@feddit.uk 10 points 7 months ago

Generally, my view is if it's an electron app it's going to be a crap user experience.

You are talking as if all people can make a native app with the same knowledge and amount of effort as it would take to develop a website.

No, not all people can't do that, but I think they should learn. It will lead to better results. Or are you saying that web developers are inherently incapable of developing native applications?

load more comments (1 replies)
[-] nyan@sh.itjust.works 6 points 7 months ago

Sometimes raising the barrier to entry is a good thing.

Many Electron applications I've run across don't make even a try at loading system settings. For me, that causes accessibility issues related to photosensitivity. For some reason, feeling like I've been stabbed in the eyeball when I try to open a program does not endear me to it or its framework.

No application at all is actually better than something built on Electron, as far as I'm concerned, because then there's a chance that someone, somewhere, might fill in the gap with software I can actually use.

Electron needs to either actually provide the basics of native functionality, or go away.

[-] winnie@lemmy.ml 2 points 7 months ago

Then they shouldn't! Just give users website and be done with it.

Now you can even allow websites work offline and install them "like" an app with proper manifest.

load more comments (1 replies)
[-] bizdelnick@lemmy.ml 5 points 7 months ago

There is a browser working natively in any system. I don't see any point in bundling a web app together with a browser and calling it a "native" app. The only difference is that you have no address bar in that case.

load more comments (1 replies)
[-] rollingflower@lemmy.kde.social 8 points 7 months ago

The thing is, Linux Desktops dont have a unified WebView. I wonder how that would work on KDE and others

[-] leopold@lemmy.kde.social 4 points 7 months ago

Tauri uses webkitgtk everywhere, including KDE.

[-] rollingflower@lemmy.kde.social 1 points 7 months ago

Hm, I mean that is way better than using an entire Chrome browser, but KDE uses qtwebengine

[-] leopold@lemmy.kde.social 8 points 7 months ago* (last edited 7 months ago)

True. If their goal is truly to use the "native" solution everywhere, they should use QtWebEngine on Qt desktops. For the most part, the advantage with Tauri isn't so much that it's using the "native" web engine, it's that not every Tauri application has to bundle a full (probably outdated) web engine. On Linux, this is achieved regardless of whether WebKitGTK or QtWebEngine is used. The first Tauri application you install pulls in WebKitGTK if you didn't already have it installed, then every subsequent application just uses the same one. I'm personally glad it's using WebKitGTK despite being a Plasma user. The less we rely on Blink and Blink-based web engines, the better. Having to spend 100MB of my 1TB hard drive on WebKitGTK to achieve this isn't making me lose a whole lot of sleep.

load more comments (1 replies)
load more comments (1 replies)
[-] sentient_loom@sh.itjust.works 8 points 7 months ago

I'm using pywebview, a cross-platform python web view GUI framework. I like it so far, it's fairly straightforward. I just wanted a python API around my database, and I'm building most of the app in the front-end with vanilla JS and html.

I didn't want the (alleged) bloat of electron, and I didn't want to jam async/await onto everything in the backend, so I found this alternative.

The 3rd contender was Tauri, but I didn't want to bother learning Rust for a simple API. But it was very tempting, and Tauri is an option you should consider.

I haven't finished my current project so I can't completely vouch for pywebview yet. But so far it's great and I recommend it if you don't mind using python (I do long for a statically typed backend TBH).

[-] merthyr1831@lemmy.world 5 points 7 months ago* (last edited 7 months ago)

If you need multi platform support in one codebase, Flutter is a good choice. Ubuntu uses it for their new OS installer and GUI package manager.

Quite easy to get set up on Linux (though the recommended route is using Snaps).

No waiting ages for a massive node_modules folder to fill up, nor the general pain of using javascript; dart is a really nice language to write in.

You wont get the smallest binaries with it, but it's powerful, reliable, and pretty damn performant for a "non native" framework.

load more comments (1 replies)
load more comments
view more: next ›
this post was submitted on 06 Apr 2024
119 points (100.0% liked)

Linux

48047 readers
891 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS