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,…?

  • Sentient Loom@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    1
    ·
    6 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).

  • bizdelnick@lemmy.ml
    link
    fedilink
    arrow-up
    0
    ·
    6 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
      link
      fedilink
      arrow-up
      0
      ·
      6 months ago

      Qt and Electron are different technologies that achieve somewhat different goals

      • bizdelnick@lemmy.ml
        link
        fedilink
        arrow-up
        0
        ·
        6 months ago

        Qt and Electron are different technologies

        Yes.

        that achieve somewhat different goals

        No.

        • moreeni@lemm.ee
          link
          fedilink
          arrow-up
          0
          ·
          6 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
            link
            fedilink
            arrow-up
            0
            ·
            6 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
              link
              fedilink
              arrow-up
              1
              ·
              edit-2
              6 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/

        • leopold@lemmy.kde.social
          link
          fedilink
          English
          arrow-up
          1
          ·
          edit-2
          6 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.

  • dan@upvote.au
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    6 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.

    • winnie@lemmy.ml
      link
      fedilink
      English
      arrow-up
      1
      ·
      5 months ago

      Have you tried Flutter?

      I didn’t develop on it, but I’ve used recently one app written in it and it was hot pile of garbage.

      It was slow as a slug, and eat lot of CPU. I’ve also checked web eversion and was astonished as it rendered everything into canvas. It’s really poor design choice to render everything by app itself.

      I guess it was just buggy app, but I didn’t try other apps in flutter, so can’t compare.

      But web demo of flutter UI components with list box was also not so fast. But perhaps it’s just web version. Didn’t know any example of good flutter app.