You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Peter Donald <do...@apache.org> on 2001/04/17 11:31:13 UTC

RoleManager et al

Hi,

The current org.apache.avalon.component.Default* is Cocoon specific. It
links against org.apache.excalibur.pool.* and uses format specified in
Cocoon conf file. This is problematic considering the framework classes are
meant to be independent of components. Consequently I propose that we move
the classes either into excalibur or cocoon. We can rework the
RoleManager/Other to be more generic (not deal with
threading/pooling/whatever) and keep that in avalon.component.*. We then
move the hashtable based DefaultComponent* into org.apache.avalon.component.*

Another thing is I need to know whether or not to change
Composer->Composable. I think it would be a good thing to do in long run.

Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*


---------------------------------------------------------------------
To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-dev-help@jakarta.apache.org


Re: RoleManager et al

Posted by Berin Loritsch <bl...@apache.org>.
Peter Donald wrote:
> 
> At 08:31  17/4/01 -0400, Berin Loritsch wrote:
> >I could have sworn I got rid of the Cocoon specificity.  You have a role
> >manager that takes care of the named configurations, etc.
> 
> Right but it still uses Cocoons config format ;)

It's a pretty generic format.

<component role="rolename" class="classname">
  <!-- all elements here are passed to the component -->
</component>

Or for selected components:

<component role="roleSelector" class="Selector">
  <component-instance name="instancename" class="classname">
    <!-- all elements here are passed to the component -->
  </component-instance>
</component>

In order to customize it, you can either have a separate roles config file,
or embed it in the same file (I prefer separating):

<role shorthand="foo" role="rolename" class="classname"/>
<foo>
  <!-- all elements here are passed to the component -->
</foo>

Or for selected components:

<role shorthand="foo" role="roleSelector" default-class="Selector">
    <hint shorthand="bar" default-class="classname"/>
</role>

<foo>
  <bar name="instancename">
    <!-- all elements here are passed to the component -->
  </bar>
</foo>

Plus it automatically handles whether the components are Poolable,
etc.

> >Ok. Move it to Excalibur.
> 
> will do.

Cool Beans!

> >Besides, What's wrong with using the new framework?  You can add regular
> >components and it acts like the previous ComponentManager, or it can
> >create Components on demand.  It depends on what you want to do with it.
> >It's flexible enough to let it be dumb or smart.
> 
> It is about 10 times more complex than the previous Map based
> implementations. It required the presence of the Pooling code (ie a
> component and not part of framework). It was overkill for most simple
> cases. For bigger systems (ie Cocoon2 and possible Phoenix in future) it
> makes sense to use it but lets keep it simple to start with.

Ok.  Point taken.  Complexity is encapsulated, so it is less for the user
of the framework to explicitly handle--but it is overkill in many situations.

Both are valid approaches, so we should have them both.

---------------------------------------------------------------------
To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-dev-help@jakarta.apache.org


Re: RoleManager et al

Posted by Peter Donald <do...@apache.org>.
At 08:31  17/4/01 -0400, Berin Loritsch wrote:
>I could have sworn I got rid of the Cocoon specificity.  You have a role
>manager that takes care of the named configurations, etc.

Right but it still uses Cocoons config format ;)

>Ok. Move it to Excalibur.  The Component framework that is there now in
Avalon,
>shouldn't even mention Cocoon, and it takes care of alot of lifecycle issues
>for you.  Personally, I'd like to see more of you using it.  They were moved
>into Avalon, because they were written in a manner where they could be used
>in any project.  The move was to give people a more pleasant experience in
>programming for Avalon--not just Cocoon.

will do.

>Besides, What's wrong with using the new framework?  You can add regular
>components and it acts like the previous ComponentManager, or it can
>create Components on demand.  It depends on what you want to do with it.
>It's flexible enough to let it be dumb or smart.

It is about 10 times more complex than the previous Map based
implementations. It required the presence of the Pooling code (ie a
component and not part of framework). It was overkill for most simple
cases. For bigger systems (ie Cocoon2 and possible Phoenix in future) it
makes sense to use it but lets keep it simple to start with.

Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*


---------------------------------------------------------------------
To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-dev-help@jakarta.apache.org


Re: RoleManager et al

Posted by Berin Loritsch <bl...@apache.org>.
Peter Donald wrote:
> 
> Hi,
> 
> The current org.apache.avalon.component.Default* is Cocoon specific. It
> links against org.apache.excalibur.pool.* and uses format specified in
> Cocoon conf file. This is problematic considering the framework classes are
> meant to be independent of components. Consequently I propose that we move
> the classes either into excalibur or cocoon. We can rework the
> RoleManager/Other to be more generic (not deal with
> threading/pooling/whatever) and keep that in avalon.component.*. We then
> move the hashtable based DefaultComponent* into org.apache.avalon.component.*

I could have sworn I got rid of the Cocoon specificity.  You have a role
manager that takes care of the named configurations, etc.

Ok. Move it to Excalibur.  The Component framework that is there now in Avalon,
shouldn't even mention Cocoon, and it takes care of alot of lifecycle issues
for you.  Personally, I'd like to see more of you using it.  They were moved
into Avalon, because they were written in a manner where they could be used
in any project.  The move was to give people a more pleasant experience in
programming for Avalon--not just Cocoon.


Besides, What's wrong with using the new framework?  You can add regular
components and it acts like the previous ComponentManager, or it can
create Components on demand.  It depends on what you want to do with it.
It's flexible enough to let it be dumb or smart.

---------------------------------------------------------------------
To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-dev-help@jakarta.apache.org


Re: RoleManager et al

Posted by Charles Benett <ch...@benett1.demon.co.uk>.

Peter Donald wrote:
> 
> Another thing is I need to know whether or not to change
> Composer->Composable. I think it would be a good thing to do in long run.

+1 for Composable

Charles

---------------------------------------------------------------------
To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-dev-help@jakarta.apache.org


RE: RoleManager et al

Posted by Leo Simons <ma...@leosimons.com>.
> Another thing is I need to know whether or not to change
> Composer->Composable. I think it would be a good thing to do in long run.

+1 Composable.

greetz!

LSD

---------------------------------------------------------------------
To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-dev-help@jakarta.apache.org


RE: RoleManager et al

Posted by Stephen McConnell <mc...@osm.net>.

From: Peter Donald [mailto:donaldp@apache.org]
> Another thing is I need to know whether or not to change
> Composer->Composable. I think it would be a good thing to do in long run.

+1 for Composable.





---------------------------------------------------------------------
To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-dev-help@jakarta.apache.org