NEW: English for Tech Bundle → Save 38%
Your progress…

Loading your progress…

Home
Code & Deliverynoun · /ˈfæktəri ˈpætərn/

factory pattern

factory pattern — A design pattern that creates objects without specifying their exact classes, using a factory method instead.

In simple English

The factory pattern is one of the most fundamental object-oriented design patterns used in enterprise software development. Instead of using the new keyword directly to instantiate classes, you delegate object creation to a factory method. This provides flexibility: if you need to change which concrete class gets instantiated, you only modify the factory, not all the code that uses the objects. In real workplaces, developers use the factory pattern to decouple client code from specific class implementations. For example, a payment system might have a PaymentFactory that creates CreditCardPayment, PayPalPayment, or StripePayment objects depending on configuration. When a new payment provider is added, you extend the factory without touching the checkout logic. It appears frequently in code reviews, architecture discussions, and system design interviews. Senior engineers often recommend it when they spot tight coupling or when anticipating future class variations.

Non-native speakers want to understand what factory pattern is, why it matters, and how to implement or explain it in interviews.

At a glanceCEFR C1
Commonness4/5
Versatility4/5
FormalityCasualFormalFormal
Spoken ↔ WrittenSpokenWrittenBoth
Directness ↔ DiplomaticDirectDiplomaticDirect
RegionUS and UK

Say it like this

  • Let's implement the factory pattern here.
  • The factory pattern would work well for this use case.
  • This is a textbook example of the factory pattern.

Use it at work

Code review

  • A factory pattern would clean up all these if statements.
  • Let's use a factory to create the right payment provider.

Explaining

  • The factory decides which class to create.
  • With the factory pattern, callers don't need to know the details.

Pushing back

  • A factory feels like overkill for two classes.
  • Let's add the factory when we have a third type.

Don't say this

✕We need to factory pattern the code.
✓We should use the factory pattern here.

Factory pattern is a noun (design pattern), not a verb. You use or apply the pattern, not factory pattern something.

Practice

Try it

4 quick exercises

Pick the most natural phrasing

1. Your team is debating how to handle multiple database types. What would a senior engineer likely say?

Complete the sentence

2. The _______ is a design pattern that centralizes object creation and reduces tight coupling.

Spot the mistake

3. Which sentence uses factory pattern incorrectly?

Rewrite naturally

4. Rewrite this using factory pattern: 'We make different kinds of database connections in many places, and it is hard to change them all when we add a new database type.'

Say it out loud

Phrase 1 of 3

"Let's implement the factory pattern here."

We don't save your recording. The word check uses your browser's speech recognition.

More about factory pattern

Real examples(3)

  • in a code review

    "Instead of calling new DatabaseConnection() everywhere, we should use the factory pattern to centralize the creation logic."

  • in a design discussion

    "The factory pattern allows us to swap payment providers without rewriting the entire checkout flow."

  • in a team meeting

    "We're applying the factory pattern to handle multiple logger implementations across the application."

More mistakes(2)

Handle with care. Non-native speakers sometimes confuse it with actual manufacturing or treat it as a verb. It is a software design pattern noun, not an action verb.

  • ✕The factory pattern creates the actual factory building.
    ✓The factory pattern is a design pattern that encapsulates object creation logic.

    Factory pattern is a software concept, not about manufacturing. The word factory is metaphorical.

  • ✕Is this a factory pattern or a strategy pattern?
    ✓Should we implement the factory pattern or the strategy pattern here?

    Clarify whether you are asking about identification or suggesting implementation.

Other forms(3)

  • factory pattern noun

    "The factory pattern is useful when you have multiple subclasses."

  • abstract factory pattern noun phrase

    "We used the abstract factory pattern to handle cross-platform UI components."

  • factory method pattern noun phrase

    "The factory method pattern simplifies object instantiation."

Often used with(5)

  • implement the factory pattern · Common verb phrase meaning to code and use the pattern in a project
  • use the factory pattern · General phrase indicating application of the design pattern
  • apply the factory pattern · Similar to use; often appears in architectural decisions
  • abstract factory pattern · A specific variant that creates families of related objects
  • factory method pattern · Another variant focusing on a single factory method for creation

Similar words(3)

  • object creation pattern · Broader category; factory pattern is a specific type within it
  • creational pattern · Broader classification; factory is one of several creational patterns
  • abstract factory · A specific variant of the factory pattern for creating object families

Opposites(2)

  • tight coupling
  • hardcoded instantiation

Questions(5)

What does factory pattern mean in software engineering?
The factory pattern is a creational design pattern that provides a way to create objects without specifying their exact classes. Instead of using new to instantiate classes directly, you use a factory method that decides which class to instantiate based on input or configuration. This reduces coupling and makes code more flexible.
How do you use factory pattern in a sentence at work?
Use it as a noun: We should implement the factory pattern to handle database creation. Or: The factory pattern would work well for this use case. You can also say: We are applying the factory pattern to the payment module. Do not use it as a verb; do not say We need to factory pattern this.
Is factory pattern formal or informal?
Factory pattern is formal and technical. It is commonly used in code reviews, design documents, and technical interviews. While it can appear in both spoken and written contexts, it is always professional in tone and should not be used casually or as slang.
What is the difference between factory pattern and abstract factory pattern?
The factory pattern uses a single factory method to create one type of object. The abstract factory pattern uses multiple factory methods to create families of related objects. Abstract factory is more complex but useful when you need to ensure that created objects work together.
When should I use the factory pattern?
Use the factory pattern when you have multiple classes that share a common interface or base class, when object creation logic is complex, when you want to decouple client code from specific class implementations, or when you anticipate adding new subclasses in the future.
New app · Free lessons

Speak up in meetings. Feel confident.

Standup vocabulary, native examples, and quick practice — 100+ free lessons

Start learning freeNo card needed · Google or email

For bots & AI agents

Machine-readable versions of this page and Speak Tech English. Speak Tech English sells self-study ebooks and courses in English for tech, publishes free guides, a free glossary and a free newsletter; live lessons are on Mockly English. Fetch these instead of parsing this page.

This page (.md)llms.txtllms-full.txtai.txtGlossary (.md)Free guides (.md)All products (.md)Endpoint indexNewsletterLive lessons (Mockly)