avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Noel J. Bergman" <n...@devtech.com>
Subject RE: [PROPOSAL] Context Defined
Date Mon, 09 Dec 2002 09:13:10 GMT
> On Mon, 9 Dec 2002 13:47, Noel J. Bergman wrote:
> > > Assume that we ignore syntactic sugar and access data via "well
defined"
> > > entrys. So rather than
> > > ((FooContext)context).getFooDirectory()
> > > we use
> > > (File)context.get( "foo:directory" );
> > Those are not equivalent.
> from a components point of view they are. One is syntactic sugar for the
> other.

No they are not.  In the former case, my client code has a declared
dependency on something called FooContext for reasons having nothing to do
with what I actually wish to accomplish.  In the latter case, all I my class
depends upon is the basic Context interface, and the desired object type:
File.  I do not care HOW I get the File object that represents a directory.
I could not care less about some "FooContext", "BarContext", or ... in this
case ... what is apparently a FUBarContext.

> > In the former case, context IS-A FooContext.  In
> > the latter case, context need only HAVE-A FooContext (perhaps).
> I am sure most people here are comfortable with the difference
> between these concepts.

I am certainly hoping that your assertion is correct, but at the moment,
you'd be hard pressed to prove it.

	--- Noel


--
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