@@ -8,32 +8,34 @@ rerun `append_output.sh` to keep the output comments at the bottom up to date.
88
99Current Patterns:
1010
11- * 3-tier
12- * abstract_factory
13- * adapter
14- * borg
15- * bridge
16- * builder
17- * catalog
18- * chain
19- * command
20- * composite
21- * decorator
22- * facade
23- * factory_method
24- * flyweight
25- * graph_search
26- * iterator
27- * mediator
28- * memento
29- * mvc
30- * null
31- * observer
32- * pool
33- * prototype
34- * proxy
35- * publish_subscribe
36- * state
37- * strategy
38- * template
39- * visitor
11+ | Pattern | Description |
12+ | :-------:| ----------- |
13+ | [ 3-tier] ( 3-tier.py ) | data<->business logic<->presentation separation (strict relationships) |
14+ | [ abstract_factory] ( abstract_factory.py ) | use a generic function with specific factories |
15+ | [ adapter] ( adapter.py ) | adapt one interface to another using a whitelist |
16+ | [ borg] ( borg.py ) | a singleton with shared-state among instances |
17+ | [ bridge] ( bridge.py ) | a client-provider middleman to soften interface changes |
18+ | [ builder] ( builder.py ) | call many little discrete methods rather than having a huge number of constructor parameters |
19+ | [ catalog] ( catalog.py ) | general methods will call different specialized methods based on construction parameter |
20+ | [ chain] ( chain.py ) | apply a chain of successive handlers to try and process the data |
21+ | [ command] ( command.py ) | bundle a command and arguments to call later |
22+ | [ composite] ( composite.py ) | encapsulate and provide access to a number of different objects |
23+ | [ decorator] ( decorator.py ) | wrap functionality with other functionality in order to affect outputs |
24+ | [ facade] ( facade.py ) | use one class as an API to a number of others |
25+ | [ factory_method] ( factory_method.py ) | delegate a specialized function/method to create instances |
26+ | [ flyweight] ( flyweight.py ) | transparently reuse existing instances of objects with similar/identical state |
27+ | [ graph_search] ( graph_search.py ) | (graphing algorithms, not design patterns) |
28+ | [ iterator] ( iterator.py ) | structure repeated, identical calls as a generator |
29+ | [ mediator] ( mediator.py ) | an object that knows how to connect other objects and act as a proxy |
30+ | [ memento] ( memento.py ) | generate an opaque token that can be used to go back to a previous state |
31+ | [ mvc] ( mvc.py ) | model<->view<->controller (non-strict relationships) |
32+ | [ null] ( null.py ) | (no clear use in modern Python) |
33+ | [ observer] ( observer.py ) | provide a callback for notification of events/changes to data |
34+ | [ pool] ( pool.py ) | preinstantiate and maintain a group of instances of the same type |
35+ | [ prototype] ( prototype.py ) | use a factory and clones of a prototype for new instances (if instantiation is expensive) |
36+ | [ proxy] ( proxy.py ) | an object funnels operations to something else |
37+ | [ publish_subscribe] ( publish_subscribe.py ) | a source syndicates events/data to 0+ registered listeners |
38+ | [ state] ( state.py ) | logic is org'd into a discrete number of potential states and the next state that can be transitioned to |
39+ | [ strategy] ( strategy.py ) | selectable operations over the same data |
40+ | [ template] ( template.py ) | an object imposes a structure but takes pluggable components |
41+ | [ visitor] ( visitor.py ) | invoke a callback for all items of a collection |
0 commit comments