What does "Factory pattern" mean in programming?
Factory pattern is one of the most common terms in software development. This guide explains what it means, how it is used in practice, and why it matters, with real examples from the developer world.
Definition
A design pattern that provides an interface for creating objects without specifying the exact class to instantiate. The factory decides which class to create based on the input. Useful when the creation logic is complex or when the exact type is determined at runtime.
Example
"The PaymentFactory returns a StripeProcessor, PayPalProcessor, or ApplePayProcessor depending on the user's selected method."
Related terms
Ready to practice your English at work?
Lingua-e has interactive exercises built around real developer conversations: standups, code reviews, retrospectives, and more. Practice until it comes naturally.
Try Lingua-e for free