cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pier Fumagalli <>
Subject Re: [RT] Cocoon component container and excalibur
Date Thu, 03 Jun 2004 13:36:43 GMT
On 3 Jun 2004, at 13:16, Andreas Hartmann wrote:

>> Second of all (but I think this is solvable) component selection is 
>> kinda weird and goes totally against the IOC principles.
>> A block should require another block, it should not by any means 
>> "select" a block as we do now with component selectors)...
> >
>> It's kinda mixed at the moment, I'm given a logger, I'm given a 
>> configuration, but I have to ask for a component?
> I guess I got this wrong - isn't this distinction based on
> the difference between compile time / runtime? My component
> will use a logger and a configuration in any case, but maybe
> it doesn't know which services it will need later on. When it
> "requires" each other block it might want to use, wouldn't
> this generate some overhead?

You declare your requirement in the descriptor, but access the instance 
at runtime...

I'm not concerned about the access mechanism, but about the selection 
mechanism. The block should be given a specific instance of a Generator 
(for example) if they require one. But they should not be allowed to 
look up for a ComponentSelector upon which the block itself "chooses" 
which one of the generator it wants...


View raw message