Facade pattern

related topics
{math, number, function}
{system, computer, user}
{church, century, christian}
{school, student, university}

The facade pattern is a software engineering design pattern commonly used with Object-oriented programming. (The name is by analogy to an architectural facade.)

A facade is an object that provides a simplified interface to a larger body of code, such as a class library. A facade can:

  • make a software library easier to use, understand and test, since the facade has convenient methods for common tasks;
  • make code that uses the library more readable, for the same reason;
  • reduce dependencies of outside code on the inner workings of a library, since most code uses the facade, thus allowing more flexibility in developing the system;
  • wrap a poorly-designed collection of APIs with a single well-designed API (as per task needs).

An Adapter is used when the wrapper must respect a particular interface and must support a polymorphic behavior. On the other hand, a facade is used when one wants an easier or simpler interface to work with.

From the French "façade", pronounced /fəˈsɑːd/, wherein the "ç" diacritical (pronounced "sɑ") has been dropped according to Anglicization conventions.

Structure

FacadeDesignPattern.png

Example

This is an abstract example of how a client ("you") interacts with a facade (the "computer") to a complex system (internal computer parts, like CPU and HardDrive).

Full article ▸

related documents
Shotgun debugging
Object-oriented programming language
Quick-and-dirty
Kilobyte
Wikipedia:Free On-line Dictionary of Computing/X - Z
Metaphone
Unix billennium
Unavailability
Structure and Interpretation of Computer Programs
SISAL
Super-Poulet number
Inductive logic programming
Ninety-ninety rule
Classical logic
UnrealScript
Gauss–Markov process
August Ferdinand Möbius
Semivariance
Mathematical constants (sorted by continued fraction representation)
Wilhelm Ackermann
Vladimir Voevodsky
Type 1 encryption
National Center for Biotechnology Information
Principle of least astonishment
Cypherpunk anonymous remailer
Hill system
Numbering plan
Code word
The Free Software Definition
John Koza