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

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

From: Bill Burke <bburke_at_redhat.com>
Date: Thu, 09 Jun 2011 15:00:50 -0400

On 6/9/11 2:54 PM, Markus KARG wrote:
>
>>>> * The complexity of the current annotation based proposal for
>> filters feels a bit overcomplicated. I am a big friend of annotations,
>> aspects and all that, but it just so much simpler to write
>> "Client.from(URL).filter(myFilter).post(entity)" than doing it the
>> proposed way.
>>>>
>>>
>>> I think you're missing the fact that we want to use this interceptor
>> framework on the server side too. The idea here is that you are
>> binding behavior to an annotation. CDI has a similar concept.
>>
>> That's right. It does feel a bit over-engineered at first, but it
>> makes sense after you put it in practice.
>
> I got your point, but try to see it from the average client programmer's
> view. The fluent API proposal is just much easier to read. I like AOP
> really, but the fact that it is a jack for all trades not necessarily means
> that it fits best in all places.
>

If you seen the list of example interceptors I gave on my blog you'll
see that they are mainly for feature development not application
development.

-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com