← Back to design patterns mapcreational
🧰
Design Pattern
Abstract Factory
Create families of related objects behind one common interface.
Visual Diagram
DBFactory -> MySQL connection + query -> Mongo connection + query
When To Use
- ->Switching database families without changing app code
- ->Supporting multiple cloud providers
- ->Creating related UI components for different platforms
Used in: TypeORM, Sequelize dialect system, cloud provider SDK wrappers
abstract-factory.js
Live Editor
Loading...
Output
Run code to see output...