cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ricardo Rocha <>
Subject Re: [RT] Access to the object model
Date Wed, 21 May 2003 20:40:54 GMT
Stefano Mazzocchi wrote:
 > Now, my question remains: the flow has access to the object model and
 > the flow has access to the component, why don't you use that as the
 > glue between them and leave IoC intact?
 > What am I missing?

Sylvain Wallez wrote:
 > In this use case, flow is of no use in the publication part of the
 > application, which are just straight pipelines. Or do you mean that a
 > script could be used to prepare some sitemap variables ? This seems
 > overkill to me when a simple and more readable declarative approach
 > can do the job.

I believe the flow is of use in any situation where controlling logic
is required. What I personaly find overkill is giving _all_ components
access to the object model (and breaking IoC in the process).

I tend to think of the flow as a glue between distributed layers
and component spaces. That's why I like the fact it's implemented
in a scripting language.

Non-sitemap components shouldn't have access to the object model.

If, for example, a repository manager needs to be told under what
directory to store some content and such information happens to be
stored in the session object, what do we do? Have the _repository
manager_ mess with Cocoon's object model directly so that it can
pick the location?? C'mon! That would break both IoC *and* SoC.

If a non-sitemap components needs access to data stored in Cocoon's
object model then the right thing to do (tm) is to have the controller
decode/extract/build such data and make it available to the component
in a Cocoon-agnostic fashion. By "controller" I mean either the flow
or sitemap-level request decoding.

I may be missing something big here so (please!) enlighten me if
that's the case.

Best regards,


View raw message