# Simple Factory: One Place That Says new

When the same if chain that picks a class is copied into several places, a new product means editing all of them, and one is always forgotten; a simple factory moves that decision into one function, so a new product is one new class and one new line.

![Cheat sheet: Simple Factory: One Place That Says new](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/7dcd2f3b863c431ab40cdab721eb8c6c.webp)

- Category: Data Structures
- Level: Apprentice
- Tags: Code Smell, Factory Pattern, OOP, Simple Factory
- Author: Gregor Dzierzon
- Updated: November 17, 2026

Source: https://www.ask-codey.com/cheat-sheets/dp-simple-factory-cheat-sheet
