File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 2
2
Command pattern decouples the object invoking a job from the one who knows
3
3
how to do it. As mentioned in the GoF book, a good example is in menu items.
4
4
You have a menu that has lots of items. Each item is responsible for doing a
5
- special thing and you want your menu item just call the ` execute` method when
6
- it is pressed. To achieve this you implement a command object with the ` execute`
5
+ special thing and you want your menu item just call the execute method when
6
+ it is pressed. To achieve this you implement a command object with the execute
7
7
method for each menu item and pass to it.
8
8
9
9
*About the example
16
16
Object oriented implementation of callback functions.
17
17
18
18
*Examples in Python ecosystem:
19
- Django HttpRequest (without ` execute` method):
19
+ Django HttpRequest (without execute method):
20
20
https://docs.djangoproject.com/en/2.1/ref/request-response/#httprequest-objects
21
21
"""
22
22
You can’t perform that action at this time.
0 commit comments