Separate Query from Modifier
From CSSEMediaWiki
(Difference between revisions)
Line 1: | Line 1: | ||
− | Straight from [[Martin Fowler | + | Straight from [[Martin Fowler 1999]]: |
"You have a method that returns a value and also changes the state of an object. | "You have a method that returns a value and also changes the state of an object. |
Revision as of 03:00, 23 September 2008
Straight from Martin Fowler 1999:
"You have a method that returns a value and also changes the state of an object.
Create two methods, one for the query and for the modification."