This article is part of the CodeSmell Series.
Your objects are a bunch of public attributes without behavior.
Protocol is empty (with setters/getters).
If we ask a domain expert to describe an entity he/she would hardly tell it is 'a bunch of attributes'.
1) Find Responsibilities.
2) Protect your attributes.
3) Hide implementations.
Detection can be automated with sophisticated linters ignoring setters and getters and counting real behavior methods.
- Data Class
- OOP as Data