Skip to content

Commit

Permalink
add patterns elemenents
Browse files Browse the repository at this point in the history
  • Loading branch information
sensorario committed May 31, 2019
1 parent 4a2c371 commit 1495e91
Show file tree
Hide file tree
Showing 12 changed files with 77 additions and 2 deletions.
6 changes: 6 additions & 0 deletions behavioral/chain/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Chain of responsibility

## Elements

- Handler
- RequestHandler
- Client

## Description

It consists of a source of command objects and a series of processing objects.
Expand Down
6 changes: 6 additions & 0 deletions behavioral/mediator/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Behavioral » Mediator

## Elements

- Mediator
- Concrete Mediator
- Colleague Class

## Description

It defined an object that encapsulate the manner of how a set of objects
Expand Down
6 changes: 6 additions & 0 deletions behavioral/memento/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Behavioral » Memento

## Elements

- Memento
- Originator
- Caretaker

## Description

The memento pattern provides the ability to restore an object to of its
Expand Down
7 changes: 7 additions & 0 deletions behavioral/observer/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Behavioral » Observer

## Elements

- Observable
- ConcreteObservable
- Observer
- ConcreteObserver

## Description

This pattern uncouple an event from its possible handlers. It is useful to
Expand Down
8 changes: 8 additions & 0 deletions concurrency/pipeline/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Concurrency » Pipeline

## Elements

- Visitor
- ConcreteVisitor
- Visitable
- ConcreteVisitable
- ObjectStructure

## Description

A pipeline consists of a chain of elements arranged so that the output of each
Expand Down
8 changes: 8 additions & 0 deletions creational/abstract_factory/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Creational » Abstract Factory

## Elements

- AbstractFactory
- ConcreteFactory
- AbstactProduct
- Product
- Client

## Description

The difference from factory design pattern is that with this pattern it is possible to manage complex data type.
Expand Down
7 changes: 7 additions & 0 deletions creational/builder/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Creational » Builder

## Elements

- Builder
- ConcreteBuilder
- Director
- Product

## Description

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.
Expand Down
6 changes: 6 additions & 0 deletions creational/prototype/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Creational » Prototype

## Elements

- Client
- Prototype
- ConcretePrototype

## Description

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.
Expand Down
9 changes: 9 additions & 0 deletions structural/bridge/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
# Bridge

## Elements

- Abstraction
- AbstractionImplementation
- Implementor
- ConcreteImplementor

## Description

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.

9 changes: 9 additions & 0 deletions structural/composite/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# Composite

## Elements

- Component
- Leaf
- Composite
- Client

## Description

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.
5 changes: 4 additions & 1 deletion structural/flyweight/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

## Elements

*to do*
- Flyweight
- ConcreteFlyweight
- FlyweightFactoy
- Client

## Dscription

Expand Down
2 changes: 1 addition & 1 deletion structural/proxy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

- Proxy
- RealSubject
- Client
- Subject

## Description

Expand Down

0 comments on commit 1495e91

Please sign in to comment.