Hello All, 

I am a newbie in merlin and avalon. I am trying to understand concepts of Merlin. I 
read the article 'Developing with Avalon'. I read in that article about cofigure 
services and components. It looks like this - 
<component role="org.apache.bizserver.docs.DocumentRepository" 
class="org.apache.bizserver.docs.DatabaseDocumentRepository">
      <dbpool>documents</dbpool>
  </component>
When I see this config, I realize at least that DatabaseDocumentRepository has to 
implement DocumentRepository as I understand.
Why now you've removed description about services wich component provides from 
block.xml ? Because now when I look at block.xml, it doesn't describe structure of 
application or components. For example now I can write 

<container name="tutorial">
    <component name="hello" class="tutorial.HelloComponent"/> <!-- just component 
nothing about service which it supported -->
    <component name="second" class="tutorial.SecondComponent"/> <!--  another 
component and suppose it supports the same service but I cann't say it when I read 
this config -->
</container>

I suppose that if we would add an optional field 'role' then the config only wins from 
it. For example 

<container name="tutorial">
    <component name="hello" role="tutorial.Hello" class="tutorial.HelloComponent"/> 
<!-- first implementation of Hello service-->
    <component name="second" role="tutorial.Hello" class="tutorial.SecondComponent"/> 
<!--  another implementation of Hello  service-->
</container>

and if the field 'role' present then the component "tutorial.HelloComponent" has to 
implement "tutorial.Hello" service. I know that this information presents in .xinfo 
but these files are in many different directories, so it doesn't comfortable to use 
them for view components services or something.
So I think that in this way block.xml would be more descriptive for an application 
structure.

Regards,
Yura Ivanov.

Reply via email to