- Summary
- Moves common behavior of several classes in same layer to a single super type to improve reuse.
- If you have more than one kind of object in a layer, it's useful to have more
than one Layer Supertype.
- Example
- Generic Getter and Setters implementation
- How it works
- Layer Supertype[Fowler03]. If the components in the layer share a set of common behaviors, you extract those behaviors into a common class or component from which all the components in the layer inherit.
- Not only does this ease maintenance and promote reuse, it also reduces the dependencies between layers by allowing the common behaviors to be invoked through a runtime reference to the supertype instead of a specific component.
|
|