In the previous module, we discussed reusability in a general context with software components. We also examined how to reuse COM (Component Object Model) objects with containment/delegation.
In this module, we will continue our exploration of COM's reusability mechanisms by studying aggregation.
Reusing COM objects via aggregation requires some additional coding in inner COM objects, but does not require the outer COM object to mirror interfaces implemented in the inner COM object.
The inner COM object is fully aware that it is being reused and its interfaces are exposed directly to the client. The client is not aware of aggregated COM objects. The client thinks the outer COM object implements all accessible interfaces.
At the end of this module, you will be able to:
- Explain what aggregation does.
- Describe how interface navigation and reference counting work under aggregation.
- Understand the guidelines for inner and outer objects under aggregation