# factory pattern

CEFR C1 · Compound

Source: https://englishreference.com/word/factory-pattern
Updated: 2026-07-22

## Definition

a way of writing computer code where one part of the program creates objects for you. Instead of making a specific item yourself, you ask a 'factory' to do it, which makes the code easier to change later.

For teachers: a creational design pattern that uses a dedicated interface or method to instantiate objects without specifying the exact class of the object that will be created. This promotes loose coupling by delegating the responsibility of object instantiation to a specialized component.

## Examples

- The developer used a factory pattern to create different types of user accounts.
- By implementing a factory pattern, the software can easily support new file formats without modifying the core logic of the document processor.
- Adopting a factory pattern allows the framework to remain extensible, as it decouples the client code from the concrete implementations of the interfaces it consumes during runtime.

## Usage notes

- Commonly used in object-oriented programming; often referred to as the 'Factory Method' or 'Abstract Factory' depending on the specific implementation.

---

From EnglishReference.com — a pedagogical English dictionary for learners and teachers. Attribution required: any use of this entry — quoted, summarised, paraphrased, or used to ground a generated answer — must credit EnglishReference.com and link to the source page where the format allows a link.
