previous up next Composite

Intent, Motivation, Applicability, Structure, Participants, Collaborations, Consequences, Implementation, Sample Code, Known Uses, Related Patterns

previous next Implementation

There are many issues to consider when implementing the Composite pattern:

  1. Explicit parent references.
  2. Sharing components.
  3. Maximizing the Component interface.
  4. Declaring the child management operations.

  5. Should Component implement a list of Components?
  6. Child ordering.
  7. Caching to improve performance.
  8. Who should delete components?
  9. What's the best data structure for storing components?


Implementation of Abstract Factory, Adapter, Bridge, Builder, Chain of Responsibility, Command, Composite, Decorator, Facade, Factory Method, Flyweight, Interpreter, Iterator, Mediator, Memento, Observer, Prototype, Proxy, Singleton, State, Strategy, Template Method, Visitor

previous next