Creational patterns

Creational patterns are design patterns that deal with how an object is created. These patterns create objects in a manner that is suitable for the particular situation. There are two basic ideas behind creational patterns. The first is encapsulating the knowledge of which concrete classes should be created and the second is hiding how the instances of these classes are created.
There are five well-known patterns that are part of the creational pattern category:

  • Abstract factory pattern: This provides an interface for creating related objects without specifying the concrete class
  • Builder pattern: This separates the construction of a complex object from its representation so the same process can be used to create similar types ...

Get Mastering Swift 2 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.