What is the purpose of the Command pattern?
- To allow for loose coupling between the sender of a request and its receivers.
- To allow sending requests to objects without knowing anything about the operation being requested or the receiver of the request.
- To convert the interface of a class into another interface clients expect.
- To provide a unified interface to a set of interfaces in a subsystem.
The Command pattern is used to allow sending requests to objects without knowing anything about the operation being requested or the receiver of the request. It provides a way to queue or log requests and acts as a marshal between the sender and the receiver.
Loading...