Lexicon

Separate Query from Command

Kind: technique

Layer: Structural Core

Record: lexicon:separate-query-from-command

Canonical: Lexicon

A technique for splitting an operation that both returns data and changes state into a query and a command.

Listed in Lexicon terms, after Introduce Parameter Object and before Collapse Layers.

Category

  • Core Modular Design

Refactors

  • Hidden Side Effect
  • Controlled Side Effects

Linked from

  • Anti-patterns
  • Transactions / State / Concurrency