Separate Query from Modifier

From CSSEMediaWiki
Revision as of 03:22, 25 November 2010 by WikiSysop (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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."

See also

Command query separation

Personal tools