this post was submitted on 12 Dec 2023
879 points (98.8% liked)

Programmer Humor

32410 readers
1 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] savvywolf@pawb.social 122 points 2 years ago (10 children)

A pile of HTML + JS is the only cross platform GUI toolkit that's practical to deploy.

I'm not really happy about it myself, but realistically there's not any other option than just bundling a website into a wrapper.

And to pre-empt any replies; your proposed solution must support Windows, Linux (X11 and Wayland), MacOS, iPhone, Android, Chromium and Firefox.

[–] hansl@lemmy.world 34 points 2 years ago (1 children)
[–] Molten_Moron@lemmings.world 39 points 2 years ago (1 children)

3 billion devices can't be wrong!

[–] hansl@lemmy.world 27 points 2 years ago

Real talk; if Java didn’t have their head up their own arses, it would have been the real solution. But Oracle does what Oracle does.

Do not anthropomorphize Larry Ellison.

[–] Carighan@lemmy.world 18 points 2 years ago

And to pre-empt any replies; your proposed solution must support Windows, Linux (X11 and Wayland), MacOS, iPhone, Android, Chromium and Firefox.

If you are a website, that's easy, you are actually making the correct choice with Electron insofar that you want a browser.

If you're doing an application not a webpage, then we're walking W+L+Mac+Phones, that's more tricky. I'm assuming for a second you want a usable UI (otherwise we'd be using Electron again :P ) so we're talking two applications at least, one for mobile, one for desktop + maybe iPads.

And then it's usually already too pricey to bother:

  • Web frontend devs are far cheaper than application developers.
  • Might as well just do a website, runs in everything. Only need to develop once.
  • Updating is immediate with a website, don't have to do any deployment/upgrade/downgrade plans.
[–] PixxlMan@lemmy.world 13 points 2 years ago* (last edited 2 years ago) (1 children)

I think Flutter and Avalonia both tick all those boxes.

[–] jbk@discuss.tchncs.de 3 points 2 years ago (1 children)

Does Avalonia support Wayland? Last time I checked it wasn't complete yet.

[–] PixxlMan@lemmy.world 5 points 2 years ago

Just checked, and unfortunately no, Wayland is still in preview.

[–] backhdlp@lemmy.blahaj.zone 8 points 2 years ago

If you count browser engines, don't forget Webkit.

[–] greenskye@lemm.ee 7 points 2 years ago (2 children)

Why is Firefox a 'platform'? I'm assuming chromium is for chromeOS devices, but I don't know of any device that just runs Firefox.

[–] Commiunism@lemmy.wtf 17 points 2 years ago

they probably meant web versions of the app that run both on chromium and gecko (firefox) browser engines

[–] savvywolf@pawb.social 5 points 2 years ago

As Communism said, yeah I was ment a web application. No need to spend dev time working on a different version of your app if you can just reuse the web version.

[–] jw13@beehaw.org 6 points 2 years ago (1 children)

Chromium and Firefox are web browsers, of course they only support HTML+JS. That’s what they were designed for.

[–] dan@upvote.au 10 points 2 years ago* (last edited 2 years ago) (1 children)

of course they only support HTML+JS.

WebAssembly is becoming more popular, which lets you run code written in languages other than JavaScript in a browser. It's not possible to do everything yet, so you still need some JS code and a bridge between the WASM and JS, but it's getting there. Emulators that run in the browser often use it.

[–] Knusper@feddit.de 4 points 2 years ago

I don't think, there's currently any plans to introduce a non-JS API for accessing the DOM. It would just take an insane amount of implementation work + documentation.

But frameworks can generate access code for you, so you don't actually need to write any JS yourself. Rust is quite far ahead in this regard, thanks to the wasm-bindgen library.

[–] myersguy@lemmy.simpl.website 6 points 2 years ago

Avalonia and Uno Platform if you are working with C#

[–] gens@programming.dev 3 points 2 years ago
[–] replicat@lemmy.world 1 points 2 years ago

JUCE is weirdly capable of non-audio related UIs and runs on all these platforms.