cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <>
Subject Re: [RT] Access to the object model
Date Wed, 21 May 2003 16:54:26 GMT
on 5/21/03 7:28 AM Sylvain Wallez wrote:

>>Now, I personally like writing simple code, so I like writing a component that stores
some data in the object model. Now, in order to retrieve the data, I don't want to lookup
the component again, but I want to directly query the object model for it. So, I guess, it's
my personal problem and it enforces you to always use components to get and set data. And
I guess, I'm the only one again who wants to have more freedom when writing code...
> No offense intented, but sometimes you have to restrict writing freedom 
> to have maintainable code. And this is all what IoC is all about : code 
> is not allowed to get directly the object model, but the object model is 
> given by the container, thus enforcing a managed and controlled 
> execution environment for the component.

I'm big time with Sylvain here.

IoC is also defensive programming: I don't give you access to stuff that
you can abuse.

not *you*, Carsten, but others will.

In a future where cocoon development will be distributed in various
places without knowledged people like us stopping all abuses when they
start, we must distill this knowledge into the API or Cocoon will become
an architectural mess (it already is, in some parts, in fact we'll have
to cleanup the object model one day)

>>So, what about implementing this Context thing then?
> +1 from me ;-)

I'm sorry, but I'm still -1.

An avalon component should *NOT* have access to the cocoon object model.
There should be something else in between glueing the two.

Now, prove me wrong.


View raw message