Encapsulate Multiplicity

a class it's inner logic has become complex due to the multiplicity of components
extract the logic for dealing with the multiplicity of components and bring it into a class of its own

Context:

When a client's code has become complex and cluttered due to the multiplicity of its components Encapsulate Multiplicity often helps to simplify the client's code.

Encapsulate Multiplicity is an example of Introduce Indirection where we use the indirection level to deal with the extra complexity of having a multitude of components locally.

When Evolving to the Composite Pattern this refactoring prepares a design for Enable Component Subcomponent Substitution.


Refactoring Thumbnails, Copyright © 2004 - 2005, Sven Gorts, All Rights Reserved.

[ Overview Page ] [ Thumbnail Catalog ]