I want to make a app with Go - /g/ (#105688680) [Archived: 796 hours ago]

Anonymous
6/24/2025, 12:30:11 PM No.105688680
1737319775327
1737319775327
md5: bbce0029a185ed03f8ec1d19f3007d49🔍
But i dont know how to make the UI nice, is there any way i could quickly learn how to make some decent ass uis?

No, LLM's dont help cause they give garbage code that i dont know how to extend

My JS Knowledge goes as far as knowing how to get an element by it's id and modify the content
Replies: >>105689236 >>105693307 >>105694886
Anonymous
6/24/2025, 1:02:40 PM No.105688866
bumpastic
Anonymous
6/24/2025, 1:26:11 PM No.105689014
https://fyne.io/
Replies: >>105689132
Anonymous
6/24/2025, 1:49:17 PM No.105689132
>>105689014
i looked into it and it's missing some features for handling offline stuff like drag and drop files, also arent the binaries super big and slow?
Anonymous
6/24/2025, 2:06:15 PM No.105689236
>>105688680 (OP)
The most popular options are: Fyne, Wails, and Gio.

Go was designed with server-side programming, distributed systems, and command-line tools in mind. Its strengths lie in concurrency, networking, and performance for these domains. GUI development was not a core design goal.
Replies: >>105691598
Anonymous
6/24/2025, 2:11:59 PM No.105689287
I would unironically suggest raylib-go (raygui). It's fun.
Replies: >>105691598
Anonymous
6/24/2025, 6:37:03 PM No.105691598
>>105689287
>>105689236
i meant a webapp in the browser, not necessarily a bloated bastardization of a embedded browser
Replies: >>105691893 >>105692883
Anonymous
6/24/2025, 7:11:52 PM No.105691893
>>105691598
Use template or a-h templ theirs only static HTML maybe htmx
Replies: >>105691984
Anonymous
6/24/2025, 7:21:09 PM No.105691984
>>105691893
but for example if i want to send some data non stop to the UI to display a graph.. i cant do that with html right? i dont know if i can just open a socket with javascript
Replies: >>105692971 >>105693083 >>105693104
Anonymous
6/24/2025, 9:13:29 PM No.105692883
>>105691598
did this retarded zoomer just call native UI an "embedded browser" ?
Jesus, I knew Golang was for morons but I didn't think it's this bad...
Replies: >>105692969 >>105693032
Anonymous
6/24/2025, 9:22:34 PM No.105692969
>>105692883
>fyne, wails, gio
>native ui
lol
Anonymous
6/24/2025, 9:22:43 PM No.105692971
>>105691984
Yes you can!
If the graph is a SVG, all the server needs to do is to send the last <path> and htmx will handle the append.
Or you can use chart.js and add some javascript to it.
There is all kinds of stuff you can do with modern HTML, and if you sprinkle some JS, you get joy.
Replies: >>105692993
Anonymous
6/24/2025, 9:24:53 PM No.105692993
>>105692971
can you give me an example?

let's say i have a canvas element, and my server wants to send json data that i will interpret and plot a graph by hand drawing pixel by pixel on the canvas

How do i go about it? i dont want to make fetch() every second, even tho that's the only solution i can come up with
Replies: >>105693160
Anonymous
6/24/2025, 9:28:36 PM No.105693032
>>105692883
No, he didn't. I think you just struggle with reading comprehension.
Anonymous
6/24/2025, 9:35:19 PM No.105693083
>>105691984
>send some data non stop to the UI
I'd probably use htmx with the WebSocket extension and set up a websocket server in Go (gorilla/websocket is still the best library go has I think), or use htmx with the Server Sent Event (SSE) extension with whatever http setup you'd like.
Replies: >>105694643
Anonymous
6/24/2025, 9:37:35 PM No.105693104
>>105691984
Theirs many ways, googling or asking chatgpt might aid u
Anonymous
6/24/2025, 9:44:01 PM No.105693160
>>105692993
You would use a websocket for that.
Also, doing fetch() every second might seen "dumb" but it's the easiest way to do it. And it scales surprisingly well.
t. saas developer that did that with 10k+ users
Replies: >>105693205
Anonymous
6/24/2025, 9:50:11 PM No.105693205
>>105693160
how quick can i realistically fetch if my server is reading files and sending them as json (few kb at most)
Replies: >>105693275 >>105693336
Anonymous
6/24/2025, 9:56:39 PM No.105693275
>>105693205
Depends on ur Internet up to gigabytes easily
Anonymous
6/24/2025, 10:00:23 PM No.105693307
>>105688680 (OP)
What does JavaScript have to do with making the UI look nice, retard?
Have you even learned HTML & CSS before you started vibe coding?
After you do look into CSS frameworks.
Anonymous
6/24/2025, 10:04:32 PM No.105693336
>>105693205
Depends on the nature of the data.
In my case the data did not change very often, so I added a cache and then fetched every second.
Also consider what your user want, on my case and the case of every single place I worked on, a chart is used to indicate a trend, and to indicate a trend you can use a lot of stuff that is not a chart.
For example, the user doesn't care about the current number of stuff, but it care about how much new stuff there is, or other info.
It's not fancy, but it communicates a real information, instead of chart that is hard to analyze in a blink of an eye.
Anonymous
6/25/2025, 12:31:45 AM No.105694643
>>105693083
coder/websocket is usually what I use now
Anonymous
6/25/2025, 12:59:20 AM No.105694886
>>105688680 (OP)
>go
go back to india