
Command pattern
The Command pattern organizes actions as objects that encapsulate all the information needed to perform a task, such as the method to call, the target object, and parameters. This approach separates the request for an action from its execution, allowing for flexible control, such as queuing, logging, or undoing operations. It’s similar to placing a letter with instructions in an envelope; the envelope is the command object that can be stored, sent, or processed later, enabling more modular and manageable software design.