Composite
Implementation
There are many issues to consider when implementing the Composite pattern:
-
Explicit parent references.
-
Sharing components.
-
Maximizing the Component interface.
-
Declaring the child management operations.
-
Should Component implement a list of Components?
-
Child ordering.
-
Caching to improve performance.
-
Who should delete components?
-
What's the best data structure for storing components?