-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sharpen argument for hypermedia and add list of client libs/projects #25
Comments
Juan Martinez, Salvador @JuanS 10:45 AM Without hypermedia, clients had to make requests, read the values of the response (state) and according to the values, then implement business logic to decide what to do next. With Hypermedia, if you offer state through links, with possible actions (like a finite-state-machine) then on the clients, one can just perform coding around the presence or absence of links. So basically the target is to remove all the domain/business knowledge from the client side, and replace it with "protocol" knowledge through links. This way you remove duplicated implemented logic, effectively reducing the amount of changes that would have been breaking ones, achieve loose coupling, etc. But also, at the same time, need to carefully design hypermedia, because, the risks of making everything accessible through links can lead to a really chatty API, which at the end can do more harm than good. This is one of the reasons I also like consumer-driven-contracts approach, it makes those 2 concerns easier to address. Reinhardt, Holger @reinhardth 10:51 AM |
From an email convo:
Die _link Elemente erlaube eine starke semantische Entkopplung des Clients vom Backend.
Das Prinzip ist relativ einfach .. anstelle das Wissen über die konkrete URL Struktur der API in den Client hart zu verdrahten, kennt der Client nur die Relationship Attribute Values. Um eine bestimmte Operation mit einem bestimmten Relationship Attribute Value durchzuführen, findet der Client das matching _link Element und benutzt die darin embedded URL ‘as-is’ (mit der Exception fuer den Backend Server bei Injektion des ‘Forwarded’ Header durch den vorgeschalteten APi Management Proxy)
Das erlaubt eine spätere Änderung der URL Struktur der API, ohne dass der Clients verändert werden muss. Das bedingt natürlich auch, dass Ihr die _link Elemente nicht einfach ignoriert, sondern sie entsprechend der Spezifikation nutzt. Eine Google Search zeigt eine ziemlich grosse Anzahl von client libs, die ihr entsprechend fuer Eure Anwendung evaluieren könnt.
The text was updated successfully, but these errors were encountered: