Command/Query Separation is a design principle first described by Bertrand Meyer. Simply put, it is this: A method should be a command or a query, but not both. A command is a method that can modify the state of the object but that doesn’t return a value. A query is a method that returns a value but that does not modify the object.
- Chapter 10: I Can’t Run This Method in a Test Harness
- from Working Effectively with Legacy Code, First Edition
- Publisher: Prentice Hall
- Released: September 2004
Pattern for implementation
Share this highlighthttp://www.safaribooksonline.com/a/working-effectively-with/3070802/