Command Pattern
Margus Luik
Command Pattern
Intent
Encapsulate a request as an object, thereby letting users parameterize clients with different requests, queue or log requests, and support undoable operations.
Command Pattern
Intent of the pattern:
Encapsulate a request as an object, thereby letting users parameterize clients with different requests, queue or log requests, and support undoable operations.
In other words:
Turn a action into data.
Command Pattern
Command Pattern
Characteristics
Function calls become:
Command Pattern
Potential applications:
Example
Command Pattern
Example
What parts might be:
Example
Example
For the next week