Command
← Back to Behavioral Patterns
Encapsulate requests as objects, enabling undo/redo. Turn a request into a stand-alone object containing all information about the request. This enables parameterizing methods with different requests, queuing requests, and supporting undoable operations.
Key Properties
Related
- Memento (store state for undo)
- Chain of Responsibility (route commands)
- Strategy (similar encapsulation, different purpose)