Creational Pattern Selector

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.

bookforge-ai Updated 42 repo stars
Sheldon the robot reading a BookForge book

File contents

bookforge-ai/bookforge-skills commit 3ddbc392f3 Runs: bookforge-ai/design-pattern-selector

Frequently asked questions

npx get-skill add bookforge-ai/creational-pattern-selector