Skip to main content

Creational Pattern Selector

Design PatternsDesign Patterns

Choose the right creational design pattern (Abstract Factory, Builder, Factory Method, Prototype, or Singleton) for an object creation problem. Use when someone asks "which factory pattern should I use?", "should I use Abstract Factory or Factory Method?", "how do I create objects without specifying the concrete class?", "I need a factory but don't know which one", or "how do I make object creation flexible?" Also use when you see hard-coded `new ConcreteClass()` calls scattered throughout code, when product families must be swapped at runtime, when object construction is too complex for a single constructor, or when objects should be created by cloning a prototype. Compares patterns using two parameterization strategies — subclassing vs object composition — with trade-offs and an evolution path from Factory Method to more flexible alternatives.

Install

1. Add marketplace
/plugin marketplace add bookforge-ai/bookforge-skills
2. Install plugin
/plugin install design-patterns-gof@bookforge-skills
3. Use the skill
/creational-pattern-selector
CC-BY-SA · Open sourceGitHub

More from Design Patterns