You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Leo Sutic <le...@inspireinfrastructure.com> on 2002/01/21 16:47:31 UTC

An Editoral on Frameworks and IoC (was: RE: Inversion of Control Question)

All,

I went looking for a formal definition of IoC and stumbled
on this:

http://www.cs.wustl.edu/~schmidt/CACM-frameworks.html

Basically, IoC means that the component is controlled
by the container - not the other way around.

The reference passing is less important than how the 
reference is used. For example, a Composable component
will typically receive a reference to the ComponentManager
managing it. This is not a violation of IoC, since
the component still only reacts to control inputs coming
from outside of itself, and does not control what the
ComponentManager does.

/LS



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: An Editoral on Frameworks and IoC (was: RE: Inversion of Control Question)

Posted by Leo Sutic <le...@inspireinfrastructure.com>.
This quote from the editorial is worth mentioning:

The "inversion of control" in the run-time architecture of 
a framework is often referred to as The Hollywood Principle, 
i.e., "Don't call us, we'll call you." 

http://www.cs.wustl.edu/~schmidt/CACM-frameworks.html

/LS

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: An Editoral on Frameworks and IoC (was: RE: Inversion of Control Question)

Posted by Ryan Shaw <ry...@silveregg.co.jp>.
Thanks for all the comments on IOC.

To summarize what I think I understood:

The IOC design constraint in Avalon is 
primarily focussed on Components, and the 
Container-Component relationship, although 
it can also be usefully applied anywhere where
there is a clear parent-child relationship
between classes.

In some cases it makes more sense to view
collaborating classes as peers, rather
than as parent and child, and in these
cases IOC is not such a useful concept.

In any event, evaluating whether or not a 
particular piece of a system breaks IOC is
not a matter of looking for certain "bad" 
syntactic constructs (passing references to
parent, etc.), but rather a matter of
evaluating the semantics of the relationship
in question (i.e. making sure that "control,"
however it is defined in that context, is
one-way).

Ryan

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>