4 ms·
well, its just wikipedia, but its actually well written page on the concept, in my opinion http://en.wikipedia.org/wiki/HATEOAS http://en.wikipedia.org/wiki/HA
by metaphorm 12y ago
well, its just wikipedia, but its actually well written page on the concept, in my opinion
http://en.wikipedia.org/wiki/HATEOAS http://en.wikipedia.org/wiki/HATEOAS
key concept:
> "The principle is that a client interacts with a network application entirely through hypermedia provided dynamically by application servers. A REST client needs no prior knowledge about how to interact with any particular application or server beyond a generic understanding of hypermedia. By contrast, in a service-oriented architecture (SOA), clients and servers interact through a fixed interface shared through documentation or an interface description language (IDL)."
a truly RESTful service that follows the HATEOAS pattern doesn't require documentation to be hosted separately. it will supply all the information necessary directly through the RESTful service.
- k__ 12y agoHm okay. The key concept I understood but I don't get how clients and servers have to be, to just "get" each other in the way HATEOAS implies.
- icebraining 12y agoThink web browsers. REST was modeled after the existing web.
- hawleyal 12y agoREST was in the original HTTP spec. Most people were just doing it wrong the entire time until recently when it became trendy to go back to the root REST ideals. And by most people I mean everyone involved in SOAP and RPC and other nonsense like that.
- dragonwriter 12y ago> REST was in the original HTTP spec. No, it wasn't. Fielding's dissertation, in which REST was defined, argues that a certain set of principles were an underlying foundation of the structure of the WWW architecture in its original construction, proposes REST as a formalization of and update to those principles, and proposes further that updates to the WWW architecture should be reviewed for compliance to the REST architecture. [1] So REST is a further elaboration of a set of principles inferred from the original HTTP spec, not something present as such in the original HTTP spec. [1] http://www.ics.uci.edu/~fielding/pubs/dissertation/web_arch_domain.htm http://www.ics.uci.edu/~fielding/pubs/dissertation/web_arch_...
- MichaelGG 12y agoWeb browsers have a human intelligence driving the interactions. API clients don't. Hence the huge gap, and as far as I can see, the rather pointlessness of HATEOAS. In fact, I'm still totally lost as to the usefulness of REST at all, except as a generic term to mean RPC over HTTP except not as clunky as SOAP. Which isn't what REST is. I've yet to see or use an API that was easier to deal with because it was REST.
- icebraining 12y agoThe Googlebot drives REST APIs just fine, and would be impossible to write using an RPC model. I've yet to see or use an API that was easier to deal with because it was REST. Of course not, because people actually want to use RPC, and so shoehorn REST into RPC-like models, which destroy its usefulness. If you're sitting at your computer and deciding that you're now going to write a client against Service A's API, the point of REST was missed, and Service A might as well have used RPC. The point of REST is to decouple the client from the specific service, using the Uniform Interface and standard formats to allow clients to interact with any service that "speaks" the same formats. But nobody's is thinking on those terms. Everyone is still thinking that it's perfectly normal and OK to waste years of developer time rewriting the wheel, over and over again, for each new service that pops up. This is fueled by the services themselves, of course, whose companies want to use their API to lock you in. So no, while this is the normal mentality, you won't see any major gains from REST.
- eleumik 12y agoIs probably something you already know. Consider this: in your HTML home page you link to some page to do some action, tomorrow you create a new page and add the link to it to your home page, magic done, your generic client (web browser) is now able to show the user a new functionality, no need to change anything on the client. If you have a native Android App (that does not use the browser) you probably need to update it.
- MichaelGG 12y ago... That only works because there's a human driving the browser. I've yet to hear of a concrete example of how this would apply to API clients.
- dragonwriter 12y ago> a truly RESTful service that follows the HATEOAS pattern doesn't require documentation to be hosted separately. It might need documentation of the special media types it relies on to be hosted separately (one place where most "REST" APIs fail to follow HATEOAS is that they reuse generic media types but rely on out-of-band descriptions of the "real" format of the data, so that a client familiar with only the media type and the data would not semantics of the resource representations being returned by the API.)