Skip to main content
Back to Tags

Creational

10 items tagged with "creational"

Filter by type:

Patterns10

Pattern

Factory Method

Defines an interface for creating an object but lets subclasses decide which concrete class to instantiate, deferring instantiation to subclasses.

Pattern

Abstract Factory

Provides an interface for creating families of related objects without specifying their concrete classes, ensuring products from one family are used together.

Pattern

Builder

Separates the construction of a complex object from its representation so the same construction process can create different representations step by step.

Pattern

Prototype

Creates new objects by cloning an existing instance (the prototype) rather than instantiating a class, useful when construction is costly or types are decided at runtime.

Pattern

Singleton

Ensures a class has only one instance and provides a global point of access to it, used for shared resources like configuration, logging, or connection pools.

Pattern

Object Pool

Reuses a set of pre-initialized, expensive-to-create objects from a managed pool instead of creating and destroying them on demand, improving performance.

Pattern

Dependency Injection

Supplies an object's dependencies from the outside rather than having it construct them, inverting control to improve testability, flexibility, and decoupling.

Pattern

Lazy Initialization

Defers the creation or computation of an object until the first time it is actually needed, avoiding upfront cost for resources that may never be used.

Pattern

Multiton

Generalizes Singleton to manage a fixed, keyed set of named instances, ensuring exactly one instance exists per key through a registry.

Pattern

Registry

Provides a well-known central object where shared instances or services can be registered and looked up by key, giving a single point of access without scattered globals.