You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Mark Woon <mo...@SMI.Stanford.EDU> on 2002/02/10 12:53:01 UTC

Parametarizable incompatible with Configurable?

>From the JavaDoc for Parameterizable:

  It is incompatible with the Configurable interface.

Huh?  Why?  Is this true?


-Mark



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


Re: Parametarizable incompatible with Configurable?

Posted by Peter Donald <pe...@apache.org>.
On Sun, 10 Feb 2002 22:53, Mark Woon wrote:
> From the JavaDoc for Parameterizable:
>
>   It is incompatible with the Configurable interface.
>
> Huh?  Why?  Is this true?

Well both Configurable and Parameterizable supply an object with static 
configuration data. If you implement one - you don't need to implement the 
other. Parameterizable is for when the component needs flat config data and 
Configurable is for when the component needs hierarchial config data.

-- 
Cheers,

Pete

"The ability to quote is a serviceable substitute for wit." -- Maugham

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


RE: Parametarizable incompatible with Configurable?

Posted by Stephen McConnell <mc...@apache.org>.

> -----Original Message-----
> From: woon@SMI.Stanford.EDU [mailto:woon@SMI.Stanford.EDU]On Behalf Of
> Mark Woon
> Sent: Sunday, 10 February, 2002 14:39
> To: Avalon Developers List
> Subject: Re: Parametarizable incompatible with Configurable?
>
>
> Stephen McConnell wrote:
>
> > In the case of Parameterizable and Configurable, both interfaces
> > are basically providing solutions to the same "notion".  To
> > have an object that implemented both would be inconsistent - it
> > would be like saying that to understand something, you need to
> > deliver that information in two different and distinct forms.
> > This would conflict with the pipeline notion in Avalon - where
> > the fulfilment of a particular phase raises the objects
> > level of awareness, and readiness for higher things (... its almost
> > a religious experience). Applying both Parameterizable and
> > Configurable on the same object would be conceptually irrational,
> > informational inconsistent, and a touch frustrating for the object
> > in question :-)
>
> Heh.  I see.
>
> I brought this up because the "Developing With Apache Avalon"
> document does not match this philosophy:  "Usually this interface is
> used in lieu of the Configurable interface, however if both are used,
> the parameterize() method is called after the configure() method."
>
> I'm curious, is this actually enforced by a ComponentManager?

There are a number of classes that enforce component pipline phases.
One example I am familiar with is the Phoenix LifecycleHelper.
http://cvs.apache.org/viewcvs.cgi/jakarta-avalon-phoenix/src/java/org/apache
/avalon/phoenix/components/application/LifecycleHelper.java
This example demopnstrates the OR condition between Configurable
and Parameterizable.

Cheers, Steve.


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


Re: Parametarizable incompatible with Configurable?

Posted by Mark Woon <mo...@SMI.Stanford.EDU>.
Stephen McConnell wrote:

> In the case of Parameterizable and Configurable, both interfaces
> are basically providing solutions to the same "notion".  To have an object
> that implemented both would be inconsistent - it would be like saying that
> to understand something, you need to deliver that information in two
> different and distinct forms.  This would conflict with the pipeline notion
> in Avalon - where the fulfilment of a particular phase raises the objects
> level of awareness, and readiness for higher things (... its almost a
> religious experience). Applying both Parameterizable and Configurable on
> the same object would be conceptually irrational, informational
> inconsistent, and a touch frustrating for the object in question :-)

Heh.  I see.

I brought this up because the "Developing With Apache Avalon" document does not
match this philosophy:  "Usually this interface is used in lieu of the
Configurable interface, however if both are used, the parameterize() method is
called after the configure() method."

I'm curious, is this actually enforced by a ComponentManager?


-Mark


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


RE: Parametarizable incompatible with Configurable?

Posted by Stephen McConnell <mc...@apache.org>.
Mark Woon wrote:
> Is [Parameterizable] incompatible with the Configurable interface.

Lets start of with some very abstract stuff - "notions".  In the 
Avalon component world you have the following fundamental notions 
that a developer can grant  (kind of like human rights) towards 
an object by virtue of the Avalon framework interfaces.

   1. an object may be given the ability to record its
      existence and actions it takes

      --> provided by a logging framework interfaces
 
   2. an object may be given the ability to be provided with the 
      constants in life (makes for more mature objects)

      --> provided by Parameterizable, or Configurable interfaces
 
   3. an object may be given the ability to be supplied with service 
      that it may need to fulfil its objectives (makes for happy 
      objects)

      --> provided by Composable interface

   4. an object may be given the ability to receive trivia from it 
      surrounding (makes for more sociable objects)

      --> provided by the Contextualizable interface

   5. an object may be given the ability to die with dignity

      --> provided by Disposable interface

In the case of Parameterizable and Configurable, both interfaces 
are basically providing solutions to the same "notion".  To have an object
that implemented both would be inconsistent - it would be like saying that 
to understand something, you need to deliver that information in two 
different and distinct forms.  This would conflict with the pipeline notion
in Avalon - where the fulfilment of a particular phase raises the objects
level of awareness, and readiness for higher things (... its almost a
religious experience). Applying both Parameterizable and Configurable on 
the same object would be conceptually irrational, informational 
inconsistent, and a touch frustrating for the object in question :-)

Instead, what you have is the ability to describe (through implementation 
of a particular interface) the way in which the object prefers to receive 
the information it needs.  The Parameterizable interface is appropriate 
when the type of information is a flat structure.  The Composable interface
deals with the supply of typically hierarchical information.  Each has its 
own advantages and disadvantages - you select the interface that is most 
appropriate to the type information structures that the component will 
manage.

Easy isn't it!

Cheers, Steve.

Stephen J. McConnell, OSM sarl
digital products for a global economy
http://www.osm.net
mailto:mcconnell@osm.net





> -----Original Message-----
> From: woon@SMI.Stanford.EDU [mailto:woon@SMI.Stanford.EDU]On Behalf Of
> Mark Woon
> Sent: Sunday, 10 February, 2002 12:53
> To: Avalon Developers List
> Subject: Parametarizable incompatible with Configurable?
> 
> 
> >From the JavaDoc for Parameterizable:
> 
>   It is incompatible with the Configurable interface.
> 
> Huh?  Why?  Is this true?
> 
> 
> -Mark
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> <ma...@jakarta.apache.org>
> For additional commands, e-mail: 
> <ma...@jakarta.apache.org>
> 

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