Knowledge
Search knowledge... ⌘K
Knowledge · Anti-Patterns
Smell Data Class
Anti-pattern indicating need for refactoring
Tags
refactoring-fowlercode-smellmaintainability
Impact
Classes that have fields, getting and setting methods, and nothing else. Such classes are dumb data holders and are almost certainly being manipulated in far too much detail by other classes.
Symptoms
- Class only has fields and accessors
- No behavior, just data storage
- Other classes manipulate the data extensively
Source
Martin Fowler — Refactoring: Improving the Design of Existing Code, 1st Edition (1999)