this post was submitted on 03 Dec 2025
7 points (100.0% liked)

No Stupid Questions (Developer Edition)

1091 readers
9 users here now

This is a place where you can ask any programming / topic related to the instance questions you want!

For a more general version of this concept check out !nostupidquestions@lemmy.world

Icon base by Lorc under CC BY 3.0 with modifications to add a gradient

founded 2 years ago
MODERATORS
 

Hello everyone,

I'm having a hard time formulating the question and it can be a bit confuse to me too at times, but here it is. For the context, so that you can have an idea of the shenanigans I'm used to program, I'm a PhD in compilation and did stuff related to security and performance. I have essentially worked in projects that are relatively low-level and system-oriented (compared to webdev, desktop application dev etc).

I usually code CLI tools, usually system-oriented libraries, and stuff like that. And sometimes I would like to hack simple yet cool frontends, typically a webapp to either visualize my processes/data or to manipulate the inputs or whatever. I'm not looking for a big solid webapp. What I would like to do is to write frontends that would be the equivalent of quick ugly glue Perl scripts for interprocess communication.

Typically, I could have a program I wrote doing stuff, I may add a little HTTP server feature to it as an entrypoint to its internal and then have a cute webapp to connect to it to visualize what is going on, idk.

As I said, I'm not trying to transform my applications into actual servers or microservices in order to build an entire web application on top. It is more like using a proper user interface (typically web) as a better pretty-printing/logging system/whatever.

I guess there must be frameworks, tools, architectures or whatever to suite my needs, but since I have never really done frontend projects, I'm in the dark right now.

If someone has any recommandation, it would be very nice. Thank you so much in advance!

you are viewing a single comment's thread
view the rest of the comments
[–] Kissaki@programming.dev 3 points 3 weeks ago (1 children)

I wonder if we can do even simpler today (with a framework that handles the dynamic aspects of the application, not with barebones JS).

You want a stateful application or a template-model-rendering system?

If not, the webbrowsers support fetch API and you can create HTML from that, or set values on the DOM elements.

Personally, I'm not too familiar with JS frontends in particular. I could name some random names, but don't have experience or particular opinions. What I've read, and intuitively agree with, is that many of the most popular frameworks introduce additional complexities and their own state system when the browser nowadays would cover those natively. Newer frameworks that make use of the current browser tech may be better. But I can't name specific names.

I myself, in terms of web frontend frameworks, work with Blazor (dotnet). Upside being direct C#/dotnet integration and development and wide options, downside being the tech complexity of framework between browser and backend and a mixing of HTML and Razor concerns.

If it were me, I would probably create an .html file, add a <script> block, and use the fetch API to fetch the data from the backend and then render/display it via JS/HTML. It's always possible to size up and add complexity later.

[–] Camille@lemmy.ml 3 points 3 weeks ago (1 children)

Oh damn, thank you! I didn't know that and it will most probably serve as a starting block to create the exact thing I need. Everything is still confuse is my head, I'm still not sure what I really want, but you clearly helped me. Thank you so much.

If it were me, I would probably create an .html file, add a block, and use the fetch API to fetch the data from the backend and then render/display it via JS/HTML. It’s always possible to size up and add complexity later.

It is totally the kind of things I'd want to do, just an HTML file, some scripts to populate it and call it a day.

[–] Kissaki@programming.dev 2 points 3 weeks ago

Great, I'm glad it helps. Good luck! :)