You can add components and clients extremely easily so that
extension is truly a breeze. You simply add the new class and inherit
appropriately from Composite or Leaf classes. Add the extra-pattern behavior
(such as an icon which visually represents the component) and initialize this
extra behavior in an appropriate constructor. Document this extra class so that
client-coders know that they should make use of it and you are off and running.
The component is an interacting interface and can be
implemented as either an interface or a Must-Inherit (abstract class).
Practically though, the component is likely to have a fair amount of state
which would benefit from the sharing of a constructor. So it is best
implemented as a must-inherit class. In fact, in this example, we see where
part of the constructor is the addition of a TreeNode class to the nodes
collection of an existing treenode. If it were implemented as an interface,
then the code for TreeNode manipulation would be spread over many classes and
be quite messy and hard to maintain.
There are no great issues here to be dealt with, except that
for ease of understanding by people who maintain your code, participant-classes
should be factored into their own assemblies based on component, composite and
leaf classes. This makes for ease of maintainability.