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 22:08:24 +0100

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

>>
>
> I think we are having problems with terminology.
>
> A 4xx response does represent a client error or failure on the part of the client, which i agree has to be dealt with and not ignored. I am suggesting it can be useful to handle such responses as Java exceptions because they are often not the most common form of response.

Ok. I assumed you'd say this. I chose to state my position in an extreme fashion to help communication.

Basically I agree with what you say above. However, I think excetions can cause developers to think they only happen in unforseeable conditions and could not be delt with.

(Personally, I would use exceptions in my code, too. At least for those 4xx that I do not intend to handle.)

Jan

P.S.
Maybe farfetched, but...

One consequence of truly applying REST could be to make a business decision to actively accept that evolving servers can lead to 4xx responses and to establish a procedure how to deal actively with them and to account for the business transactions lost during the time it takes to evolve the client to work with the evolved server.
For example, I might have a 406 trigger a request to a service support team to take action and add some media type capabilities to the client that 'broke'. Other 4xx responses I would probably just handle as an unkonw error tp be investigated.



>
> Paul.
>
>
>> 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/
>> -----------------------------------
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
>> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>>
>
>
> ---------------------------------------------------------------------
> 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/
-----------------------------------