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

[jsr339-experts] Re: Updated Client API and Interceptors/Filters proposal is available - please review

From: Marek Potociar <marek.potociar_at_oracle.com>
Date: Thu, 09 Jun 2011 21:40:32 +0200

On 06/09/2011 09:12 PM, Bill Burke wrote:
>
>
> On 6/9/11 9:25 AM, Marek Potociar wrote:
>>
>>
>> On 06/07/2011 08:19 PM, Markus KARG wrote:
>>> Just a few notes I made while reading the samples in the WIKI.
>>>
>>>
>>> * As ResourceUri is not an URI but actually a factory for invocations, it might be better to stick with WebResource,
>>> or use a
>>>
>>> name like Endpoint or InvocationFactory. All those names make clear the "active" aspect of the class, while with
>>> ResourceUri
>>>
>>> everybody might be surprised that it is a factory actually.
>>
>> We have received numerous complains about WebResource being just a "glorified URI" and the WebResource name being too
>> server-side oriented. After hearing lots of suggestions, the ResourceUri seemed the best fit in the end. It is a
>> glorified URI, esp. with it's currently limited scope of responsibilities and it does not evoke the feeling of being a
>> server-side component.
>>
>
> I vote for Link over ResourceUri then as when we start to think of HATEOAS we'll want such a interface and it will be
> almost fully redundant to ResourceUri.
>

How about ResourceLink? :)

>
>>>
>>> * While I understand that technically ".perpareX()" is the correct method name, I assume that end users might like to
>>> use the
>>>
>>> simpler ".x()" instead (without "prepare"), as it is just so much shorter and better to read.
>>
>> Actually, that's what I had in my proposal initially, but then I have received strong negative internal feedback, since
>> the x() is (except for "method") a verb and many people associated the verbs with performing the action, which was found
>> very confusing. Personally, I don't share those feelings, but I was really outnumbered, so I did change the name in the
>> end before publishing the proposal. It would be good to see what other people think. Maybe we could also vote on this?
>>
>
> Hmmm, so the experts on the JSR list want x() and internal Oracle people want prepare(). I vote that the JSR experts
> take precedence over internal Oracle people who are not on this specification.
>
> Users care much more on typing less than verb vs. noun.


FWIW, I was just trying to explain and provide more background, not to advocate anything. Also, Oracle people who
provided feedback are developers too. Most of them are pure JAX-RS/Jersey users, not involved in either JAX-RS or Jersey
development. So I just listened to the prevalent user opinion that was available at the given time.

Still, if EG thinks that x() is better (and I would vote for x() too, so right now it is 3:0), we *WOULD* change it. I
will set up a new poll to resolve this.

Marek