The Facade Design Pattern (I)
9 March 2008The Facade Design Pattern is a structural design pattern amongst the design patterns. A facade is actually an object. It provides an uncomplicated interface to a larger body of code, for example a class library.
As a facade has simple and tailored methods for common tasks. A facade can make a software library easier to use and understand. A facade also makes the code that uses the library more readable. A facade assists in developing a more flexible system. It reduces dependencies of outside code on the inner workings of a library. According to the requirement, the Facade Design Pattern wrap a poorly designed collection of APIs with a single well-designed API.
Choosing between Facade and Adapter
There is a definite difference between the Facade and Adapter. A facade is a better choice when one wants an easier or simpler interface to work with. Where as the Adapter Design Pattern is used when wrapper must support a polymorphic behavior and wrapper must respect a particular interface.
Do read the next one on this topic.
Related Posts:
- Singleton - Creational Design Pattern (I)
- The Facade Design Pattern (II)
- The Strategy Design Pattern in Java(I)
- Adapter design pattern (II)
- The Observer Design Pattern(I)
- Adapter design pattern
- Design Patterns - Basics (I)
- The Strategy Design Pattern in Java(II)
- Singleton - Creational Design Pattern (II)
- Behavioral Pattern - Iterator Pattern (Example) - 1
Top Of Page | Trackback
If you found this page useful, consider linking to it. Simply copy and paste the code below into your web site.
It will look like this: The Facade Design Pattern (I)