users@jersey.java.net

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

From: Jan Algermissen <algermissen1971_at_mac.com>
Date: Wed, 10 Feb 2010 21:46:00 +0100

On Feb 10, 2010, at 9:11 PM, Paul Sandoz wrote:

>
> On Feb 10, 2010, at 8:39 PM, Jan Algermissen wrote:
>
>>
>> On Feb 10, 2010, at 6:40 PM, Paul Sandoz wrote:
>>
>>> Exceptions can be an effective way of handling failure states (the Jersey client API already uses such a pattern).
>>
>> What would you consider to be a 'failure state'? (Trying to align our thinking)
>>
>
> A response >= 400 or a link type that is not present.

Then we are not thinking along the same lines I'm afraid. From a REST POV these are not failures but just application states the client must expect and try to make the best of. Or, turned around: in a RESTful system the servers cannot be constrained to send a link of a particular type nor to send a representation of a particuar kind.

Clients cannot rely on such assumptions because that would couple clients and servers.

That is why I think it is wrong to let the framework create the impression that clients could in fact make such assumptions.

Jan


>
> Paul.
>
> ---------------------------------------------------------------------
> 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/
-----------------------------------