3
neeno
4y

What should I use to build cross-platform desktop programs?

I'm thinking of learning Java and using JavaFX. I'm staying away from swing since it's a bit old and I've seen people say it's outdated for today's standards.

Flutter desktop would be cool but there's nothing stable for that stuff yet. I've also looked a bit into Haxe but I'm not sure if it's any good.

What's your opinion?

Comments
  • 7
    Also if someone suggests electron I'm cutting your throat
  • 1
  • 2
    Used javafx for one project and it worked great
  • 2
    @ItsaMeTuni err... "electron"
  • 0
    Kudos
  • 1
    @ItsaMeTuni @C0D4 what if we could use the platforms native browser engines like MS/EDGEHTML on windows, Cocoa on OSX or gtk webview on Linux? Oh wait there is: https://github.com/zserge/webview

    It's still web tech and I don't really like doing web stuff for desktop apps but with a bit of effort this could work.

    Maybe your favorite language has bindings for it.
  • 1
    @heyheni OooOoOo Nice. I remember taking a look at vlang once but I didn't remember it had a GUI library. Neat, thanks.
  • 0
    @amatrelan I thought of c++ and qt but I don't have that much experience in c++. I'd use it if it were a personal project but it's for a client so I need something that won't be a pain in the butt and can yield good results in a short period of time...
  • 0
    @fuckwit what would be the advantage of that?
  • 0
    JavaFx with web front end
  • 1
    You don't have to go with C++ if you want to use QT: https://wiki.qt.io/Language_Binding...
  • 1
    @Wack Oooh very nice. I'll take a look at it. Thanks!
  • 0
    @phpisthebadz what do you mean? JavaFX is a frontend library and why would I use web if I want a desktop app?
  • 0
    @ItsaMeTuni hello the core of the app is JavaFx but then the whole thing you see is JavaScript and html CSS
  • 0
    @phpisthebadz you mean embedding JavaScript logic into the fxml? I know that's possible but it doesn't sound like a great idea...
  • 1
    @ItsaMeTuni it works very well to use web stuff like Google maps API in your application. It's not PHP style
  • 1
    @phpisthebadz oh I get what you mean. Yeah in that case it's very useful. I thought you meant putting all ui logic (like open a panel when clicking a button) in the fxml instead of the controller.
  • 0
    Make a server, write frontend in html, css, js, react, vue whatever you like pack your custom browser with it and open your website every time you open application.
  • 0
    @-pthread didn't he say no electron?
  • 1
    @Wack it isn't you are packaging whole browser seperately and yes it was a joke
  • 1
    @ItsaMeTuni well obviously a familiar frontend developmental experience with html css and Javascript. But with the backend in your favorite native language.

    Also this library is a binding to the platform native browser lib so you don't ship the whole of electron, chromium and node with your application.

    Communication between Javascript and your native code (like rust or c)ay be a bit tedious though

    In the end you will have a way smaller binary that runs on all platforms and may also be way faster (heavily depends on what you do). Also with the language being c or rust you will have much more control of the underlying system.
  • 0
    @fuckwit ooh, I kinda like that... It's still web stuff on desktop apps so it feels kinda wrong. I'll look into it though, thanks!
Add Comment