> For the complete documentation index, see [llms.txt](https://anon-coders-notes.gitbook.io/techwriterdev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://anon-coders-notes.gitbook.io/techwriterdev/softwareengineering/designpatterns/notes/04_structural/facade.md).

# Facade

## Intent

* Provide an unified interface to a set of interfaces in a subsystem. Façade defines a higher-level interface that makes the subsystem easier to use.

## Problem

* How can a simple interface be provided for a complex subsystem?
* How can tight coupling between clients and the objects in a subsystem be avoided?

## Solution

* Define a separate Facade object that provides an unified interface for a set of interfaces in a subsystem.
* Work through a façade to minimize dependencies on a subsystem.

## Advantages

✅ Decouples clients from a subsystem.\
✅ Decouples subsystems.<br>

## When to use

* A simple interface is required to access a complex system.
* A system is very complex or difficult to understand.
* When an entry point is needed to each level of layered software.
* When the abstractions and implementations of a subsystem are tightly coupled.

## Notes

* Logging functionality is a good example of façade design pattern. Example being, *Logback* in java.
