Creational Patterns

Main points

  1. Abstract the instantiation process.
  2. Provide independence of objects creation, composition and representation.
  3. Are useful for systems depending more on composition than inheritance.
  4. Use a small set of fundamental behaviors that can be composed into several more complex behaviors, rather than hardcoding a fixed set of behaviors.
  5. Create objects that require more than simply instantiating a class.

Recurring themes

  1. Encapsulate knowledge about concrete classes used by a client.
  2. Hide to the client how objects are created and assembled. Client only knows object interfaces
  3. Control what, who, how and when an object is created.
  4. Allow dynamic and static configuration of a client.

Code sketches

The following pseudo-code fragments try to highlight the distinguishing features of 4 patterns that, for some purposes, are interchangeable. The goal is synthesis and comparison, not completeness and precision.


Last updated: Mon Jan 17 09:44:25 PST 2000