Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Define: 
The factory pattern deals with the problem of creating objects (products) without specifying the exact class of object that will be create

Usage:
Unsure what concrete class to create
Separate creation from representation of object.
To Remove large if/else blocks or switches
Add new functionality without breaking the open closed principle
When we want to store class creation in external configuration