Sorry for the somewhat noob question, but how do you pick a library for making a GUI for your apps? My background is in physics, so most of my programming is perfectly find with a CLI that outputs a graph as a ps file or some csv. I am looking to learn about making some neat little GUIs. I was thinking it would be a good idea to try and build my GUI out of the browser so that my app can be as portable as possible, but does this mean it has to be in Javascript or can the backend be done in anything else?

I am not really sure what I am asking, but wanted to get a feel for how people approach front ends.

Thanks :)

2 points

Honestly reading through your comments, I couldnt reccomend Godot more - I’ll just toss some bullet points below.

  • GUI tools with lots of tutorials
  • Basic 2D and 3D rigid body simulations
  • Very extendable if you know C++ or rust
  • In house python like compiled language deeply engrained into the engine, which is surprisingly fast
  • Cross compileable to most devices, but honestly the engine itself runs on all devices I use so something like syncthing makes dev incredibly portable
  • Ecosystem is only growing by the day, most tutorials are game dev related reasonably but still cover most topics one could need
  • Basic GPU compute support if that’s your thing

Theres some things its not yet perfect at, like the web export could be better - and in depth things like minimising copies between CPU and GPU might not be as fine grained as hardcore devs would like, but if youre coming from mathematics and python it’ll fit like a glove.

Just for an anecdote I wrote a basic particle simulation in gdscript that was HORRENDOUS for performance, 200 particles all calculated the per frame force of attraction to every other particle then summed it; whole thing ran at 80 fps even on my phone

permalink
report
reply
1 point

I’ve never heard of it, thanks!

permalink
report
parent
reply
1 point
*

For the web you’re 100% going to need JavaScript. More languages are targeting web assembly now. But there’s always some JS.

We use c# blazor at work and it’s 90% c# on the frontend. It’s not ideal with general purpose websites as the upfront load can be huge.

You’re probably better picking something like react which has as a huge ecosystem and is widely used.

permalink
report
reply
6 points

The UI platform with the largest install base of all is the web. Nearly all computer users can use your GUI if you develop it for the web, it’s almost the definition of the universal open standard for GUIs.

Browsers can only execute JavaScript or WebAssembly, so you need to write it in JavaScript or in something that compiles to these things, e.g. TypeScript (but there are also ways to compile other languages to JS or WASM).

permalink
report
reply
1 point

You could check out Dash/Plotly if you’re familiar with python and planning on visualizing data

permalink
report
reply
6 points
*

I (probably unreasonably) despise using web front-ends for desktop applications.

GTK is OK. QT is very feature rich, but that adds complexity. Both can be cross-compiled to most systems and shipped with all the required libraries pretty easily.

I haven’t used it in a long while, but I remember liking Java Swing for some reason. Java should be “write once, run anywhere.” But, cross-compiling isn’t usually too hard, so not sure how much that matters. There’s more modern frameworks for JVM-based languages now, but I haven’t tried them.

I’ve noticed Gradio is popular in the ML community (web-tech based, and mostly used for quick demos/prototypes).

Edit: For web applications, I prefer Angular’s more traditional architecture over React’s hook architecture.

permalink
report
reply

Programming

!programming@programming.dev

Create post

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person’s post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you’re posting long videos try to add in some form of tldr for those who don’t want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



Community stats

  • 3.8K

    Monthly active users

  • 799

    Posts

  • 6.5K

    Comments