avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen McConnell <mcconn...@apache.org>
Subject Re: reduction ad unum
Date Sun, 24 Nov 2002 18:15:48 GMT

Leo Sutic wrote:

> > In theory a Context could be expressed as a service.
> > But that doesn't help much.
> >
> > I think it is much better to look at the implications from the point of
> > view of a container concerning supply of a service, as opposed to the
> > implications of suplying a context object.
> >
> > Service provision
> > -----------------
> <big-blah/>
> > Context provision
> > -----------------
> <short-blah/>
> > There's the difference!
> Stephen,
> that is not a difference. 

There is big difference for me - I see a very clear difference between 
providing a key-chain as a context entry as opposed to providing a CA 
service that a component can use to verify the key-chain.

    the key-chain is the data, supplied under a context argument
    the CA is a certification authority that provides a service of 

These are two different notions that are clear in mind mind when I use 
context as opposed to supplying something as a service.  There are other 
reasons beyond this, bu this seperation is for me important and makes 
total sence.

> Yes, the internal mechanics are different, but this does not answer
> Nicola's question: Why bother with a context at all?

Because supply data is not the same as supplying the services that a 
component needs.  These are seperate concerns.

> Just the performance penalty of service startup isn't justification
> enough, especially given that a container better not have a prohibitive
> cost for instantiating services.

Forget about the performance question and think for a moment about the 
difference betwen state and methods. Context is loosely equivalent to 
state, whereas services are loosely equivalent to methods.

Maybe I only one here using context in this way (but I doubt it) - for 
me, the seperation is good, I like the that fact that I dont need to 
typed constructors, and that instead, I can provide parameters via a 
number of conceptually different instruments (Context, ServiceManager, 
Configuration, etc).  I hust happen to think that context has its place 
and appropriately seperates the notion of data from services.

Cheers, Steve.


Stephen J. McConnell

digital products for a global economy

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

View raw message