Quantcast
Channel: What are the differences between Abstract Factory and Factory design patterns? - Stack Overflow
Viewing all articles
Browse latest Browse all 22

Answer by Moshe for What are the differences between Abstract Factory and Factory design patterns?

$
0
0

My conclusion: there is no difference. Why? Because I cannot see any justification to equip objects other than factories with factory methods - otherwise you get a violation of the separation of responsibility principle. In addition, I cannot see any difference between a factory with a single factory method and a factory with multiple factory methods: both create "families of related objects" unless anyone can prove that a single-family-member family is not a family. Or a collection that contains a single item is not a collection.


Viewing all articles
Browse latest Browse all 22

Trending Articles