Refactoring 027 - How to Remove Getters | HackerNoon
Briefly

The article advocates for the elimination of getter methods that expose internal object state in favor of behavior-rich methods. This approach promotes better encapsulation and prevents unwanted interference with an object's internal data structure. It outlines a systematic process to identify and replace these getters, emphasizing the creation of intention-revealing methods. By modifying the object itself to manage its data instead of revealing it, the code becomes more robust, maintainable, and easier to understand.
"The main point of the article is to replace simplistic getters with behavior-rich methods that encapsulate the operations pertinent to the internal state."
Read at Hackernoon
[
|
]