2 ms·
The latter half of your comment seems to assume that the primary reason for hateoas would be performance. I'm sure many people would make that argument, and I d
by danielvaughn 3y ago
The latter half of your comment seems to assume that the primary reason for hateoas would be performance. I'm sure many people would make that argument, and I do think it makes sense even today, but that's not really why I'm into it.
I personally find consuming JSON APIs cumbersome and prone to errors. It seemed like a great idea when we first started doing it, but these days I'm keen to explore other options. I'm under no illusion that HTMX doesn't have it's own tradeoffs, but I like the return-to-tradition approach it's taking.
- relativeadv 3y agoI can definitely get on board with that idea. It is indeed cumbersome dealing with some JSON api that you may or may not have written. The amount of boilerplate you must write in react just to fetch the freaking thing and do some work an display a result is rough compared to the same thing in django-htmx. But we are talking mostly about developer-experience here and while that is great, it is a compromise compared to user experience. Getting a little delay for an ajax call on much many more interactions is a thing and its there. Maybe that makes sense for many but it should be noted just like deciding to write a react PWA instead of a fully native ios app is a tradeoff for developer experience (or a dozen other reasons) instead of user experience.
- wild_egg 3y ago> Getting a little delay for an ajax call on much many more interactions is a thing and its there. HTMX has a preload extension which has fully eliminated these delays in my experience. YMMV of course but so far both my UX and DX are dramatically improved over what the previous SPA offered
- threatofrain 3y ago> I personally find consuming JSON APIs cumbersome and prone to errors. Type synchronization is becoming a very popular story. Now I get IDE awareness of all my endpoints and whether I'm using them right.