Please enable JavaScript.
Coggle requires JavaScript to display documents.
Design patterns - Coggle Diagram
Design patterns
Pattern
-
ESSENTIAL PARTS
-
-
SOLUTION
describe the elements that make up the design, their relationships, responsibilities and collaborations
-
-
-
classification
SCOPE
classify
OBJECT PATTERN
WHAT
deal with object relationships, which can be changed at run-time and are more dynamic
-
-
PURPOSE
types
Creational
WHAT
-
These patterns outline a number of ways in which objects could be created and their lifecycles managed
( type of scope )
object
ABSTRACT FACTORY ( KIT )
what
provides an interface for creating families of related or dependent objects without specifying their concrete classes
SINGLETON
intent
Ensure a class has only one instance, and provide a global point of access to it
- 1 more item...
-
-
-
-
Behavioral
-
( type of scope )
object
-
-
Strategy or Policy
-
-
when to used it
When you have a part of your Class that's subject to change frequently or perhaps you have many related subclasses which only differ in behavior it's often a good time to consider using a Strategy pattern
What
Provide a way to access the elements of an aggregate object sequentially without exposing its underlying representation
-
-
-
-
-
-
Mediator (Intermediary, Controller)
-
-
intent :cloud:
lets you reduce chaotic dependencies between objects. The pattern restricts direct communications between the objects and forces them to collaborate only via a mediator object
-
-
-
Structural
WHAT
assemble objects and classes into larger structures while keeping these structures flexible and efficient
( type of scope )
-
object
Wrapper
Decorator
applicability
- 1 more item...
-
-
intent :cloud:
- 1 more item...
-
-
-
Facede
intent :cloud:
provides the user with a simple interface, while hiding it's underlying complexity
-
-
-
-
-
-
Composite (Object tree)
-
-
intent :cloud:
lets you compose objects into tree structures and then work with these structures as if they were individual objects
-
-
-
Flyweight (Cache)
-
-
intent :cloud:
lets you fit more objects into the available amount of RAM by sharing common parts of state between multiple objects instead of keeping all of the data in each object
-
-
Proxy
-
-
intent :cloud:
lets you provide a substitute or placeholder for another object. A proxy controls access to the original object, allowing you to perform something either before or after the request gets through to the original object
-
-
-