Design Patterns - Command

Encapsulate a request in an object so you can parameterize every aspect of it, like the sender or the receiver, type of request, etc.

This can be very handy if you want to enable the option to ‘Undo’ operations. You implement an Undo operation in every command, and store the commands somewhere where it can be retrieved. You probably will need the context or snapshot of the state of the program to be able to undo things too, for example, by using the “Memento” pattern. 20210409012134

Notes References

20210409012134 Design Patterns - Memento

20210408132546 Computer Science - Design patterns

References