You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 25d3a5c
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: src/SoftwarePatterns.Core/PatternList.txt
+19-14Lines changed: 19 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,10 @@ Factory method:
10
10
Define an interface for creating a single object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses.
11
11
Lazy Loading
12
12
Tactic of delaying the creation of an object, the calculation of a value, or some other expensive process until the first time it is needed.
13
-
13
+
Prototype
14
+
Specify the kinds of objects to create using a prototypical instance, and create new objects by copying this prototype.
15
+
Singleton
16
+
Ensure a class has only one instance, and provide a global point of access to it.
14
17
15
18
Structural patterns:
16
19
@@ -20,31 +23,33 @@ Bridge
20
23
Decouple an abstraction from its implementation allowing the two to vary independently.
21
24
Composite
22
25
Compose objects into tree structures to represent part-whole hierarchies. Composite lets clients treat individual objects and compositions of objects uniformly.
23
-
Decorator:
26
+
Decorator
24
27
Attach additional responsibilities to an object dynamically keeping the same interface. Decorators provide a flexible alternative to sub classing for extending functionality.
25
-
Facade:
28
+
Facade
26
29
Provide a unified interface to a set of interfaces in a subsystem. Facade defines a higher-level interface that makes the subsystem easier to use.
27
-
Flyweight:
30
+
Flyweight
28
31
Use sharing to support large numbers of similar objects efficiently.
29
-
Proxy:
32
+
Proxy
30
33
Provide a surrogate or placeholder for another object to control access to it. (Also used in lazy loading)
31
34
32
35
33
36
Behavioural patterns:
34
37
35
-
Chain of responsibility:
38
+
Chain of responsibility
36
39
Avoid coupling the sender of a request to its receiver by giving more than one object a chance to handle the request. Chain the receiving objects and pass the request along the chain until an object handles it.
37
-
Command:
40
+
Command
38
41
Encapsulate a request as an object, thereby letting you parameterize clients with different requests, queue or log requests, and support undoable operations.
39
-
Interpreter:
42
+
Interpreter
40
43
Given a language, define a representation for its grammar along with an interpreter that uses the representation to interpret sentences in the language.
41
-
Iterator:
44
+
Iterator
42
45
Provide a way to access the elements of an aggregate object sequentially without exposing its underlying representation.
43
-
Mediator:
46
+
Mediator
44
47
Define an object that encapsulates how a set of objects interact. Mediator promotes loose coupling by keeping objects from referring to each other explicitly, and it lets you vary their interaction independently.
45
-
Memento:
48
+
Memento
46
49
Without violating encapsulation, capture and externalize an object's internal state allowing the object to be restored to this state later. Yes No N/A
47
-
Null object:
50
+
Null object
48
51
Avoid null references by providing a default object.
49
-
Observer or Publish/subscribe:
50
-
Define a one-to-many dependency between objects where a state change in one object results in all its dependents being notified and updated automatically.
52
+
Observer or Publish/subscribe
53
+
Define a one-to-many dependency between objects where a state change in one object results in all its dependents being notified and updated automatically.
54
+
State
55
+
Allow an object to alter its behaviour when its internal state changes. The object will appear to change its class.
0 commit comments