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

[jsr339-experts] Re: Back to Hypermedia

From: Markus KARG <markus_at_headcrashing.eu>
Date: Tue, 1 Nov 2011 18:22:10 +0100

Santiago,

 

sorry for the late reply, I was out of office for a while.

 

As I am facing JAX-RS more from the side of a user and extender, I would
love to see support for in-entity links -- even if that means that things
are getting complicated wrt MBR/MBW. The reason is that we already are
shipping software using in-entity links and think this is just natural. Much
more natural, than omitting the existing links and add artifical link
headers (while I understand link headers technical merits). The solution,
obviously, is that the MBR/MBW contracts have to get extended by a means of
parsing/merging links.

 

I do not say that in-entity links MUST be part of JAX-RS 2.0, but I say that
in SOME 2.x release, it SHOULD be included. Otherwise, link support would
just not be complete.

 

Regards

Markus

 

From: Santiago Pericas-Geertsen [mailto:Santiago.PericasGeertsen_at_oracle.com]

Sent: Donnerstag, 13. Oktober 2011 19:58
To: jsr339-experts_at_jax-rs-spec.java.net
Subject: [jsr339-experts] Back to Hypermedia

 

Hello Experts,

 

 Now that we are past EDR submission and JavaOne, I thought it would be a
good opportunity to get back to the topic of Hypermedia.

 

 First, let me summarize what we have so far: (i) we introduced Link and
LinkBuilder (ii) we extended ResponseBuilder to accept Link and (iii)
allowed a client Target to be created from a Link (for clients to "follow"
links). So far, a Link is only mapped to a link header. This seems to be the
bare minimum.

 

 There was a talk about hypermedia @ JavaOne from Jayway.se. Their
presentation and implementation are available here [1]. In a nutshell, they
introduce a new annotation @Linkable (mostly to avoid referring to resource
methods) and extend Response and ResponseBuilder. They allow links in
entities (including collections) but the implementation only works with JSON
so far and uses field injection --any solution that involves entities will
introduce significant challenges due to the pluggability of MBR's and MBW's.


 

 Is our current support for Hypermedia sufficient or insufficient? If the
latter, what other areas should we explore? Needless to say, given that this
is still an area of research, I think we need to avoid any premature
standardization.

 

-- Santiago

 

[1] https://github.com/jayway/jax-rs-hateoas