-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsummary_index.json
More file actions
170 lines (170 loc) · 7.2 KB
/
summary_index.json
File metadata and controls
170 lines (170 loc) · 7.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
[
{
"file": "behavioral/chain_of_responsibility.py",
"chunk": "behavioral_chain_of_responsibility.md",
"pattern": "Chain Of Responsibility",
"summary": "Implementation of the Chain of Responsibility pattern in Python, demonstrating a request-passing mechanism through a series of handlers."
},
{
"file": "behavioral/command.py",
"chunk": "behavioral_command.md",
"pattern": "Command",
"summary": "Implementation of the Command Design Pattern in Python"
},
{
"file": "behavioral/interpreter.py",
"chunk": "behavioral_interpreter.md",
"pattern": "Interpreter",
"summary": "This code defines a simple interpreter for a basic arithmetic language using the Interpreter pattern."
},
{
"file": "behavioral/memento.py",
"chunk": "behavioral_memento.md",
"pattern": "Memento",
"summary": "Implements the Memento design pattern for a text editor, allowing state restoration and undo functionality."
},
{
"file": "behavioral/observer.py",
"chunk": "behavioral_observer.md",
"pattern": "Observer",
"summary": "This code implements the Observer design pattern using Python. It defines an interface for observing state changes, a subject that maintains a list of observers and notifies them of state changes, and concrete observers that implement the update method to react to notifications."
},
{
"file": "behavioral/sentinel.py",
"chunk": "behavioral_sentinel.md",
"pattern": "Sentinel",
"summary": "Demonstration of the Sentinel Object Pattern in Python."
},
{
"file": "behavioral/state.py",
"chunk": "behavioral_state.md",
"pattern": "State",
"summary": "Implementation of the State behavioral pattern in Python."
},
{
"file": "behavioral/strategy.py",
"chunk": "behavioral_strategy.md",
"pattern": "Strategy",
"summary": "This code demonstrates the Strategy pattern in Python, showcasing how different sorting strategies can be implemented and selected at runtime."
},
{
"file": "behavioral/template_method.py",
"chunk": "behavioral_template_method.md",
"pattern": "Template Method",
"summary": "This code demonstrates the Template Method design pattern using Python's ABC module. It defines an abstract base class with a template method that outlines the structure of an algorithm, leaving some steps to be implemented by subclasses."
},
{
"file": "behavioral/visitor.py",
"chunk": "behavioral_visitor.md",
"pattern": "Visitor",
"summary": "This code implements the Visitor design pattern to process different types of elements (ElementA and ElementB) without modifying their classes."
},
{
"file": "creational/abstract_factory.py",
"chunk": "creational_abstract_factory.md",
"pattern": "Abstract Factory",
"summary": "Abstract Factory pattern implementation in Python for creating GUI components."
},
{
"file": "creational/borg.py",
"chunk": "creational_borg.md",
"pattern": "Borg",
"summary": "Demonstration of the Borg pattern in Python, showcasing shared state across multiple instances."
},
{
"file": "creational/builder.py",
"chunk": "creational_builder.md",
"pattern": "Builder",
"summary": "Implementation of the Builder creational design pattern in Python."
},
{
"file": "creational/chaining.py",
"chunk": "creational_chaining.md",
"pattern": "Chaining",
"summary": "A Creational Design Pattern using Method Chaining and Fluent Interface\n\nPizzaBuilder Demo:\nThis script demonstrates the Builder Pattern with method chaining to configure a customizable pizza object. It includes validation, undo functionality, and is ideal for teaching fluent interface and creational design principles in Python."
},
{
"file": "creational/factory.py",
"chunk": "creational_factory.md",
"pattern": "Factory",
"summary": "Implementation of the Factory Method design pattern in Python."
},
{
"file": "creational/lazy_evaluation.py",
"chunk": "creational_lazy_evaluation.md",
"pattern": "Lazy Evaluation",
"summary": "Demonstrates the Lazy Evaluation pattern in Python using a custom @lazy_property decorator. This pattern delays the evaluation of a resource-intensive property until it is accessed, thus optimizing performance."
},
{
"file": "creational/prototype.py",
"chunk": "creational_prototype.md",
"pattern": "Prototype",
"summary": "Implements the Prototype design pattern to create new objects by copying a prototype object."
},
{
"file": "creational/singleton.py",
"chunk": "creational_singleton.md",
"pattern": "Singleton",
"summary": "This code implements the Singleton design pattern using a metaclass to ensure that only one instance of a class exists and provides a global point of access to it."
},
{
"file": "structural/adapter.py",
"chunk": "structural_adapter.md",
"pattern": "Adapter",
"summary": "Adapter Pattern Implementation in Python"
},
{
"file": "structural/bridge.py",
"chunk": "structural_bridge.md",
"pattern": "Bridge",
"summary": "This code demonstrates the Bridge design pattern, decoupling the rendering of shapes from their implementation. It includes abstract classes for Renderer and Shape, with concrete implementations for VectorRenderer and RasterRenderer. The Circle class is a refined abstraction that uses these renderers to draw shapes."
},
{
"file": "structural/composite.py",
"chunk": "structural_composite.md",
"pattern": "Composite",
"summary": "Implementation of the Composite Design Pattern in Python"
},
{
"file": "structural/decorator.py",
"chunk": "structural_decorator.md",
"pattern": "Decorator",
"summary": "Implementation of the Decorator Design Pattern in Python"
},
{
"file": "structural/facade.py",
"chunk": "structural_facade.md",
"pattern": "Facade",
"summary": "This code demonstrates the Facade design pattern, providing a simplified interface to complex subsystems."
},
{
"file": "structural/flyweight.py",
"chunk": "structural_flyweight.md",
"pattern": "Flyweight",
"summary": "Implementation of the Flyweight Design Pattern in Python to minimize memory usage by sharing common state among similar objects."
},
{
"file": "structural/global_object.py",
"chunk": "structural_global_object.md",
"pattern": "Global Object",
"summary": "This code demonstrates the Global Object Pattern, showcasing a shared configuration object accessible across modules."
},
{
"file": "structural/prebound_method.py",
"chunk": "structural_prebound_method.md",
"pattern": "Prebound Method",
"summary": "Demonstrates the Prebound Method pattern in Python to improve clarity, performance, and decouple method lookup. Compares calling methods with and without prebinding within a loop."
},
{
"file": "structural/proxy.py",
"chunk": "structural_proxy.md",
"pattern": "Proxy",
"summary": "Implementation of the Proxy design pattern in Python."
},
{
"file": "structural/three_tier.py",
"chunk": "structural_three_tier.md",
"pattern": "Three Tier",
"summary": "A self-contained demonstration of the 3-Tier Architecture pattern in Python, showcasing data, logic, and presentation layers."
}
]