I'm not asking the interview point of view. What is the real time scenario of implementing it in the projects, like the Struts framework, etc.?

- 30,738
- 21
- 105
- 131

- 1,287
- 4
- 14
- 28
-
3They are different enough to belong to distinct *categories*: one is structural, the other creational. – Marko Topolnik Jun 25 '12 at 11:59
2 Answers
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.

- 18,333
- 31
- 67
- 74

- 4,091
- 4
- 20
- 27
They are two patterns used for to solve two different problems and they are totally 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.

- 131,802
- 30
- 241
- 343