|
|
|
|
|
by osigurdson
346 days ago
|
|
It isn't clear that HATEOS would be better. For instance: >>Clients shouldn’t assume or hardcode paths like /users/123/posts Is it really net better to return something like the following just so you can change the url structure. "_links": {
"posts": { "href": "/users/123/posts" },
} I mean, so what? We've create some indirection so that the url can change (e.g. "/u/123/posts"). |
|
If suddenly a bug is found that lets people iterate through users that aren't them, you can encrypt the url, but nothing else changes.
The bane of the life of backend developers is frontend developers that do dumb "URL construction" which assumes that the URL format never changes.
It's brittle and will break some time in the future.