Middle
Why is the Command pattern needed?
sobes.tech AI
Answer from AI
The Command pattern encapsulates a request as an object, allowing:
- Parameterizing clients with different requests.
- Queuing or logging requests.
- Supporting undoable operations.
This is achieved by separating the sender of the request from its receiver.