Skip to content

Latest commit

 

History

History

facade

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

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