← Back to design patterns map
Design Pattern

Facade

Expose one simple API over a complex subsystem.

structural

Visual Diagram

placeOrder()
-> reserve inventory
-> charge payment
-> send email

When To Use

  • ->Hiding complex order workflows behind one method
  • ->Simplifying SDK usage
  • ->Creating a stable API over many services
Used in: Express app.listen(), Mongoose.connect(), SDK clients
facade.js

Live Editor

Loading...

Output

Run code to see output...

Comments

Sign in to leave a comment. Your name and photo come from Google; nothing else is shared.

Loading comments...