Skip to content

Latest commit

 

History

History
40 lines (25 loc) · 1.59 KB

README.md

File metadata and controls

40 lines (25 loc) · 1.59 KB

Table of Contents generated with DocToc

Facade pattern

Provide a unified interface to a set of interfaces in a subsystem. Facade defines a higher-level interface that makes the subsystem easier to use. This can be used to simplify a number of complicated object interactions into a single interface. Source

img1

Source

img2

Source

It's categorized as a Structural Pattern in the Gang of Four.

Examples:

  1. components/api/index.js, Tiendas oficiales
  2. jQuery's $( document ).ready()

Pros

  • Hides the complexity of implementations
  • Simplifies API

Cons

  • Bad implementations lead to objects tightly coupled

Resources