CreatonalPatterns_6 - Creational Patterns Provide guidance...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Creational Patterns Creational Patterns • Provide guidance on how to create objects when their creation requires making decisions . – Typically involve dynamically deciding • which class to instantiate or • which objects an object will delegate responsibility to. • Tell us how to structure and encapsulate these decisions. Creational Patterns • Factory Method • Abstract Factory • Builder • Prototype • Singleton • Object Pool Factory Method • A way for an object to initiate the creation of another object without having to know the class of the object created • You need to create an object to represent external data or process an external event. The type of object depends on the contents of the external data or type of event. You want neither the data source, the event source nor the object's clients to be aware of the actual type of object created. You encapsulate the decision of what class of object to create in its own class. Application Framework Application Framework with Document Factory
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 Factory Method Pattern Two variations • The general case --The class of the object to create is determined when object creation is initiated • The less common case – the class of objects that will be created is always the
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/17/2012 for the course GCIS 518 taught by Professor Tang during the Spring '10 term at Gannon.

Page1 / 6

CreatonalPatterns_6 - Creational Patterns Provide guidance...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online