Command Pattern
The Command Pattern is a behavioral design pattern that encapsulates a request as an object, allowing for parameterization of clients with queues, requests, and operations. This pattern decouples the sender of a request from its receiver, enabling more flexible and extensible code.
In this pattern, commands are represented as objects, which can be stored, logged, or undone. This is particularly useful in scenarios like implementing undo functionality in applications or managing complex transactions, where commands can be executed, reversed, or queued for later execution.