Hacker News new | ask | show | jobs
by dhamidi 14 days ago
I understand the sentiment. Rails was my introduction to hypermedia and it was convenient and easy, so experiencing friction when building with Go/HTMX came as a surprise.

After a few attempts I learned that abstractions are important :D

Without a component builder and reversible router is indeed pretty painful (and Rails just ships with these things so you didn't have to worry about it).

The biggest benefit for me personally is that computation and data live in one place, which carries you very far. Also, machines like hypermedia: LLMs are great at using and testing hypermedia apps because they are self-contained and the cycle time is lower because you don't need to wait for JS.

And yes, no easy off the shelf component library makes starting harder.

1 comments

I’m struggling myself a bit with the components and routers in HTMX/go. Can you recommend any source code or reading on that topic?
There's vuego: https://github.com/titpetric/vuego

And my own version (I learned of vuego only after): https://htmlc.sh

Not a fan of html/template and tmpl myself, because HTML should be treated as tree and not as strings, but everybody has different preferences.

For routing I now use my own library in all projects: https://github.com/dhamidi/dispatch

It's relatively easy to generate your own nowadays, I mostly go through the Ruby on Rails guides and mix and match the pieces I want for go and turn them into libraries :)