Enrique Rodriguez a écrit :

On 3/11/07, Alex Karasulu <[EMAIL PROTECTED]> wrote:

...


It would be one giant class if it wasn't broken up somehow.  Also,
there are 2 demux (Hashed Adapters) in there.  This is a big change
from just Simple authentication.  IMO, breaking it up like this makes
it easier to follow.

I must admit that it was pretty easy to follow, the way you did it.


We can't easily use interceptors here without adding interceptor
infrastructure, while MINA has the IoHandlerChain already.  Other than
the fact that the Interceptors are more flexible (eg Spring config),
the IoHandlerChain is "fixed"; you can think of it as a subset of the
Interceptor functionality and since Trustin worked on both, they are
similar in semantics.  I think once you get used to it, it won't be
hard to follow.  Also, both DNS and Kerberos use IoHandlerChain's.
For Kerberos, in particular, there is no way I would want to remove
the IoHandlerChain.

As for ease of testing, I don't see how aggregating all the
functionality back into one class would help.  Certainly breaking up
the class into smaller bits in fact increases exposure for testing.

My position here is :
- make it works
- make it configuratble through server.xml
- and then we can criticize and improve.

It's better and more benefical to criticize something which works than a concept on a piece of paper... However, I also tend to think that Alex concerns about patterns are important, because it's the best solution to share and discuss a solution. (even if I'm too old to be a pattern guy :)


Enrique


Reply via email to