Object-Orientation Abusers
Incomplete or incorrect application of OO principles.
Table of Contents
- Switch Statements: Prefer Polymorphism over switch on type.
- Temporary Field: Fields only used in specific circumstances/methods, empty otherwise.
- Refused Bequest: Subclasses that don’t want their inheritance.
- Alternative Classes with Different Interfaces: Two classes do the same thing but have different signatures.
- Anemic Domain Model: Domain objects with no behavior.