Command-query separation
Command-Query-Separation ( CQS , English for command-query separation ) is a principle of software design . The CQS principle wasconceivedby Bertrand Meyer in the course of his work on the Eiffel programming language .
The CQS principle states that a method either as a query ( query ) or as a command ( command , modifier or mutator ) is to be implemented. A query must return data and must not have any side effects on the observable state of the system, while a command has observable side effects and does not return any data.
See also
swell
- ↑ Martin Fowler: command-query separation. December 5, 2005, accessed May 18, 2014 .