cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <stef...@apache.org>
Subject Re: [RT] Component manager, classloader and blocks
Date Sun, 12 Oct 2003 16:59:51 GMT

On Sunday, Oct 12, 2003, at 12:21 Europe/Rome, Stephan Michels wrote:

>
>
> On Fri, 10 Oct 2003, Stefano Mazzocchi wrote:
>
>>
>> On Friday, Oct 10, 2003, at 13:22 Europe/Rome, Stephan Michels wrote:
>>
>>> To prevent component name collisions within, we could use prefixes 
>>> like
>>>
>>>  <match type="basic:wildcard" pattern="*.html"
>>>   <map:generate type="basic:file" src="{1}.xml"/>
>>>   <map:transform type="basic:xsl" src="mystyles.xsl"/>
>>>   <map:transform type="mytransformer"/>
>>>   <map:serialze type="basic:html"/>
>>
>> name collision of what? you define the names of the components. those
>> are the prefixes already, the classes are the real names of the
>> components and they are already fully qualified to avoid collisions.
>
> Okay, I think you mean, (for example) if you want to use a generator 
> from
> block 'basic', you can write easly
>
> myblock:sitemap.xmap:
> <map:components>
>  <map:generators>
>   <map:generator name="file" src="basic.BasicGenerator"/>
>
> But in this case you doesn't gain anything more than from avalon block.
> I want to share these components by the @type insteadof the class name.
>
> For example virtual components can only be shared with @name/@type
> names.
>
> Now, if you a block, which depends on block, which shares
> components with the same type, you will have conflict.
>
> One possible solution is to use prefixes, which allow to map names
> to block IDs.

hmm, I don't think these conflicts are a problem since it's *you* that 
name the components with hints, not the block that exposes them.

>>> For the classes and libs itself, I think separate them into public
>>> and private isn't necessary for the first step.
>>
>> Either we do this right away or it's going to be painful later on. I
>> would be against such an half-step (also because classloading
>> complexity isn't that much different with the two paths)
>
> Here we do have different opinions. I'm curious about the opinions
> from the others.
>
> One question, separate the avalon block the classes into 
> public/private?
>
> Stephan.
>
>
>
--
Stefano.


Mime
View raw message