Skip to content

Latest commit

 

History

History
15 lines (8 loc) · 1 KB

File metadata and controls

15 lines (8 loc) · 1 KB

Creational Patterns Overview

Creational design patterns provide object creation mechanisms that increase flexibility and reuse of existing code.

  • Factory Method provides an interface for creating objects in a superclass, but allows subclasses to alter the type of objects that will be created.

  • Abstract Factory lets you produce families of related objects without specifying their concrete classes.

  • Builder lets you construct complex objects step by step. It allows you to produce different types and representations of an object using the same construction code.

  • Prototype lets you copy existing objects without making your code dependent on their classes.

  • Singleton ensures a class has only one instance and provides a global point of access to it.

  • Object Pool details uses a set of initialized objects kept ready to use, rather than allocating and destroying them on demand.