Home  /  Questions  /  Question

50   50
Aug 09, 2011

Abstract factory vs Factory Pattern

How does one differentiate Abstract Factory against Factory Method?
Thanks in advance.

108   96.7
Aug 19, 2011
Abstract Factory is used to create a set of abstractions. 

You use the Factory Method to create and hide the creation of one object of a set of classes that implement the same interface.

In very simple terms: think about Abstract Factory like a set of several Factory Methods.

You use an Abstract Factory for something like this:

Software Abstraction Layer