cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bertrand Delacretaz <bdelacre...@codeconsult.ch>
Subject Re: Real blocks: some thoughts and questions
Date Fri, 19 Sep 2003 07:35:23 GMT
Le Jeudi, 11 sep 2003, à 20:11 Europe/Zurich, Bruno Dumon a écrit :

> ...Component lookup
> ----------------
> I'm wondering how component lookup will work. For example, suppose I
> have a block where I want to use FOP, i.e. the fo2pdf serializer. I'll
> make my block depend on the fop blok (or the more generic
> cob:apache.org/cocoon/fo2pdf role). Now how will using the serializer
> work? I assume I won't have to declare it in the map:components section
> of my sitemap anymore, since the instances of that serializer will be
> managed by the component manager of the fop block. So I'll just be able
> to write somewhere:
>
> <map:serialize type="fo2pdf"/>
>
> Now how will the component manager know which of the depended blocks to
> ask for this component?...

Do you mean, a) how to select the component if several blocks provide 
it, or b) how to avoid wasting time by asking all blocks?

For a) I'd say the block manager has to assign priorities to blocks, in 
case there are multiple choices. For blocks which extend others it is 
clear, but for "siblings" blocks some rule will have to be set, either 
configurable priorities or loading order (dangerous if it is not 
deterministic), and careful logging of choices to be able to trace 
what's happening (also between core and blocks components).

For b), I think the block manager will need one or several lookup maps 
to be able to quickly find components by role, name and maybe other 
criteria.

-Bertrand

Mime
View raw message