10

I'm looking for a concret example in WOA/HATEOAS !

I read a lot of blogs and see a lot of presentations about HATEOAS but never an example ...

How can you implement the client side ?

Really, when you're making HTML5 applications with Backbone, AngularJS, Ember, Knockout ... how can you make HATEOAS ?!

In Backbone for example how to set dynamically the 'url' property of your model retrieving the resource from server ?

Thx for your replies guys !

Best regards,

Thomas Pons.

Thomas Pons
  • 7,709
  • 3
  • 37
  • 55
  • Just why -1 guys ? If my question is really stupid just explain me :) ! I really want to know ! – Thomas Pons Apr 12 '13 at 14:19
  • Probably because your question is not exactly what is expected in Stack Overflow. I find it interesting, and there has been similar questions here. But usually the people expect that you present a SW problem and they can help you to find it. Your questions is more appropriate for google :) – Rafa Apr 12 '13 at 14:21
  • 2
    The matter is that google don't get the response ! I know that my question is not a pure technical question ... But in fact, it's a desing problem typically with Backbone ! But ok, i understand your point of view. Thanks – Thomas Pons Apr 12 '13 at 14:23
  • https://github.com/badgateway/ketting <- in case people are still looking – Evert Nov 27 '20 at 06:56

1 Answers1

4

The point of HATEOAS is that you are getting links on other resources from responses on your requests. Difference, in comparison with URL Templates, is that the client knows, has hardwired, just few URLs (entry points), and the rest of URLs is getting from responses on the fly. It brings loose coupling between client and server and that's main benefit of HATEOAS.

Working with HATEOAS is same as surfing on Web, you just click on a link that is included in last response (e.g. HTML page), then again, and again. Point is that you don't know all the URLs before you get first response on URL that you know, the entry point.

Today, HATEOAS is not well adopted, unfortunately. Most of APIs are publishing URL templates, and that means tight coupling; so I think you cannot expect support from existing frameworks now, but it's not so hard to implement your own URL repository, on client, that will collect URLs from responses you get.

Filip
  • 3,002
  • 1
  • 26
  • 37
  • 5
    Ok i understand better the philosophy. But i think that the client side is the most difficult part of HATEOAS, the server side is more easy to make. Thx for your reply. – Thomas Pons Apr 12 '13 at 15:48