@@ -9,36 +9,55 @@ comments at the bottom up to date.
9
9
10
10
Current Patterns:
11
11
12
+ __ Creational Patterns__ :
13
+
12
14
| Pattern | Description |
13
15
| :-------:| ----------- |
14
- | [ 3-tier] ( 3-tier.py ) | data<->business logic<->presentation separation (strict relationships) |
15
16
| [ abstract_factory] ( abstract_factory.py ) | use a generic function with specific factories |
16
- | [ adapter] ( adapter.py ) | adapt one interface to another using a whitelist |
17
17
| [ borg] ( borg.py ) | a singleton with shared-state among instances |
18
+ | [ builder] ( builder.py ) | instead of using multiple constructors, builder object receives parameters and returns constructed objects |
19
+ | [ factory_method] ( factory_method.py ) | delegate a specialized function/method to create instances |
20
+ | [ lazy_evaluation] ( lazy_evaluation.py ) | lazily-evaluated property pattern in Python |
21
+ | [ pool] ( pool.py ) | preinstantiate and maintain a group of instances of the same type |
22
+ | [ prototype] ( prototype.py ) | use a factory and clones of a prototype for new instances (if instantiation is expensive) |
23
+
24
+ __ Structural Patterns__ :
25
+
26
+ | Pattern | Description |
27
+ | :-------:| ----------- |
28
+ | [ 3-tier] ( 3-tier.py ) | data<->business logic<->presentation separation (strict relationships) |
29
+ | [ adapter] ( adapter.py ) | adapt one interface to another using a white-list |
18
30
| [ bridge] ( bridge.py ) | a client-provider middleman to soften interface changes |
19
- | [ builder] ( builder.py ) | call many little discrete methods rather than having a huge number of constructor parameters |
20
- | [ catalog] ( catalog.py ) | general methods will call different specialized methods based on construction parameter |
21
- | [ chain] ( chain.py ) | apply a chain of successive handlers to try and process the data |
22
- | [ chaining_method] ( chaining_method.py ) | continue callback next object method |
23
- | [ command] ( command.py ) | bundle a command and arguments to call later |
24
31
| [ composite] ( composite.py ) | encapsulate and provide access to a number of different objects |
25
32
| [ decorator] ( decorator.py ) | wrap functionality with other functionality in order to affect outputs |
26
33
| [ facade] ( facade.py ) | use one class as an API to a number of others |
27
- | [ factory_method] ( factory_method.py ) | delegate a specialized function/method to create instances |
28
- | [ front_controller] ( front_controller.py ) | single handler requests coming to the application |
29
34
| [ flyweight] ( flyweight.py ) | transparently reuse existing instances of objects with similar/identical state |
30
- | [ graph_search] ( graph_search.py ) | (graphing algorithms, not design patterns) |
31
- | [ lazy_evaluation] ( lazy_evaluation.py ) | lazily-evaluated property pattern in Python |
35
+ | [ front_controller] ( front_controller.py ) | single handler requests coming to the application |
36
+ | [ mvc] ( mvc.py ) | model<->view<->controller (non-strict relationships) |
37
+ | [ proxy] ( proxy.py ) | an object funnels operations to something else |
38
+
39
+ __ Behavioral Patterns__ :
40
+
41
+ | Pattern | Description |
42
+ | :-------:| ----------- |
43
+ | [ chain] ( chain.py ) | apply a chain of successive handlers to try and process the data |
44
+ | [ catalog] ( catalog.py ) | general methods will call different specialized methods based on construction parameter |
45
+ | [ chaining_method] ( chaining_method.py ) | continue callback next object method |
46
+ | [ command] ( command.py ) | bundle a command and arguments to call later |
32
47
| [ mediator] ( mediator.py ) | an object that knows how to connect other objects and act as a proxy |
33
48
| [ memento] ( memento.py ) | generate an opaque token that can be used to go back to a previous state |
34
- | [ mvc] ( mvc.py ) | model<->view<->controller (non-strict relationships) |
35
49
| [ observer] ( observer.py ) | provide a callback for notification of events/changes to data |
36
- | [ pool] ( pool.py ) | preinstantiate and maintain a group of instances of the same type |
37
- | [ prototype] ( prototype.py ) | use a factory and clones of a prototype for new instances (if instantiation is expensive) |
38
- | [ proxy] ( proxy.py ) | an object funnels operations to something else |
39
50
| [ publish_subscribe] ( publish_subscribe.py ) | a source syndicates events/data to 0+ registered listeners |
51
+ | [ registry] ( registry.py ) | keep track of all subclasses of a given class |
40
52
| [ specification] ( specification.py ) | business rules can be recombined by chaining the business rules together using boolean logic |
41
- | [ state] ( state.py ) | logic is org'd into a discrete number of potential states and the next state that can be transitioned to |
53
+ | [ state] ( state.py ) | logic is organized into a discrete number of potential states and the next state that can be transitioned to |
42
54
| [ strategy] ( strategy.py ) | selectable operations over the same data |
43
55
| [ template] ( template.py ) | an object imposes a structure but takes pluggable components |
44
56
| [ visitor] ( visitor.py ) | invoke a callback for all items of a collection |
57
+
58
+
59
+ __ Others__ :
60
+
61
+ | Pattern | Description |
62
+ | :-------:| ----------- |
63
+ | [ graph_search] ( graph_search.py ) | (graphing algorithms, not design patterns) |
0 commit comments