Does anybody know of an implementation of a REST client that embraces the constraint of Hypermedia as the Engine of Application State (HATEOAS)?
The Sun Cloud API seems to be a good candidate, judging from the way it's documented and a statement by the author to the effect that Ruby, Java, and Python implementations were in the works. But so far I've found no trace of the code.
I'm looking for anything - even a partial implementation would be helpful.
It never has been, it's a much higher level than that. But when you do need REST, and you do use REST, then HATEOAS is a necessity. It's part of the package and a key to what makes it work at all.
To implement HATEOAS, we would need to include related resources in the response. Instead of Student we use a return type of EntityModel<Student> . EntityModel is a simple class wrapping a domain object and allows adding links to it. We create a new resource.
Using HATEOAS allows an API to clearly define a control logic that is available at the client-side. This enables them to follow links embedded in the API resources instead of having them manipulate URLs. This decouples clients from the URL structure so that changes don't end up hurting integration.
The very first thing you should look at is the common web browser. It is the standard for a client that embraces HATEOAS (at least to some degree).
This is how Hypermedia works. It's so simple that it's almost painful:
http://pigs-are-cool.org/
Now for a short explanation of how the two terms relate to the web browsing experience:
So HATEOAS actually describes what happens in a web browser when you go from web page to web page:
HTML pages with embedded links drive what you see in the browser at any point in time
The term HATEOAS is just an abstraction of this browsing experience.
Other examples of RESTful client applications include:
Some characteristics of RESTful client software:
<img src=
) some manually (like <a href=
).Very often they are driven by a user, and can correctly be termed "user agents", except for, say GoogleBot.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With