Intent
Encapsulate a request as an object, thereby letting you parameterise client with different requests, queue or log requests, and support undo-able operations.
Encapsulate a request as an object, thereby letting you parameterise client with different requests, queue or log requests, and support undo-able operations.
Why is this used?
This is a way for us to have a common interface to the behaviour of many different receivers each with its own set of actions.
This is a way for us to have a common interface to the behaviour of many different receivers each with its own set of actions.
UML diagram representation
https://www.codeproject.com/KB/Blogs/186192/1.jpg
https://www.codeproject.com/KB/Blogs/186192/1.jpg
Source code example
https://www.tutorialspoint.com/design_pattern/command_pattern.htm
More to follow...
No comments:
Post a Comment