|
|
|
|
|
by beders
2899 days ago
|
|
> Traversing a few pages when clicking around in your browser makes sense, doing so from a programmatic client when you could literally just store the correct endpoint and perform your call directly is nonsense: That requires implicit knowledge of the 'correct' endpoint.
If that endpoint changes or anything in between, you'll have to start versioning your API, which basically tells all existing clients: Sorry, you got to update. Allowing clients to discover resources is a future-proof way to keep your client libraries compatible and evolve your API without versioning.
It is more work for the client and it is not always suitable.
But if you intend to design something future-proof (and we are talking about 10+ years), then REST has already proven to be very successful (your latest browser can still browse a web page from 15 years ago...) |
|
In exactly the same way that the "RESTful" version requires implicit knowledge of the content types: that knowledge it not implicit at all, it is specifically and explicitly embedded in the system.
The word you're looking for is static.
> Allowing clients to discover resources is a future-proof way to keep your client libraries compatible and evolve your API without versioning.
That is completely untrue.
> But if you intend to design something future-proof (and we are talking about 10+ years), then REST has already proven to be very successful (your latest browser can still browse a web page from 15 years ago…)
Because it has a somewhat intelligent and flexible human driving it and able to adapt in changes to the visited targets. Not so with a programmatic client.