GoF-Builder Pattern

Details
Full Name

GoF Builder Pattern (Creational)

Intent:

Separate the construction of a complex object from its representation so that the same construction process can create different representations.

When to Use:

  • When the algorithm for creating a complex object should be independent of the parts and how they are assembled

  • When the construction process must allow different representations

Prompt Example:

"Implementiere einen Builder nach GoF für das QueryObject, mit Fluent API für Filter, Sortierung und Pagination."