Hi,I have a question about patterns.I have really problems with design patterns Can you tell me the difeerences between facade pattern with builder,factory and abstract factory pattern?
The Facade pattern abstracts details away from the developer and makes a certain portion of code easier to use.
The Builder pattern seperates the construction of an object from its representation. That makes it possible to use the same construction process across multiple types.
The Factory and Abstract Factory both deal with instanciating a related set of classes based on certain parameters used when the call to the Factory is made.
The facade pattern is used when you want to hide an implementation or otherwise make available a different interface externally. The builder/factory pattern is used when you want to hide the details on constructing instances.
Those and also other patterns might often look quite similar. The difference is in the design decisions you made to use a pattern.
Facade is about changing interface of some class or set of classes. Builder hides the process of construction by decomposing it in smaller steps. Factories are about hiding the concrete implementation of instation of object or object graph.
The confusion might come from the fact, that often Builder in a way changes interface of an object to allow better way of construction, which could be also done by a Facade. Similar it is with Factories.
So don't forget about small differences in implementation of those patterns and that the most important part about design patterns are the design decision you make.