← Back to design patterns mapstructural
🏛️
Design Pattern
Facade
Expose one simple API over a complex subsystem.
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...