Professional Documents
Culture Documents
CONFIDENTIAL
Creational Patterns
CONFIDENTIAL
Maze Example
CONFIDENTIAL
Creational Patterns
Abstract Factory
Builder
Prototype
Factory Method
Singleton
CONFIDENTIAL
Abstract Factory
Intent
• Provides and Interface for creating families of related or
dependent objects without specifying their concrete
classes
Also Known As
• Kit
CONFIDENTIAL
Motivation
CONFIDENTIAL
Applicability
CONFIDENTIAL
Structure
CONFIDENTIAL
Consequences
CONFIDENTIAL
Implementation Issues to consider
• Factories as singletons
• Creating the products
• Defining extensible factories
CONFIDENTIAL
Known Uses
CONFIDENTIAL
Builder
Intent
• Separate the construction of a complex object from its
representation so that the same construction process can
create different representations
Also Known As
• ???
CONFIDENTIAL
Motivation
CONFIDENTIAL
Applicability
CONFIDENTIAL
Structure
CONFIDENTIAL
Collaborations
CONFIDENTIAL
Consequences
CONFIDENTIAL
Implementation Issues to consider
CONFIDENTIAL
Known Uses
CONFIDENTIAL
Factory Method
Intent
• Define an interface for creating an object, but let
subclasses decide which class to instantiate. Factory
Method lets a class defer instantiation to subclasses.
Also Known As
• Virtual Constructor
CONFIDENTIAL
Motivation
CONFIDENTIAL
Applicability
CONFIDENTIAL
Structure
CONFIDENTIAL
Consequences
CONFIDENTIAL
Parallel Hierarchies
CONFIDENTIAL
Implementation Issues
CONFIDENTIAL
Known Uses
CONFIDENTIAL
Prototype
Intent
• Specify the kinds of objects to create using a prototypical
instance, and create new objects by copying this
prototype.
Also Known As
• ???
CONFIDENTIAL
Motivation
CONFIDENTIAL
Motivation
CONFIDENTIAL
Applicability
CONFIDENTIAL
Structure
CONFIDENTIAL
Consequences
CONFIDENTIAL
Implementation Issues
CONFIDENTIAL
Known Uses
CONFIDENTIAL
Singleton
Intent
• Ensure a class only has one instance, and provide a global
point of access
Also Known As
• ???
CONFIDENTIAL
Motivation
CONFIDENTIAL
This is an example of a text slide
CONFIDENTIAL
This is an example of a text slide
CONFIDENTIAL
This is an example of a text slide
CONFIDENTIAL
This is an example of a text slide
CONFIDENTIAL
Color guidelines
R: 255 R: 102
Background WHITE G: 255 Accent 368 G: 179
B: 255 B: 26
R: 0 R: 0
Text and Lines BLACK G: 0 Accent and Hyperlink 3025 G: 51
B: 0 B: 102
R: 153 R: 26
Accent and Followed
Shadows 7530 G: 153 364 G: 102
B: 126 Hyperlink B: 26
R: 77 R: 255
Title Text 7532 G: 77 Additional Accent 138 G: 153
B: 51 B: 0
R: 0
Fills CYAN G: 153
B: 204
CONFIDENTIAL