Skip to content

Commit 1495e91

Browse files
committed
add patterns elemenents
1 parent 4a2c371 commit 1495e91

File tree

12 files changed

+77
-2
lines changed

12 files changed

+77
-2
lines changed

behavioral/chain/README.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Chain of responsibility
22

3+
## Elements
4+
5+
- Handler
6+
- RequestHandler
7+
- Client
8+
39
## Description
410

511
It consists of a source of command objects and a series of processing objects.

behavioral/mediator/README.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Behavioral » Mediator
22

3+
## Elements
4+
5+
- Mediator
6+
- Concrete Mediator
7+
- Colleague Class
8+
39
## Description
410

511
It defined an object that encapsulate the manner of how a set of objects

behavioral/memento/README.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Behavioral » Memento
22

3+
## Elements
4+
5+
- Memento
6+
- Originator
7+
- Caretaker
8+
39
## Description
410

511
The memento pattern provides the ability to restore an object to of its

behavioral/observer/README.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Behavioral » Observer
22

3+
## Elements
4+
5+
- Observable
6+
- ConcreteObservable
7+
- Observer
8+
- ConcreteObserver
9+
310
## Description
411

512
This pattern uncouple an event from its possible handlers. It is useful to

concurrency/pipeline/README.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Concurrency » Pipeline
22

3+
## Elements
4+
5+
- Visitor
6+
- ConcreteVisitor
7+
- Visitable
8+
- ConcreteVisitable
9+
- ObjectStructure
10+
311
## Description
412

513
A pipeline consists of a chain of elements arranged so that the output of each

creational/abstract_factory/README.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Creational » Abstract Factory
22

3+
## Elements
4+
5+
- AbstractFactory
6+
- ConcreteFactory
7+
- AbstactProduct
8+
- Product
9+
- Client
10+
311
## Description
412

513
The difference from factory design pattern is that with this pattern it is possible to manage complex data type.

creational/builder/README.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Creational » Builder
22

3+
## Elements
4+
5+
- Builder
6+
- ConcreteBuilder
7+
- Director
8+
- Product
9+
310
## Description
411

512
The Builder is a pattern used to build objects. Objects in go can be created with just {}. But in Go is possible to create objects composed by other objects. This is really idiomatic in go, as it doesn't support inheritance.

creational/prototype/README.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Creational » Prototype
22

3+
## Elements
4+
5+
- Client
6+
- Prototype
7+
- ConcretePrototype
8+
39
## Description
410

511
With this pattern, is used an already created instance of some type to clone it and complete it with the particular needs of each context. Objects to clone are created at compilation time and can be cloned as many times it is needed at runtime.

structural/bridge/README.md

+9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
# Bridge
22

3+
## Elements
4+
5+
- Abstraction
6+
- AbstractionImplementation
7+
- Implementor
8+
- ConcreteImplementor
9+
10+
## Description
11+
312
This design pattern is used to "decouple an abstraction from its implementation so that the two can vary independently". The bridge uses encapsulation, aggregation, and can use inheritance to separate responsibilities into different classes.
413

structural/composite/README.md

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
11
# Composite
22

3+
## Elements
4+
5+
- Component
6+
- Leaf
7+
- Composite
8+
- Client
9+
10+
## Description
11+
312
In software engineering, the composite pattern is a partitioning design pattern. The composite pattern describes a group of objects that is treated the same way as a single instance of the same type of object. The intent of a composite is to "compose" objects into tree structures to represent part-whole hierarchies. Implementing the composite pattern lets clients treat individual objects and compositions uniformly.

structural/flyweight/README.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22

33
## Elements
44

5-
*to do*
5+
- Flyweight
6+
- ConcreteFlyweight
7+
- FlyweightFactoy
8+
- Client
69

710
## Dscription
811

structural/proxy/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
- Proxy
66
- RealSubject
7-
- Client
7+
- Subject
88

99
## Description
1010

0 commit comments

Comments
 (0)