Hacker News new | ask | show | jobs
by tambourine_man 1115 days ago
24 years of web development here. Large code bases and I still love jQuery. Whenever I can avoid React, I do.

htmx is the first JS thing to tickle my curiosity in a long time. Vue seemed fun at first, but it got more complex than needed, IMO.

1 comments

> By removing these arbitrary constraints htmx completes HTML as a hypertext

I agree, this is interesting. I even agree, htmx is probably a polyfill waiting for the browser standards to catch up.

That said, trying to make a markup language smart is a losing battle in the long-term. It makes simple things like `if` and `while` difficult. Markup also really struggles with time / interactivity.

e.g. What should be displayed when a form is invalid? https://htmx.org/docs/#validation-example is just not ergonomic even for a simple case, let alone complex validations that interact with other fields, are async, etc.

I get a allure of wanting "only a markup language", however, it just isn't enough to be competitive for 95% of web development these days. In a different response you say "if you're building the next Gmail, fine use React, but you don't need React for picking between 3 colors to order a shirt". This is true, but it is fundamentally lacking the realization that no company wants to end their feature set at 3 colors for a shirt. They "want" to build a foundation quickly, but then enhance it to be able to custom create the shirt for exactly your body sizes and allow interactive movement of the "logo" or "graphic" anywhere on the shirt. They want the validation to ensure the shirt can be printed, and they want to ensure their logistics network is dynamically updating the order history for live tracking of the package.

To get there, the best thing to do is to use React (or similar) even when it is "just 3 colors".

This is the premature optimization our industry suffers from.

If/when you get a few million users, then you worry about scaling your backend with microservices, crazy DBs, serverless, whatever. Until then (vast majority of business), LAMP is fine.

If/when you need 20 checkboxes/drop-downs (again, there are very few situations where this is reasonable to the user, the mental load is non-trivial, consider splitting the view and adding a “next step” or something) than you consider a framework devised to render the whole of Facebook, a site with way more views and features than the most sites would ever dream of.