Skip to content

Latest commit

 

History

History
44 lines (24 loc) · 1.47 KB

creational.md

File metadata and controls

44 lines (24 loc) · 1.47 KB

Creational Patterns

Factory method

Link

Abstract Factory

  • same as above

Usage

  • Use the Abstract Factory when your code needs to work with various families of related products, but you don’t want it to depend on the concrete classes of those products

  • Consider implementing the Abstract Factory when you have a class with a set of Factory Methods that blur its primary responsibility

Cons

  • CONS: The code may become more complicated than it should be, since a lot of new interfaces and classes are introduced along with the pattern

Builder

Link

Object Pool

Link

Prototype

Link

Dependency injection

Link

Singleton

Link