Such information may include the size and internal structure of the base class from which the subclass is derived. Instead of offering a solution to the fragile base class problem Microsoft chose instead to constrain the semantics of their object model to preclude a mechanism that is widely regarded as one of the defining characteristics of object orientation. In 1987, Peter Wegner of Brown University introduced some order to the OO community by suggesting a subsequently well-accepted taxonomy for classifying object systems and programming languages based on the features and programming paradigms they support. Microsoft calls these new paradigms, containment and aggregation and offers them as an alternative approach for object reuse. Aggregation and containment are essentially manual techniques for code reuse entirely implemented by developer supplied code.
Containment is used when one wants to change some aspect of the implementation of an object.
It requires the programmer to encapsulate the object to be modified with another object whose interface includes the same functions as the encapsulated object. The programmer then supplies the new behavior for functions that are to be changed and provides redispatch stubs to call the corresponding function in the encapsulated object for functions that are not changed. Aggregation is used when a programmer wishes to add functionality to an object but does not need to change any of the preexisting behavior to the object. Aggregation is really nothing more than an optimized form of containment in which the programmer is not required to write redispatch stubs for each function in the object's interface. However, the ability to support aggregation must be explicitly built into a COM object by the developer, so not all Windows objects can be used in this fashion.