Leo Simons wrote:
> 
> > > The basic crux is that both Peter and Leo concur that the Re* methods
> > > should be done between suspend() and resume() methods of Resumable.  My
> > > question is: What if I implement Reconfigurable but not Resumable?
> > >
> > > My train of thought has been that if Resumable is not implemented, it is
> > > up to the Component to manage concurrency issues (i.e. handling a method
> > > call while it is re-configuring).  This poses no additional
> > strain on the
> > > Container.
> (...)
> > Can't see need to require re* components to be suspendable/resumable
> > What wa the rationale?
> 
> Inversion of Control is one of the core design patterns in Avalon. Having
> a Component manage concurrency issues for itself seems like Subversion of
> Control to me. It is probably better to modify/inherit the container than
> do this (example to disprove that, anyone?).
> What I said (I think) previously is that doing this should at least be
> recommended at all times.

This doesn't affect either IOC or the Container.  Simply requiring a Component
that implements a Re** interface to be smart enough to not go insane after the
method is called is not subverting control.  It is smart programming.  What
you are doing is taking the burden off of the Container who has *no* method
of suspending the Re** Component.

Inversion of Control states that the child reacts to events sent to it, and it
does not pass those events back to the container.  Clear examples of subversion
of control are the following:

A Component calling it's own configure() method
A Component altering the Context object so that the Container has the new object
A Component directly calling methods on a Container.

Times where potential violations are not violations:

A Component is an event server, and the Container registers itself as an Event Handler
  (AKA, scheduling).  The Container in this case is a client of a particular interface,
  and not a Container.

A Component returns a new object for the Container to install in the Context.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to