Dá jednoduché rozhranie pred zložitý podsystém.
class Warehouse { reserve(item) { // lowers the available quantity }} class Payment { charge(amount) { // posts the amount }} class Shipping { schedule(address) { // creates a shipment }} // The facade knows the order of steps. The client does not have to.class OrderFacade { constructor() { this.warehouse = new Warehouse(); this.payment = new Payment(); this.shipping = new Shipping(); } complete(order) { this.warehouse.reserve(order.item); this.payment.charge(order.amount); this.shipping.schedule(order.address); }} const facade = new OrderFacade();facade.complete(order); // one call instead of three