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 :)

  • d3m0nr4v3r
    link
    fedilink
    arrow-up
    3
    ·
    edit-2
    7 hours ago

    I am on my way to bed so I can only give a brief and simplistic overview:

    In principle a basic web application runs in the browser, so it is executed locally on your device. The scripting language the browser understands is JavaScript. With JS and JS libraries you can do pretty much anything you would expect and probably more. In general, you use JS to do whatever you need to do to your data and then use it to manipulate the HTML document in order to display your data. You can also have a Backend, running somewhere else (on a server) and using whatever language you like as long as it can then communicate with you frontend JS application using the appropriate web protocols. You dont necessarily need a Backend, a lot of stuff can be done using JS that is executed on your device. This depends on the use case (e.g. for fetching data from a database on your server you could write a Java/Python/whatever app that runs on your server, fetches the data and sends it to the client where it is received, processed and displayed via a JS app).

    Now to write a JS app, most people nowadays use some sort of framework (react, vue, nextjs etc). This is quite a different process than writing a vanilla JS app, might take some getting used to depending on where you are coming from but is worth it in the end. If you want an easy start I would recommend vue3+pinia store.

    There are also GUI libraries as well as styling/CSS libraries which can be combined with this approach (or not). Take a look at NaiveUI and Tailwind as examples.

    Thats all I can offer, best of luck and good night!