users@jersey.java.net

Re: [Jersey] Re: Hypermedia clarification

From: Jan Algermissen <algermissen1971_at_mac.com>
Date: Tue, 16 Feb 2010 23:08:32 +0100

On Feb 16, 2010, at 10:52 PM, Mark Derricutt wrote:

> Does anyone have a pointer to the current Link: header spec? All I
> can find are draft specs from 1999 and 2006 and an endless circular
> google hunt through various HTML5 and Web mailing lists.
>
> This topic is quite timely as we're just looking into how to actually
> DO HATEAOS, currently we have resource URLs embedded inside the JSON
> documents we return,

There is an ongoing activity somewhere to add linking capabilities to json. If you are not part of that anyway, it might make sense to search for that activity.

Maybe search rest-discuss for 'JSON'

Jan

> such as:
>
> "products": {
> "INBOUND_SCRUB": {
> "current": true,
> "resources": {
> "POLICY_SETS": {
> "description": "Policy Sets",
> "url":
> "http://localhost:8888/api/customer/2000032/inboundscrub/policysets"
> },
> "EVENTS_SEARCH": {
> "description": "Events Search",
> "url":
> "http://localhost:8888/api/customer/2000032/inboundscrub/events/search"
> },
>
>
> but this just feels wrong - I feel as thou the resource content
> shouldn't know, or say "where" things are. I'm thinking ideally, I'd
> continue to include the "products" collection, as that makes up the
> state of the customer, but everything under the "resources" for that
> product, should be a flat collection of Link: headers
>
> Mark
> Confused REST guy.
>
> --
> Pull me down under...
>
> On Tue, Feb 16, 2010 at 11:26 AM, Roy T. Fielding <fielding_at_gbiv.com> wrote:
>> Link is part of the representation metadata (that's its whole reason to exist).
>> Content-Location is representation metadata for the URI of this content.
>> Location is a response header used as part of the redirect aspects of HTTP.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>

-----------------------------------
 Jan Algermissen, Consultant
 NORD Software Consulting

 Mail: algermissen_at_acm.org
 Blog: http://www.nordsc.com/blog/
 Work: http://www.nordsc.com/
-----------------------------------