You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Rice Yeh <ri...@gmail.com> on 2006/03/29 08:57:42 UTC

Design questions on cocoon-core

I start to study cocoon by reading the cocoon-core source code on the trunk
with some UML tool's help.
I find some designs confusing me, most of them are about unnecessary
(duplicate) references:

1. A CocoonServlet instance is associated with an instance of ServletContext
and also
   an instance of HttpContext (implementing ServletContext interface), which
also wraps the same instance of ServletContext. It seems
   the reference to the instance of ServletContext is not necessary.

2. A CocoonServlet instance is associated with an instance of CoreUtil,
which in turns is associated with the
   instance of HttpContext at the first point. The association to the
HttpContext seems not
   necessary.

3. AbstractContext implements both ServletContext and Context, but Context
inherits ServletContext. So implementing
   ServletContext is not needed in code.

4. An instance of CoreUtil is associated with an instance of MutableSettings
and an instance of BootStrapEnvironment, which in turns is associated with
another instance of MutableSettings. Can these two instances of
MutableSettings be combined as one?


Regards,
Rice