Re: Is it correct to respond with partial representation for low capabilities media-types?

Philippe Rathé <[email protected]>
Newsgroups gmane.comp.web.services.rest
Message-ID <CAE-VBsAdAy7cKCcZxRVvpxLsDE8aUv2qdvdWpW39Xw4bgfhv2w@mail.gmail.com>
Thanks Mike for bringing those points, especially the last one which
I've commented above. Please see my comment like a reflexion I am
having.

On Thu, Jun 21, 2012 at 8:39 AM, Mike Kelly <[email protected]> wrote:

> Another issue to think about (although not really a technical
> argument) is that if you are designing an application which is
> intended to be driven by hypermedia, then stuffing the links up into
> headers and 'out of the way' could be sending out the wrong signal to
> clients of your application.

I've had the same concern. But why in the context of HTTP, hypermedia
have strictly to correspond to the body of the response? What if
everything that is part of the representation including concerned
fields in the header, would compose the hypermedia?

When Roy said on his blog[1]

    When I say hypertext, I mean the simultaneous presentation
    of information and controls such that the information becomes
    the affordance through which the user (or automaton) obtains
    choices and selects actions.

Aren't HTTP body and header presented simultaneously? For the sake of
RFC 5988, controls (links) are defined in the header. The body can be
an hypermedia or not, e.g. it can contains controls with informations,
or only informations. Most of the link relations registry defines
controls (from a user-agent viewpoint)  which hold implicit
informations that can be explicitly magnify specifying the title
attribute when using Web Linking.

I can think of some examples of representations being expressed only
with Web Linking, e.g. it would not need a body with additional
informations, or controls. IMO we can have an hypermedia by presenting
controls and informations not necessarily inline, but side by side.
The difference is the way user-agens will display the
controls/informations defined by the Link header field.

I think that presenting controls and informations side by side make a
lot of sense for some user-agents on low formatting capabilities
devices where controls could not be placed inline within the
informations. That configuration does not prevent HATEOAS.

1: http://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypertext-driven#comment-718
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.