Command Design Pattern In Python

Veröffentlicht am: 10 April 2019
auf dem Kanal: SBCODE
4,866
110

Command Design Pattern Article :   / command-design-pattern-in-python  

Documentation : https://sbcode.net/python/command/

Design Patterns In Python Book : https://www.amazon.com/dp/B08XLJ8Z2J

The Command Design Pattern in Python
The command pattern is a behavioural design pattern,
in which an abstraction exists between an object that invokes a command, and the object that performs it.

The components if the Command Design Pattern are,
The Receiver - The Object that will receive and execute the command
The Invoker - Which will send the command to the receiver
The Command Object - Itself, which implements an execute, or action method,
and contains all required information or module which is aware of
the Receiver, Invoker and Commands

Eg, a button, will call the Invoker, which will call a pre registered Commands execute method,
which will perform the action on the Receiver.

Notes:
The receiver object should manages it's own state, not the command object
There can be one or more invokers which can execute the command at a later date.

(Book) Sometimes you just want to switch off your computer and read from a book. So, all GoF patterns are discussed in my Design Patterns In Python book
https://www.amazon.com/dp/B08XLJ8Z2J : ASIN B08XLJ8Z2J


Auf dieser Seite können Sie das Online-Video Command Design Pattern In Python mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer SBCODE 10 April 2019 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 4,866 Mal angesehen und es wurde von 110 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!