I have being wanting to experiment to recreate the game battleship as a website, I have already made some proyects with JSPs (Jakarta).

At first i thought of using htmx and go because i like the idea of building the interface in the backend, the thing is i’m a little stuck is server-client comunication, for example when the server notifies the client that it is their turn. I saw the concepts of server side events and i don’t know if there is another way that i haven’t thought.

Thank you for reading this

  • NewDark [he/him]@hexbear.net
    link
    fedilink
    English
    arrow-up
    1
    ·
    11 months ago

    I would attempt to avoid frameworks as much as possible early on. They abstract away what you’re actually doing into simpler ‘magic’ shorthand.

    As for your specific question, if it’s an http api you’re planning to use, fetch works well. I can’t speak to websockets.