Skip to content

Instantly share code, notes, and snippets.

@breezhang
Last active August 29, 2015 13:55
Show Gist options
  • Save breezhang/8783367 to your computer and use it in GitHub Desktop.
Save breezhang/8783367 to your computer and use it in GitHub Desktop.
CQRS (CQRS means Command Query Responsibility Segregation)

Martin Fowler wiki

The fundamental idea is that we should divide an object's methods into two sharply separated categories:

◾ Queries: Return a result and do not change the observable state of the system (are free of side effects)

◾ Commands: Change the state of a system but do not return a value.

Commands - change the state of an object or entire system

Queries - return results and do not change the state of an object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment