Tag Info

Hot answers tagged

30

I think your instincts are largely correct; those proclaimed benefits really aren't all that great, as for any non-trivial web application the clients are going to have to care about the semantics of what they're doing as well as the syntax. But that doesn't mean that you shouldn't make your application follow the principles of HATEOAS! What does HATEOAS ...


4

You can publish details on your services through a "WADL" http://en.wikipedia.org/wiki/Web_Application_Description_Language It's optional and not every backend REST technos supports this. Jersey, the "official" java implementation of jax-rs, supports it for example - it can be automaitcally generated for you. It's quite rare though, to see it used. I ...


2

The things is, HATEOAS must come with a second pillar that define what a RESTful API is : standardized media type. Roy fielding himself said A REST API should spend almost all of its descriptive effort in defining the media type(s) used for representing resources". With a standardized media type that define the transition explicitely, and hypertext to ...


2

the app we are building won't simply look at the links and then by itself render the correct UI and make the right ajax calls In fact, this is exactly what HATEOAS will give the UI. Not what is possible, but when it is possible. A formal HATEOAS like HAL, as the question states, gives links that indicate what is possible. But when those links show ...


2

HATEOAS is a somewhat controversial topic. Many people feel it's an example of overengineering and see no practical benefit to it. I believe it offers a natural and sensible approach to implementing Web APIs, with the benefits of increased decoupling between server and clients and a lower burden on client developers (see my answer to "REST HATEOAS - How does ...


1

As I currently understand HATEOAS is basically all about sending together with each response links with information about what to do next HATEOAS is a lot more than just links. It is "hyper media" as the engine of application state. What is missed in your description is the content type, the formal definition of the hyper media that is passed between ...


1

You don't have to build a dynamically generated interface. Though it could be nice it's not required. If you cannot build a dynamic interface just use the links and you are done. Disadvantage is that you are again hard linked to the backend and will crash if something changes. Using the dynamic layout can be quite simple btw: links.forEach(function(link) { ...


1

Your second approach—including in the job model only links to actions the user is actually entitled to perform—is the one I would take. It keeps the focus on the resource and the actions that can be performed on it, which makes it both relatively simple and a good fit conceptually for the REST architectural style. It retains on the server all ...


1

In REST, do we always use link relation values to convey semantics/role of a linked resource? Using link relations is just one way to add semantics to links. The other standard solution to use RDF vocabs, for example hydra or schema.org. I assume link relation value is always specified using rel attribute? This depends on the media type, for ...


1

Spring has some support for this as does resteasy.


1

How would you know what kind of inputs are acceptable? That is to say, if your client has no prior knowledge, how would you define the semantics of "surname"? You're starting to get into the territory of needing something like OWL. I think it's more practical to expect your clients to understand the semantics of well-known mime-types; say, for example, ...



Only top voted, non community-wiki answers of a minimum length are eligible