42 points · by jeremylevy · 3y ago · 30 comments
Getting the linkrels back is great, but it is up to your frontend to interpret them and display them back. There is no "magic" there because only humans know what does cancel/change mean, not the computers
1. Paths are changed extremely rarely. Optimizing architecture for something that happens once a year is not a good idea. The cost of changing paths manually is pretty much always lower than the cost of HATEOAS.
2. You still want redirects from the old paths, because clients keep old paths in memory until refresh (which you don't control).
3. Typically when paths are changed, it also affects the entry point, so client still needs to be updated.
What conditions for a restful api does this come in handy?
In most implementations I have had the requests are as quick to figure out if anything has changed as it is to return the result.
The problem is not that a get changes the result, it is a post from some other client has changed it in the interim and you want the freshest data.
Id imagine it is most useful in serving static content that has large payloads, which most of my apis don’t serve.
Why are people so adamant that they absolutely must call non-REST APIs “REST”? Names are free, you don’t have to hijack the name of something else!
HATEOAS is for snake oil sellers and their religious followers, who want to feel superior.
> I should stress that the RMM, while a good way to think about what the elements of REST, is not a definition of levels of REST itself. Roy Fielding has made it clear that level 3 RMM is a pre-condition of REST.
It's good for marketing I guess? A while ago REST took on connotations of "simple" and "clean", mostly in comparison to SOAP. So people will probably think more highly of your API if you call it REST.
So, yeah, REST means whatever people use it for, that is 'HTTP services with JSON payload'. That's the actually valuable part of it anyway, the meaning that was documented after everybody started using it wrong is a synonym for the web, and we already have a name for it.
REST isn’t a standard, it’s an architectural style. And I’m not sure how you can say that the author chose not to document its meaning when the name “REST” originated with the author’s PhD dissertation.
What would you call it though? If the only thing we call REST is what's called a "level 3 REST" API in this article, then virtually nothing would be called REST.