Knowledge
Search knowledge... ⌘K
Knowledge · Anti-Patterns
Smell Alternative Classes With Different Interfaces
Anti-pattern indicating need for refactoring
Tags
refactoring-fowlercode-smellmaintainability
Impact
Classes that do the same thing but have different signatures for their methods. The protocols need to be unified.
Symptoms
- Methods do the same thing but have different names
- Classes could be interchangeable but aren't
- Similar behavior with different interfaces
Source
Martin Fowler — Refactoring: Improving the Design of Existing Code, 1st Edition (1999)