# Facade Pattern

> One simple front for many parts. Callers need just one call.

**Field:** Software Development  
**Category:** Architecture  
**Also known as:** Facade Design Pattern, Façade Pattern, Facade

## Think of it like

It is like a TV remote. One button turns on the TV, the speaker and the box together.

## Definition

The facade pattern puts one simple interface in front of a group of complex parts. Callers use a few easy methods on the facade. The facade then calls the many classes behind it in the right order. The parts behind it still exist and can be used directly if needed. It hides detail, but it does not change what the parts do.

## Example

Emma's shop has an order facade with one method, place(). Behind it, place() checks stock, takes payment and books the delivery.

## Example code

```python
class OrderFacade:
    def place(self, cart, card):
        self.stock.reserve(cart)
        self.payments.charge(card, cart.total)
        return self.shipping.book(cart)
```

One call to place() runs three parts in the right order.

## Why it matters

Most code needs only the common path. A facade keeps that code short and keeps the messy parts in one place.

## Common mistake

Letting the facade grow until it does everything. Then it becomes one huge class that is hard to change.

## Three principles

- **One simple front.** A few easy methods.
- **The parts stay.** Still usable directly.
- **Hides, does not change.** Same parts behind it.

## Related terms

- [Design Pattern](https://learn.benibix.com/term/development/design-pattern)
- [Adapter Pattern](https://learn.benibix.com/term/development/adapter-pattern)
- [Decorator Pattern](https://learn.benibix.com/term/development/decorator-pattern)
- [Abstraction Layer](https://learn.benibix.com/term/development/abstraction-layer)
- [API Gateway](https://learn.benibix.com/term/development/api-gateway)
- [Separation of Concerns](https://learn.benibix.com/term/development/separation-of-concerns)

## Told apart from

- [Adapter Pattern vs Facade Pattern](https://learn.benibix.com/compare/adapter-pattern-vs-facade-pattern): People think an adapter and a facade are the same wrapper. An adapter wraps one thing so it fits a shape another part expects. It changes the interface, but not how much there is to it. A facade puts one simple front over many parts. It makes the interface smaller, so callers have less to learn. You use an adapter to make things fit, and a facade to make them easy.

![Four small panels. Decorator: a reader box wrapped inside a cache layer, wrapped inside a log layer, all with the same read method. Builder: three steps, url, header and timeout, then build, making one finished request. Facade: one place order box in front of three parts, stock, payment and shipping. Repository: app code asks a user repository for a user, and only the repository talks to the database.](https://learn.benibix.com/diagrams/dev6-more-patterns.svg)

---

Source: https://learn.benibix.com/term/development/facade-pattern
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-18
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
