Hi,
I've been getting up to speed with Client API. I've no concrete
proposals right now and I'm not sure I can affect what has already been
written out there, but here are some initial observations. Also, one
thing I'd like to clarify is that I understand it's much easier for
someone like me to pop-up and start criticising :-) and I respect the
work the experts have done so far - but here I am and have my initial
comments.
It's too complex. As simple as that (no pun intended). I appreciate a
lot of thought has been given to it, but it's too complex. IMHO if we
want this API compete with a proxy based API which is a simplicity in
its extreme, we should simplify the current Client API.
Here are some observations:
1. ClientFactory is factory of clients
2. Client is a factory of Links but also a factory of Invocations.
3. Link **is** effectively a Client even though Links are supposed to be
identifiers of resources Clients are supposed to work with.
4. Link is a factory of Invocations
5. get().params(...).invoke() just reads wrong; the whole idea is to
capture the fact clients are doing HTTP centric programming with
get()/etc and here get() is just lost in the noise with faceless
invoke() finishing the chain.
I apologize if the above is totally out of context - but IMHO something
needs to be simplified. I'm traveling this week but hoping to provide
some more constructive feedback, as opposed to just a critique, asap
thanks, Sergey