> Design Patterns > Facade Design Pattern
Facade design pattern is used to provide simple interface to use an existing system in an easy way.
The intent of facade design pattern is to provide unified interface for a set of interfaces of subsystem to make it easy to use.
The client has to use multiple interfaces of different subsystem classes to use the existing subsystem. This makes using the subsystem complex as the number of interfaces grow.
The new simplified interface will use the existing subsystem interfaces. It will be easy for client to use the new interface instead of using the multiple subsystem interfaces and going into detail of knowing the existing subsystem working and how the whole things are related.
Here is the facade design pattern example.
There are components lexical analyzer, parser, code generator, archiver. A tool is required to compile, build, create library. It will be difficult to use them for user, so provide simple interface in tool for user.
C++ | Facade Pattern in C++ | Facade Pattern C++ Example |
C# | Facade Pattern in C# | Facade Pattern C# Example |
Java | Facade Pattern in Java | Facade Pattern Java Example |
Python | Facade Pattern in Python | Facade Pattern Python Example |
JavaScript | Facade Pattern in JavaScript | Facade Pattern JavaScript Example |
PHP | Facade Pattern in PHP | Facade Pattern PHP Example |
Ruby | Facade Pattern in Ruby | Facade Pattern Ruby Example |
Swift | Facade Pattern in Swift | Facade Pattern Swift Example |
Objective-C | Facade Pattern in Objective-C | Facade Pattern Objective-C Example |