Comments (1)
Juan Martinez, Salvador @JuanS 10:45 AM
Oh nice, thats a lot of interesting material to read, I haven't read it all yet, but i will, in the meantime, related to some of the topics you mentioned above, my personal take on how to use hypermedia:
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.
👍🏻 1
Reinhardt, Holger @reinhardth 10:51 AM
true ... and you went way deeper the rabbit hole than I would (which is a weird way of making a compliment) 😉
to me they are two ways of coupling I have observed .. there is syntactical coupling ... which usually involves interfaces directly or indirectly generated from an implementation .. you change the implementation, you change the interface
this was the original sinn of WebServices .. it was essentially a functional interface across the network ... you changed one side .. you had to change everyone relying on it too ... which did not scale for even mildly complex environments
then there is a more hidden kind of coupling ... I call it semantic coupling ... it is the embedding of knowledge about the API/interface in the client
a particuar way how URL's are constructed
hardcoding server IP's
some stuff you know becaue you have access to the server code etc
this coupling is non-obvious but it falls on your feet the moment you change something fundamental about the server .. maybe you move the server to a difference hostname or ip
or you change the urls
or you change a particular behavior (do this and then do this) which the client had been relying on
and usually that hits you when you are already operating at some scale ... and then you are in a place of real pain
you either not change it (and can not evolve) or you change it and break a lot of clients
most REST-light or pragmatic REST API's fall into that category
this is where hypermedia comes in .. sure, in the ideal world you can do everything you described above (de-duplication business logic etc).
but I would already be happy if it were simply preserving our ability to evolve without breaking existing clients which are owned and managed by different teams or differet orgs
the need for coordination is the enemy of speed
from api-style-guide.
Related Issues (20)
- Add link to swagger blog entry to api style guide
- Obtain permission from James Higginbotham for summarizing design process HOT 1
- Reemphasize design guidance on API first and Code second HOT 1
- Add chapter on Webhooks HOT 1
- Add chapter on client-controlled resource representation
- Sketch out hypermedia interaction pattern (incl caching and service document) HOT 5
- Describe the API to micro service mapping HOT 2
- Add Fielding Property Maps
- Add discussion of idempotency
- Add best practices from QT API guide
- Add hiding of internal codes
- Explicitly ban snake-syntax
- Define API Discovery Format HOT 7
- Re-evaluate (in 11/2017) error response formats
- Add batch API (design) guidance
- Clarify use of GraphQL for mobile app interfaces only when using React/Redux
- add section on the need for api evangelism
- Clarifying use of schema for documentation, not code generation
- Drop the requirement of the API review? HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from api-style-guide.