Hacker News new | ask | show | jobs
by yawaramin 559 days ago
Yes, there is a 'unified' way of doing things. In a single backend stack at least. And that way is...make a component library. Using your backend stack. It doesn't have to be HTML-in-PHP era. There are embedded HTML generation libraries for every mainstream language nowadays. You can just use whatever CSS you like and write any components you need. Eg I used Bulma, copy-pasted their HTML examples, and just wrapped them up as components.

If you are bemoaning the lack of prefab component libraries, well that's how backend development goes. Everybody and their dog has a backend stack and HTML generation system they like, and then eventually maybe some component libraries will emerge for the popular ones. That's the tradeoff for the freedom htmx gives you to work in any backend. You write some components yourself. Not the end of the world.

1 comments

Your first paragraph highlights the issue perfectly. You mentioned Bulma—how many developers have even heard of it, let alone use it regularly? It’s even worse when one app uses Bulma because someone wanted to try it out, another uses Tailwind because it came along a year later, and then there’s a 10-year-old PHP project still stuck on Bootstrap 3.

With something like MUI, everything is where I expect it to be. That consistency lets me focus on learning the business logic, addressing critical bugs, and thus making meaningful contributions.

Sure, you use MUI, someone else uses Ant Design, yet another person uses Tailwind UI, where does it end?! Sheer insanity. So of course, this is a problem only when it happens in the server-driven approach, but not in the client-driven approach :shrug:
Weeeeell debating whether to use one of those 3 UI component libraries you mentioned is IMO pointless, you are gonna be fine with any of them. I was thinking more along the lines of Django vs Rails vs ASP.NET and someone suddenly coming in and yelling "LET'S DO CLOJURE".
In that case someone is gonna come in and yell 'LET'S DO ELM WITH ELM-UI'? No?
True :D