add Builder pattern

This commit is contained in:
Jakub Vojvoda
2016-09-07 09:19:54 +02:00
parent af189c7a85
commit 80dc58f7d5
2 changed files with 161 additions and 0 deletions

12
builder/README.md Normal file
View File

@@ -0,0 +1,12 @@
## Builder
Builder pattern has creational purpose and separates the construction of a complex object
from its representation so that the same construction process can create different
representations. It is object pattern, ie. relationships can be changed at run-time
and are more dynamic. Often is used for building composite structures but constructing
objects requires more domain knowledge of the client than using a Factory.
### When to use
* the algorithm for creating a object should be independent of the parts and how they're assembled
* the construction process must allow different representations for the object that's constructed