What is the differences between facade pattern and abstarct factory pattern?

The facade pattern is used when you want to hide an implementation or it is about changing interface of some class or set of classes. Builder hides the process of construction by decomposing it in smaller steps.

Abstract factory pattern is used when you want to hide the details on constructing instances.
Provide an interface for creating families of related or dependent objects without specifying their concrete classes.


I don't know, why this was voted negatively. This is a legitimate question.

My take - A facade is a class or a group of classes hiding internal implementation/services from the user.

An abstract factory encapsulates a group of factories which are used for creating objects, whereas Facade can be used to provide abstraction to all kinds of operations, not just creation.


They are two patterns used for thing thats that are completely unrelated.

With the Abstract Factory Pattern you just provide a common factory builder for many different builders for the same thing. This can be used whenever you need to provide an interface to a set of builders meant to be used with something in common (the product) without bothering on what are you going to build or which factory are you going to use.

The Facade pattern instead is used to provide a simple interface to a lot of different operations that the client classes should not see.