English Reference

Word

factory pattern

Definition

compound. 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.

compound. 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.”

Examples

simple

“The developer used a factory pattern to create different types of user accounts.”

contextual

“By implementing a factory pattern, the software can easily support new file formats without modifying the core logic of the document processor.”

complex

“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

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

Etymology

A compositional term formed from the noun factory, denoting a site of industrial manufacture, and pattern, in the sense of a reusable architectural design. The metaphor was formalised by Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides in their 1994 publication on software design.

Etymology adapted from Wiktionary, available under CC BY-SA 4.0.

Related words

Domain

Programming

This entry

Exam level
CambridgeCambridgeCambridge English QualificationsThe exam suite from Cambridge University Press & Assessment, from A1 Movers up to C2 Proficiency. The benchmark names double as CEFR labels.C1 AdvancedIELTSIELTSInternational English Language Testing SystemThe 0–9 band test co-owned by the British Council, IDP, and Cambridge. Used for university entry, work, and migration.7.0–8.0TOEFL iBTTOEFL iBTTest of English as a Foreign Language, Internet-Based TestETS's academic English test, the standard route for US university admissions. Scored 0–120, with a 1–6 scale since 2026.1–6 scale: 5.0–5.595–113TOEICTOEICTest of English for International CommunicationETS's workplace English test, big in Japan and Korea. Listening & Reading scores 10–990 and tops out at C1.945–990EikenEikenTest in Practical English ProficiencyThe English proficiency test from the Eiken Foundation of Japan, widely taken by Japanese students. Grades run from 5 to 1, with Pre-1 and Pre-2 between them.Grade 1
Level
C1 · Advanced
Updated

QR code

englishreference.com/q/factory-pattern

English Reference