Re: [Jersey] Jersey's (experimental) approach to support hypermedia constraint

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Wed, 10 Feb 2010 13:55:00 +0100

On Feb 10, 2010, at 1:38 PM, Jan Algermissen wrote:

> On Feb 10, 2010, at 1:07 PM, Paul Sandoz wrote:
>> On Feb 10, 2010, at 12:00 PM, Jan Algermissen wrote:
>>> 2) What is the proper way to design media types and
>>> links?
>>> I really (strongly) think that a framework should
>>> either know exactly what it is doing or be silent
>>> about this matter altogether.
>>> Since the whole issue of machine2machine media types
>>> is still not thoroughly analysed (IMHO) it is very
>>> dangerous to promote a certain approch (re 'action
>>> resources').
>>> This is what caused my worries yesterday. Especially
>>> since I think that the proposed approach misses the
>>> point comletely.
>> This is research :-) which is always risky, but even in failure
>> good lessons will be learned. You have to start somewhere with
>> experimentation. So i am not sure you need to think of this as
>> "dangerous",
> Agreed. However, due to the exposure of Jersey people are likely to
> be influenced a lot by the approach Jersey takes.

Yes. We need to put a Government Health Warning on this :-)

>> although the way i interpret that is you really care about this
>> area and are extremely interested in seeing a good outcome.
> Yes, definitely. I am very convinced that REST can greatly
> contribute to simplifying enterprise IT but people will only realize
> the benefits if it is done right. If done wrongly, REST will create
> a bigger mess in the enterprise than tightly coupled RPC and will be
> kicked out before the advatages have actually been realized.

Agreed on both points.

> I think that REST-inside-the-enterprise is in a very instable state
> right now because so many people now *think* they got it but
> actually don't. Too much hand waving. Clear guidelines for the
> average developer are missing. And Jersey's client side can go a
> long way towards helping with that (but also towards making it
> worse). Hence my (over-)reaction.

OK. IMHO the Jersey client (not including the current proxy approach)
just makes it easier to use HTTP and it is not really suitable in and
of itself for ease of use hypermedia support.

We have been very reluctant to support the proxy solution as
implemented by CXF and RESTEasy because it encourages tighter coupling
and wanted to find a better a proxying approach based on the things
that clients bind to in REST, namely media types and link types (and
leveraging the Jersey client API where appropriate for this)

>> I prefer to think of it as an exciting exploration that we are just
>> starting out on :-)
> Yes.
>> What IMHO would be dangerous and very irresponsible is premature
>> standardization.
> Yes. But there is a danger of Jersy being quasi-standardizing...

That is true. Since this is an open source project it would be
fantastic [*] if yourself and others could get involved and strongly
influence the direction Jersey can go!


[*] All i can offer is sincere gratitude and free beer in such
circumstances :-)