Data Model for Quantity v0.5 - inheritance vs aggregation

Brian Thomas brian.thomas at gsfc.nasa.gov
Mon May 10 14:59:11 PDT 2004


	A clarification on that last email which was dashed off just before
	leaving work..

On Monday 10 May 2004 04:56 pm, Brian Thomas wrote:
> On Monday 10 May 2004 04:10 pm, Patrick Dowler wrote:
> > FYI - realization is the relationship between an interface and the class that 
> > implements it. One interface still inherits from another. the Q document does 
> > specify an inheritance relationship.
> 
> 	Yes, I agree. I was sloppy in my description. Nevertheless, the intention
> 	is correct, we shouldn't see aggregation lines in the diagram, just 3 or 4
> 	interfaces inheriting from one another in direct succession. 

	should read :

	Yes, I agree. I was sloppy in my description. Nevertheless, the intention
 	of what I wrote is correct, to have a series of interfaces (rather than classes)
	in our document, so that implementors are not forced into repeating the same 
	hierarchy and are free to arrange the underlying class(es) as they like. My 
	preference is that we shouldn't have aggregation lines in the diagram (as that 
	doesn't really specify exact accessor methods), figure 1 should
	be just 3 or 4  interfaces (Frame through StandardQ) inheriting from 
	one another in direct succession. 

> 
> > [snip description of how this inheritance relationship between interfaces 
> winds up forcing one-to-one implementation anyways]
> >
> > The interfaces in the Q doc specify a type of relationship that the
> > implementations are more or less forced to follow.
> >
> > Interfaces are meant to be declarative ("I have these methods!") first and
> > can - if it is valuable - have an interface heirarchy. Here we have both
> > and it is an extra burden and limitation on implementors.
> 
> 	What is your solution then? Have you been running into problems
> 	implementing these interfaces?
> 
> 	=b.t.
> 

-- 

  * Dr. Brian Thomas

  * Dept of Astronomy/University of Maryland-College Park
  * Code 695/Goddard Space Flight Center-NASA

  *   fax: (301) 286-1775
  * phone: (301) 286-6128 [GSFC]
           (301) 405-2312 [UMD]



More information about the dm mailing list