jsr339-experts@jax-rs-spec.java.net

[jsr339-experts] Re: [jax-rs-spec users] Re: Hypermedia - Take 2

From: Santiago Pericas-Geertsen <Santiago.PericasGeertsen_at_oracle.com>
Date: Mon, 25 Jul 2011 10:00:10 -0400

On Jul 25, 2011, at 8:38 AM, Bill Burke wrote:

> I don't see how this is any better/easier than doing things by hand, manually, without the API. In fact, its more complicated as as new maintainer of the code has to learn the multiple hoops that are jumped thru by the abstraction. Well, at least the examples given in the blog.

 I agree there isn't much there beyond what can be done my hand. I was hoping we could find some sort of silver bullet that would address all of our linking needs, and this was a first step. I'm not sure there's such a silver bullet.

 An alternative may be to improve UriBuilder and make it easier to add Link headers, and simply write some examples showing how to generate these links.

>
> The model annotations also seem a bit insane. If you go beyond the simple case, you have a load of attributes to define and have to write non-compiler-checked EL.

 Yes, I tend to agree.

-- Santiago

>
> I just feel dirty every time I look at this stuff and can't see myself wanting to use these interfaces.
>
> On 7/20/11 2:07 PM, Santiago Pericas-Geertsen wrote:
>> Hi Experts,
>>
>> The wiki page on Hypermedia / HATEOAS has been updated after processing
>> all the feedback received on the declarative hyperlinking approach and
>> related topics.
>>
>> After going through all the e-mail threads, I now believe it would be
>> useful to divide the hyperlinking problem into two parts: structural
>> links and transitional links (I came up with these terms, feel free to
>> dislike them :). See [1] for a discussion.
>>
>> It appears that supporting transitional links is easier, and a simple,
>> non-declarative (annotation free) approach is described in [1]. Note
>> that transitional links are handled completely at the resource
>> (controller) level and are conveyed as Link Headers (my personal
>> preference). Support in the Client API is also straightforward (and
>> similar to Restfulie).
>>
>> Structural links are more complex to support given their interaction
>> with other parts of the system (readers, writers, JAXB, etc), and given
>> their impact on the model. A declarative, annotation-based approach may
>> be the way to go, but there are a number of issues that need to be
>> sorted out.
>>
>> In summary, [1] is an incomplete story, but wanted to direct your
>> attention to the new content to help us drive future discussions.
>>
>> -- Santiago
>>
>> [1] http://java.net/projects/jax-rs-spec/pages/Hypermedia
>
> --
> Bill Burke
> JBoss, a division of Red Hat
> http://bill.burkecentral.com