$0 → $100M ARR: just use Go.
$100M+ ARR: you’ve got the cash & traffic to sprinkle in Rust where it matters.
Most companies will never even hit the Rust problem.
@evpetrovich No we use the pocketbase json API. Even though with Go we don’t have to. I don’t think HTMX is anti JSON API, it should just be handled on the server and the response to the client is HTML. Majority of state just handled on server vs client and server.
4 months into using HTMX for a real project and why I chose it vs other more familiar options like Vue/React AND the potential problems🧵. Stack: Go, Templ, HTMX, Pocketbase (SQLite)
without having to context-switch so hard. I can still write Javascript for the client-side parts of my app that would benefit from it and I do. All thats great but here are some of the potential PROBLEMS I could see running into if a dev is not intentional.
ALSO if you grew up in SPA land and jump to HTMX you could definitely make your code more complex then you have to if you don't understand some common MPA patterns like MVC, PRG, etc. The simplicity comes with not managing EVERYTHING with Javascript.
You will create a monolith. If your not intentional you will create one giant application. I actually don't think this is a bad thing in the beginning. But javascript land kind of forces you not to do this or at least heavily pushes you in the opposite direction.
I used NEXT once and didn't like it. Then I stumbled across HTMX. This changed everything. I can use the server-side language I love to create a Hypermedia API that can easily be deployed to any deployment medium u want from VPS to K8S as you scale
BUT because I was accustomed to creating complex infrastructure, I did. It is looked down upon to create infrastructure that fits your current needs. Everyone wants to start with ECS/EKS GKS or the other more abstracted SaaS options.
Anytime I had to build something for the web I would reach back for React or Vue (Vue preferably). Create a JSON API, lean into serverless functions and all the cloud native or SaaS options I could. (this isn't a 'bad' thing)
When I started having to manage cloud environments for my teams I fell in love with Golang and have been writing it ever since. When I made the switch initially I had to unlearn a lot of JS stuff and focused intentionally on just building terminal apps.
The first apps I made were SPA apps. I didn't know of another way. The complexity of managing state on both the client and server for way more then you have to AND having a JSON API for everything just felt normal because user experience is king. HTMX bridges that gap for MPA.