3 ms·
Can you expand? I don't think I understand.
by treis 4y ago
Can you expand? I don't think I understand.
- masklinn 4y agoIn Fielding’s REST, the exchange is defined in terms of the document contents (the content types). These are what define the interaction both ways, both in terms of data and in terms of navigating the set and interacting with it (think links and forms). The client necessarily has to know about that. That’s where the coupling happens. Where the coupling doesn’t happen is in things like resource names and locations, as far as Fielding’s thesis was concerned there’s only one location the client needs to know and it’s the root location, everything else can be obtained by navigating the service.
- treis 4y ago>Where the coupling doesn’t happen is in things like resource names and locations, as far as Fielding’s thesis was concerned there’s only one location the client needs to know and it’s the root location, everything else can be obtained by navigating the service Yeah, any my point is that relies on the client (i.e. a human) being able to understand what the different links mean. A programmatic client can't do that without in someway hard coding the structure of the API.
- bmn__ 4y ago> A programmatic client can't do that without in someway hard coding the structure of the API. That's false. Here is the HTML again, augmented with a link relation which by its nature is perfectly understandable to a program. <a href="/accounts/12345/deposits" rel="https://schema.org/DepositAccount">deposits</a> Anyone can coin a link relation on the Web, as long as its identifier is a URI. Tokens are reserved and need to be registered at IANA: https://www.iana.org/assignments/link-relations https://www.iana.org/assignments/link-relations
- treis 4y agoIt's understandable if you write the code for the program to understand. If it changes from deposits to credits tomorrow then your program breaks. Hence it's coupled to the server.
- bmn__ 4y agoThere is always coupling. The question is whether a certain architectural design is coupled loosely or tightly. If you read Fielding's blog post referenced in TFA, you can see he is an advocate of loose coupling. I have demonstrated this design in my post above.