avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <pe...@apache.org>
Subject Re: ContainerManager and Sub-containers
Date Mon, 03 Jun 2002 22:30:53 GMT
On Mon, 3 Jun 2002 22:30, Berin Loritsch wrote:
> > From: Peter Donald [mailto:peter@apache.org]
> >
> > > I think the key is to have the second lookup (to find the
> >
> > component B
> >
> > > that is contained in C) standardized via a interface.
> >
> > Personally I think the exact opposite ;)
> >
> > I HATE the ComponentSelector interface and think it is a huge
> > mistake to use
> > it. If the ComponentSelector is simply access to a category of avalon
> > components then I can't see why you can't depend on/lookup a
> > component
> > directly.
>
> Keep in mind the purpose of the Selector/Manager relationship.

I recall - one of the time I wished I had kept arguing ;)

> The selector is much better or more elegant when we have something
> like Cocoon. 

I sooooooooooooo disagree ;) The only person it is "elegant" for is the 
container writer - a very small % of overall cocoon developers.

> The components available for Generation, Transformation,
> or Serialization are many.  Plus it is hard to determine what should
> be the actual mapping to the specified component.  For example:
>
> Generator.ROLE + "/file"
> Generator.ROLE + "/stream"
> Generator.ROLE + "/foo"
>
> Truth be told, the File and Stream options can both be used to get the
> same results....


dont see relevance of above ?

> So how do we choose the suffix safely?  The Selector is better here.

exactly how is it better? I can't see much difference at all.

> > ie Consider case where you look up selector with
> > SocketManager.ROLE then look
> > up SocketFactory component using "ssl" hint. Why could you
> > not instead lookup
> > the ssl factory directly via SocketFactory.ROLE + "/ssl".
>
> In this case, it might be just better this way.  You have two options:
> SSL and no SSL.


hmm then lets go with generators then. Lets say you have 10 generators

Generator.ROLE selects the default component in role while Generator + "/X" 
selects the X generators - wheres e problem ?

>
> > Much easier to do dependency checking, much easier for
> > component implementer
> > and gives the assembler much more choice in assembling the system.
>
> And the more complex ways are having the container take care of it
> all for you.

explain.

-- 
Cheers,

Peter Donald
------------------------------------------------
| We shall not cease from exploration, and the |
|  end of all our exploring will be to arrive  |
|  where we started and know the place for the |
|            first time -- T.S. Eliot          |
------------------------------------------------



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


Mime
View raw message