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

[jsr339-experts] Re: [jax-rs-spec users] Re: Removing command pattern simplifies things

From: Sergey Beryozkin <sberyozkin_at_talend.com>
Date: Mon, 29 Aug 2011 16:39:44 +0100

Hi Marek
On 29/08/11 16:35, Marek Potociar wrote:
> Hi Sergey,
>
> On 08/29/2011 05:09 PM, Sergey Beryozkin wrote:
>> Sure I understand that - my point is that we have request() in order to accommodate invoke() which is a corner case
>> IMHO.
>
> The purpose of request() is not to facilitate invoke(). The purpose of request() is to make sure that Target does not
> have to declare all the HTTP request header mutator methods, which would be against Separation of Concerns, Single
> Responsibility and Interface Segregation OO design principles.
>
In your earlier revision, with prepare(), did you have all the above
principles violated at the API level :-) ? The Basic example looked good
even if was the case :-) and hence it's hard for me to 'swallow'
request() but well...

Cheers, Sergey

> Marek