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

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

From: Markus KARG <markus_at_headcrashing.eu>
Date: Thu, 9 Jun 2011 20:54:07 +0200

 
> >> * 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.