3 ms·
> Every website on the Internet is doing representational state transfer. REST describes the interaction of browsers with websites. It's not meant to describe A
by throw_m239339 6y ago
> Every website on the Internet is doing representational state transfer. REST describes the interaction of browsers with websites. It's not meant to describe APIs for use by machines.
We're talking API here, obviously, AKA 2 web apps communicating with each other, through basic HTTP clients. A browser is anything but a basic HTTP client. There is no user clicking on links in a contextual fashion here. So the point you are trying to argue doesn't even matter.
Your comment is ironically the very reason why REST as an idea is irrelevant to API developers and why trying to force a REST paradigm onto API is a bad idea. Very little HTTP clients used by API are sophisticated and intelligent enough to behave like an internet user browsing hyperlinks.
- dreamcompiler 6y ago> Very little HTTP clients used by API are sophisticated and intelligent enough to behave like an internet user browsing hyperlinks. But they easily could be and should be. Obviously if only HTML is getting transferred, that's a difficult representation for a machine-based API to reason about. But XML or JSON is easy to teach a client to reason about. This is kinda the whole point of the Semantic Web and just about everybody missed it. So now everybody is finally actually doing Semantic Web [ish] stuff; they just call it GraphQL.
- mathw 6y agoActually no that's incredibly hard, because you have to specify somehow every possible relationship within your domain and write an engine which can use them appropriately.