The Facade Pattern

The Façade pattern enables us to use a complex system more easily, either to use just a subset of the system or to use the system in a particular way. You would use this pattern if you had a complicated system and wanted an easy to use interface to it, or to have a customised way of using it.

UML Class diagram of the facade pattern

Key Features

Intent
you want to simplify how to use an existing system. You need to define your own interface.
Problem
you need to use only a subset of a complex system, or you need to interact with a system in a particular way.
Solution
the Façade presents a new simpler interface for the client of the existing system and reduces the number of objects to deal with.
Consequences
certain functionality may not be available to the client, but also new methods can be written for new functionality. It may also be used to hide or encapsulate the system.

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <c>, <cpp>, <drupal5>, <drupal6>, <java>, <javascript>, <php>, <python>, <ruby>. The supported tag styles are: <foo>, [foo].
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.