Tell Don’t Ask
← Back to Other Design Principles
Command objects, don’t interrogate them. Rather than asking an object for data and acting on it, tell the object what to do. This keeps behavior with the data it operates on, maintaining encapsulation.
Key Properties
Related
- Encapsulation (preserved by TDA)
- Law of Demeter (related principle)