3 ms·
> Ideally the server simply responds to the erroneous state with hypermedia, using hypermedia as the engine of application state. ;) I'm really not sure what t
by troutwine 5y ago
> Ideally the server simply responds to the erroneous state with hypermedia, using hypermedia as the engine of application state. ;)
I'm really not sure what this means. In the units case how does the server distinguish that the "2" a client sends it is not in millidollars or what not and respond back, without prior and ongoing coordination? Or if the server expects to do a two-phase commit for some POST how would that be communicated to the client without out-of-band communication?
Maybe I'm just misunderstanding what "nothing outside the API provided by hypermedia" is supposed to actually encompass.
- ratww 5y agoIn the case of HTML pages, there is ongoing coordination. The server expects the client to have accessed something before that said "please input amount in dollars" or maybe "please input amount in cents". But if there is some new hypermedia format that supports currencies, it can be used instead of a string. What makes it proper hypermedia is that it isn't tightly-coupled with a specific API, it is as "universal" as HTML. "Nothing outside the API provided by hypermedia" means there is no tightly-coupling between server and client other than the protocol and hypermedia format. No schema, no out-of-band-information, no iPhone app... It's just like the browser works: your computer has no special anything for accessing Hacker News, only a fully decoupled client that understands HTTP(S)/HTML (the browser).