What is this factory all about and what are the advantages of using factory patterns? Does it give a plugable architecture? Why it is called "Factory"?
Asked
Active
Viewed 9,229 times
2 Answers
5
It is factory since it is actually "Manufacturing" (Create) an object.
There's actually two kind of factory pattern defined by GoF:
Basically both of them tries to decouple the calling client from knowing the actual concrete implementation of the class/interface.

xandy
- 27,357
- 8
- 59
- 64
-
So this would be useful if you needed to account for the possibility that your model (in MVC) might change? Is there anything undesirable about creating a model in your application that is dynamic depending on the circumstances ? I'm guessing one downside is the added complexity of making sure that any permutations don't break your views or your controllers. – stonybrooklyn Jul 26 '17 at 16:10
3
-
2
-
1
-
Cached google result is still available (for now) https://webcache.googleusercontent.com/search?q=cache:ptz7qhMKFD0J:https://courses.cs.washington.edu/courses/cse403/07sp/lectures/design2.pdf%20&cd=1&hl=en&ct=clnk&gl=nl – Bob van Ham Mar 20 '18 at 08:06