Tuesday, November 3, 2015

Facade Design Pattern ( façade pattern)

A design pattern is a common way of solving a recurring problem. Classes in all design patterns are just normal classes. What is important is how they are structured and how they work together to solve a given problem in the best possible way.



  A Facade shields the user from the complex details of the system and provides them with a simplified view of it which is easy to use  It also decouples the code that uses the system from the details of the subsystems, making it easier to modify the system later.

  Facade design pattern is commonly used with Object Oriented Programming.  It Provide a unified interface to a set of interfaces in a sub system. Facade defines a higher-level interface that makes the sub system easier to use. 

Structure of Facade


Fig 1-1







Facade
The facade class abstracts Packages 1, 2, and 3 from the rest of the application.
Clients
The objects are using the Facade Pattern to access resources from the Packages.



References:
Fig 1-1 "Example of Facade design pattern in UML" by Fuhrmanator 
https://en.wikipedia.org/wiki/Facade_pattern :Facade Design Pattern From Wikipedia, the free encyclopedia

No comments:

Post a Comment