• MoogleMaestro@lemmy.zip
    link
    fedilink
    English
    arrow-up
    330
    arrow-down
    1
    ·
    2 days ago

    Electron is the only cross platform gui toolkit…

    If you ignore QT, GTK and everything else.

    I’m so glad that Microsoft makes an awesome cross platfor— wait, no, but they contribute code to— hmmm … Hey, what does Microsoft do to make apps more portable again?

    • ZILtoid1991@lemmy.world
      link
      fedilink
      arrow-up
      161
      arrow-down
      1
      ·
      edit-2
      2 days ago

      The real reasons often are:

      • They want be able to hire much cheaper webdevs instead of software devs.
      • Electron has a lot of built-in data collecting metrics, which they urgently need for creating a real-life KITT.
      • Easy live embedding of content. Sure you can add your own solution, in fact I created ETML as a solution for this problem for my engine, all without any support for nasty scripting languages or convoluted stylesheets (style-inheritance in CSS turned me off from webdev even more than JS did). At best, it can be used for things like embedding videos on Discord, because no one else thought some universal approach, let alone one that disallows proprietary players. At worst, it’s being used for ads.

      Also a lot of Windows-only apps are Electron apps, only because the manufacturer wants to go “fuck you”, even putting protections into the code just in case you wanted to run it on Linux.

      EDIT: Forgot the “live embeds” reason.

      • klangcola@reddthat.com
        link
        fedilink
        arrow-up
        13
        ·
        2 days ago

        Another reason is when developing the Web version first. Draw.io is a good example, where we get a bonus desktop(electron) version “for free” though the product was developed as a web app.

    • Valmond@lemmy.world
      link
      fedilink
      arrow-up
      37
      ·
      2 days ago

      It’s so portable! With maximal efforts we support both windows 7, windows 8.1 (but not 8.0), windiws 10 and soon Windows 11 !!!

      /s

      • addie@feddit.uk
        link
        fedilink
        arrow-up
        19
        ·
        2 days ago

        Python tkinter interfaces might be inefficient, slow and require labyrinthine code to set-up and use, but they make up for it by being breathtakingly ugly.

        • da_cow (she/her)@feddit.org
          link
          fedilink
          arrow-up
          4
          ·
          2 days ago

          And now imagine yourself creating an UI in tkinter without an editor. Because that’s what I did. It was absolutely horrible.

              • Lucy :3@feddit.org
                link
                fedilink
                arrow-up
                1
                ·
                1 day ago

                For efficiency, just use the cli. The user doesn’t want it? Then I don’t want the user.

                • da_cow (she/her)@feddit.org
                  link
                  fedilink
                  arrow-up
                  1
                  ·
                  1 day ago

                  I do not want the user to ever be expected to edit the database by hand. If they make a mistake by doing so, they can break the entire system. That’s why I wrote a GUI which gets the job done.

                  • Lucy :3@feddit.org
                    link
                    fedilink
                    arrow-up
                    1
                    ·
                    1 day ago

                    Well, every high-level, abstracted action done in a GUI can just be mapped onto subcommands of a CLI

        • Blisterexe@lemmy.zip
          link
          fedilink
          arrow-up
          3
          ·
          2 days ago

          Ugh, and they’re just weird. I can handle ugly but ktinker popups go across virtual desktops and over other windows for some ungodly reason, and never seem to dismiss themselves properly

        • Bobo The Great@startrek.website
          link
          fedilink
          arrow-up
          10
          arrow-down
          16
          ·
          edit-2
          2 days ago

          Also each is pretty bad in terms of usability and practicality, either losing integration because “containerized” or taking GBs of space or both.

          Edit: guys relax, I’m not a linux hater, I use it daily. But windows does have a unified environment, which makes deployment so much easier, while linux doesn’t. And that’s a problem since you either have old broken apps on distro repositories, or impractical, potebtially bloated, and even more fractionated environments like those I mentioned. They are patches and we should work towards a more standard environment, not adding more and more levels of abstraction like electron does.

          Even Torvalds says it so.

          • Natanox@discuss.tchncs.de
            link
            fedilink
            English
            arrow-up
            15
            arrow-down
            1
            ·
            2 days ago

            AppImages can get quite large because each app is self-contained, but the “losing integration” part is nonsense these days for any of these formars. That’s why we have portals, and if those aren’t enough you can still give the app full permissions.

            • Bobo The Great@startrek.website
              link
              fedilink
              arrow-up
              4
              arrow-down
              6
              ·
              2 days ago

              Appimages are usually quite reasonable in size, it’s Flatpak that usually require 2/3 GB per app since every package has its own version of KDE/Gnome or other runtimes so every app still has to download a new one.

              • Natanox@discuss.tchncs.de
                link
                fedilink
                English
                arrow-up
                10
                arrow-down
                2
                ·
                2 days ago

                That’s simply not true, if the required dependencies are already downloaded they get used by every Flatpak app. If you have three apps requiring the Gnome 46 libs those only exist once.

                I don’t know where this myth about Flatpaks always being gigabytes in size originates from or why it’s so persistent, but it’s wrong.

                • Samueru_sama@programming.dev
                  link
                  fedilink
                  English
                  arrow-up
                  1
                  ·
                  edit-2
                  1 day ago

                  I don’t know where this myth about Flatpaks always being gigabytes in size originates from or why it’s so persistent, but it’s wrong.

                  Alright, here is ~25 GUI apps flatpak vs appimage:

                  • 6 GiB flatpak.
                  • 2.7 GIB appimage.

                  This is if you have a filesystem with transparent compression, If you do not have such filesystem (ext4), then it is more like 15 GIB vs 2.9 GiB lol.

                  This comparison is missing the flatpak equivalents of kdeconnect, deadbeef and a few CLI tools that I have on right btw, flatpak-dedup-checker for some reason doesn’t check the /var/lib/flatpak/repo directory which is usually another +1GiB in best case scenario.

                • Ghoelian@piefed.social
                  link
                  fedilink
                  English
                  arrow-up
                  1
                  ·
                  1 day ago

                  In my experience the issue is different flatpaks depending on different versions of gnome platform or mesa or whatever, so you have multiple versions of the same library.

                  I have plenty of storage though so I don’t care that much.

                • Bobo The Great@startrek.website
                  link
                  fedilink
                  arrow-up
                  4
                  arrow-down
                  1
                  ·
                  2 days ago

                  I’m not saying that’s not true.

                  I’m saying I’ve almost never downloaded a Flatpak that didn’t require a new dependency downloaded.

                  When I removed all my flatpk some time ago, I had: Steam, Viking, Discord, FreeCad and Flatseal to manage them. All of them and their dependencies used something arounx 17 GB of disk space (most of which was of course several versions of dependency runtimes), and that was after I removed all the unused runtimes that forn some reason it doesn’t remove after I uninstall or they are upgraded.

                  I’m sure if I installed more Flatpaks, some dependencies would eventually be reused, but you still need a good collection of them at any given time. So in pracrice you still need a lot lf space unfortunately.

          • rtxn@lemmy.worldM
            link
            fedilink
            arrow-up
            6
            arrow-down
            1
            ·
            edit-2
            2 days ago

            losing integration because “containerized”

            Bollocks. I’ve seen that many times with Flatpak (can’t speak for Snap), and every single time it was either because the packager failed to set up permissions or because the user messed with permissions that the application needed. Break off the tip of a screwdriver and it will no longer function as a screwdriver.

            And I know you’re talking out of your ass because AppImage isn’t even sandboxed.

            taking GBs of space

            That part is true and accurate, and for a very good reason: dependency pinning. System packages can break if they don’t have the correct versions of shared libraries. If a package requires a very old version of a library, and doesn’t link it statically or supply it with the package, it can misbehave, have missing features, or refuse to even start. Flatpak (and probably Snap too, can’t speak for it) solves that by letting the packager specify (pin) the exact version of a dependency. If five separate packages require five different versions of the GNOME application framework, then they will download five separate packages of the correct version. AppImage solves it by being monolithic: everything is packaged together into a single executable.

            • ryper@lemmy.ca
              link
              fedilink
              English
              arrow-up
              3
              ·
              2 days ago
              losing integration because “containerized”
              

              Bollocks. I’ve seen that many times with Flatpak (can’t speak for Snap), and every single time it was either because the packager failed to set up permissions or because the user messed with permissions that the application needed. Break off the tip of a screwdriver and it will no longer function as a screwdriver.

              Well then I guess you haven’t tried to get a password manager like KeepassXC to work with a Flatpak browser, because none of the solutions I’ve seen are “fix the permissions”.

            • Bobo The Great@startrek.website
              link
              fedilink
              arrow-up
              1
              ·
              edit-2
              2 days ago

              I don’t know if it’s still the case, but up to a couple of years ago, Flatpak was configured so that externally mounted folders were not accessible. I discovered that when Steam on flatpak refused to install games on my hdd, and it was quite frustrating to figure out how to enable it. Still, it’s difficult to criticize how “bloated” are electron apps (they are) when I need to download 2GB or runtime for an 80MB telegram binary

              Snaps integration is even worse as I’ve seen browser extensions state they straight don’t work on snap’s browsers. Also desktop integration on gnone (even files drag and drop between snaps) are broken on the ubuntu installations I tried.

              Appimages have the least drawbacks and are my preferred methods between the three (at least they take less storage space than an equivalent Flarpak for some reason, but are still broken sometimes), yet they still miss a central package repository, and that’s a big problem.

          • teolan@lemmy.world
            link
            fedilink
            arrow-up
            3
            arrow-down
            1
            ·
            2 days ago

            Flatpak is good. I say that as both a user of them and a dev of applications that are published as flatpaks.

    • DacoTaco@lemmy.world
      link
      fedilink
      arrow-up
      5
      ·
      edit-2
      2 days ago

      .net
      .net cli apps are cross platform and can be portable :p
      Gui in .net isnt fully cross platform ( maui is everything except linux ) but frameworks like avalonia ( .net ) and imgui fix all that :')

        • DacoTaco@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          7 hours ago

          Nope. The ui framework doesnt support linux at all. None of its cross platform claases and enums have linux. Its stupid because .net and aspcore just work on linux…

        • DacoTaco@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          edit-2
          2 days ago

          Winforms of all things haha. Eeuw xD
          But thats flipping awesome and i love it! I know xamarin was wpf being cross platform with mono, but thats a dead horse thanks to microsoft haha

          • mittorn@masturbated.one
            link
            fedilink
            arrow-up
            2
            ·
            2 days ago

            @DacoTaco Yes, it’s Microsoft decided to kill classic win32 widgets and any XAML support in Mono, forcing new WinRT platform and not providing any GUI support in netcore. It’s sad that nobody made some crossplatform WPF implementation for modern dotnet, Maui is not incompatible with existing source code, IIRC

            • hdsrob@lemmy.world
              link
              fedilink
              English
              arrow-up
              2
              ·
              edit-2
              2 days ago

              It’s sad that nobody made some crossplatform WPF implementation for modern dotnet

              That’s basically Avalonia UI.

              I believe Uno Platform is similar, but less of a WPF variant, and closer to Xamarin or MAUI in the style of Xaml that they use.

              • mittorn@masturbated.one
                link
                fedilink
                arrow-up
                1
                ·
                2 days ago

                @hdsrob
                >That’s basically Avalonia UI.
                no, avalonia cannot help you run existing applications. Also. Avalonia is a crap, taking minutes to parse xml crap on poor hardware
                Yes, there are many implementaion of WPF-like UI, but no implementation of existing Windows UI.
                mono’s winforms allows you run existing winforms apps without single line change or even without recompiling (just replace related System.Windows.* assembies)

            • DacoTaco@lemmy.world
              link
              fedilink
              arrow-up
              1
              ·
              edit-2
              2 days ago

              Avalon is actually xaml and cross platform. Personally id rather have a razor format of gui code, but xaml is a good second. Its basically what maui was suppose to be

    • teolan@lemmy.world
      link
      fedilink
      arrow-up
      6
      arrow-down
      24
      ·
      2 days ago

      GTK is not accessible anywhere other than Linux and is therefore not a serious option outside of Linux.