Everything About ___
Live briefing

Everything about Factory method pattern

Object-oriented software design pattern

In object-oriented programming, the factory method pattern is a design pattern that uses factory methods to deal with the problem of creating objects without having to specify their exact classes. Rather than by calling a constructor, this is accomplished by invoking a factory method to create an object. Factory methods can be specified in an interface and implemented by subclasses or implemented in a base class and optionally overridden by subclasses. It is one of the 23 classic design patterns described in the book Design Patterns and is subcategorized as a creational pattern. Wikipedia →

🧭 Start here: a 6-step reading path

  1. Read the overview: Factory method patternA 5-minute orientation
  2. Pick up a classic book: Objects first with JavaThe most-reprinted book on the subject
  3. Read the landmark paper: Is "Factory Method" really a pattern?Cited 1 times
  4. Go sideways: Prototype patternA closely related topic
  5. Go sideways: Abstract factory patternA closely related topic

📖 Definitions

Noun A creational design pattern that decouples the object creation by using an abstract method in the class.

🗂️ The subject at a glance

  1. Overview
  2. Definition
  3. Structure
  4. Examples
  5. Uses

🏆 Landmark papers (most cited)

📚 Books worth reading

Ranked by number of editions on Open Library, a rough measure of how lasting a book is.

🔗 Related topics