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

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

From: Santiago Pericas-Geertsen <Santiago.PericasGeertsen_at_oracle.com>
Date: Mon, 29 Aug 2011 11:11:10 -0400

On Aug 29, 2011, at 10:57 AM, Sergey Beryozkin wrote:

> Santiago,
>
> Few questions for you:
>
> On 29/08/11 15:44, Santiago Pericas-Geertsen wrote:
>>
>> On Aug 26, 2011, at 3:05 PM, Bill Burke wrote:
>>
>>>
>>>
>>> On 8/26/11 2:48 PM, Marek Potociar wrote:
>>>> Are you now suggesting we take the generic invocation out??
>>>
>>> Yes. I think many specifications try to incorporate a lot of edge cases and end up seriously bloating themselves. This may be one of those scenarios. At the time, it seemed like a good idea that wouldn't affect the API very harshly. Things have changed.
>>
>> -1
>>
>> Although in general I support the idea of simplifying the API, I disagree generic invocations is an edge case. Support for generic invocations is needed to make invocations first class; the ability to configure and store invocations in data structures for later retrieval and execution gives developers a greater flexibility on how to modularize (large) applications and it also enables lazy execution of invocations.
>>
> 1. Do you really believe that most of JAX-RS 2.0 client API users will code invoke() in the end of the chain ? Your -1 seems like a fairly strong preference of invoke() at the end for all the cases.

 No, that's not what I meant. I'm OK with the use of the method name at the end. However, I also like having the ability to pre-configure an invocation (including its method), store it in a data structure and execute it later in a another module by using invoke()/submit(), i.e. without the other module knowing what type of invocation it's executing.

 Hope that clarifies my position.

-- Santiago

> 2. What is your position re the compromise proposal to do with letting users code get()/etc at the end of the chain without paying the price of typing request() yet still easily being able to create Invocations
> 3. Do you agree that a single flow ending with get() is preferable to
> a single flow ending with invoke() ?
>
> Sergey
>
>> -- Santiago
>>
>
>
> --
> Sergey Beryozkin
>
> http://sberyozkin.blogspot.com
> Talend - http://www.talend.com