[prev in list] [next in list] [prev in thread] [next in thread] 

List:       avalon-dev
Subject:    Re: Avalon.NET container (was Re: [RRT] Getting back to the basics
From:       Berin Loritsch <bloritsch () apache ! org>
Date:       2003-07-31 17:02:40
[Download RAW message or body]

hammett wrote:

<snip type="good stuff"/>

>>* The ability to create and instantiate a component.
>>* The ability to destroy a component.
>>* Assemble components (provide a mapping functionality).
> 
> 
> Could you explain more of this last one? Or are you just talking about
> resources et al?

Assembly is the process of mapping resources to names.  For instance,
we have a component defined like this:

[AvalonComponent]
class MyComponent : Service, ILookupEnabled
{
     [AvalonDependency(OtherService.class, key="foo")]
     public void enableLookups( LookupManager manager ) {}
}

This component declares it needs a component that provides the OtherService
interface, and that the component expects to find it by the name "foo".
The component doesn't care how it is configured or what implementation is
provided.  It just needs an instance.

The assembly process will either allow the person putting the system together
(the assembler) or the container itself to select which implementation and
configuration of that service will be provided for the "foo" entry.

This allows the component to worry about what is important to it, without
forcing undue constraint on namespace issues or finding common names for
every mapping.  For the component, it just works.

It is also important to realize that the mapping is specific to that component.

Fortress doen't do this, so it relies on common names (usually the class name)
and provides for a little dynamics in parsing the name to map to a specific
implementation/configuration for the required component.

That at least is the core concept.  As long as we can properly abstract the
concept, we can start with the simplistic Fortress approach, and then plug in
a more sophisticated approach.

-- 

"They that give up essential liberty to obtain a little temporary safety
  deserve neither liberty nor safety."
                 - Benjamin Franklin


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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic