Abstract Factory
noun
say it: “AB-strakt FAK-tuh-ree” /ˈæbstrækt ˈfæktəri/
A design pattern that gives each family of matching parts one factory, which makes every part of that family.
What is an abstract factory?
An abstract factory is an interface with one method for each part of a family, and one class per family that keeps it by making that family's parts. A smart-home hub asks a brand's kit for its connection, command format and status reader, so a Bolt reply can only ever reach Bolt's reader. A new family is one new kit; a new kind of part changes every kit.
In a sentence
- “The front door read error until the abstract factory made sure Bolt's reply always went to Bolt's own reader.”
Level: Freelancer · More OOP terms at this level
Updated