[cap-talk] "Composite", was "Same" key

James A. Donald jamesd at echeque.com
Fri Feb 16 18:41:13 CST 2007


Karp, Alan H wrote:
 > However, a facet is more than just another object from
 > the point of view of the creator of the facet.  The
 > facet is a means to expose part of the state and
 > methods of some object while hiding the rest from the
 > holder of the reference to the facet.  Such a facet
 > has no state or logic of its own.  It is used solely
 > of a means of reducing the interface.  Also, the
 > interface of the facet may be something that can be
 > further reduced. In this sense, "facet of an object"
 > is exactly the right terminology, while "atomic
 > object" is not.

A facet is restricted access to the whole object - for
example it might provide access to read only methods.

Suppose the object is an aggregate object, then some of
the methods it provides give references to some of its
components.  Then a read only facet would provide read
only references to its components

"Facets" refers to one pattern.  "Aggregation" and
"atomic" refer to another pattern.  One can have either
pattern, or both patterns, or neither.   One can have
facets of atomic object, or facets of an aggregate
object.

An aggregate object, by definition, exposes some of its
its interior objects.  An atomic object does not.  A
facet of an aggregate object might well expose a
corresponding facet of an interior atomic object.


More information about the cap-talk mailing list