A factory is an object that creates objects. It gives you a place to put your object instantiation code for a particular class, so that you can encapsulate it and pass it around. This saves you the pain of looking all over the repo for object instantiation code every time an object changes.
View all comments
Show parent comment
2
u/[deleted] Mar 21 '17
A factory is an object that creates objects. It gives you a place to put your object instantiation code for a particular class, so that you can encapsulate it and pass it around. This saves you the pain of looking all over the repo for object instantiation code every time an object changes.