issue #333 diagrams and index added

This commit is contained in:
Crossy147
2016-02-15 20:37:16 +01:00
parent 10bbf988ea
commit 022ab28e20
15 changed files with 159 additions and 134 deletions

View File

@ -10,21 +10,18 @@ tags:
- Functional
---
## Also known as
Virtual Constructor
## Intent
Define factory of immutable content with separated builder and factory interfaces.
![alt text](./etc/factory-kit_1.png "Factory Kit")
![alt text](./etc/factory-kit.png "Factory Kit")
## Applicability
Use the Factory Kit pattern when
* a class can't anticipate the class of objects it must create
* you just want a new instance of custom builder instead of global one
* a class wants its subclasses to specify the objects it creates
* classes delegate responsibility to one of several helper subclasses, and you want to localize the knowledge of which helper subclass is the delegate
* you just want a new instance of a custom builder instead of the global one
* you explicitly want to define types of objects, that factory can build
* you want a separated builder and creator interface
## Credits