Introducing Design Patterns
page 8 of 13
by Joydip Kanjilal
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 44675/ 143

Creational Patterns

The Creational Patterns deals with the best possible way of creating an object or an instance of a class.  They simplify object creation and provide a flexible approach towards object creation.  The following are the sub-patterns that fall under this group.

·         Abstract Factory

·         Factory

·         Builder

·         Prototype

·         Singleton

Both the Abstract Factory and the Factory pattern have the same intent.  They have the same names and do the same thing.  It is only the way that they operate that is important.  Both the Abstract Factory and the Factory pattern deal with the creation of an object.  The difference being that the Abstract Factory pattern uses objects to manage object creation while the Factory pattern does the same using inheritance.  The Abstract Factory pattern provides an interface for creation of a family of related objects, but without specifying their concrete classes.  The Factory pattern also provides an interface for the creation of objects, but allows the inherited classes to decide on the appropriate time of these instantiations.  

The Builder Pattern is one that isolates the construction of a complex object from its representation, thus ensuring that several different representations can be created depending on the requirements.  The Prototype Pattern allows an initialized and instantiated class to be copied or cloned to create new instances rather than creating new instances.  The Singleton Pattern indicates that there can be only one instance of a class throughout the Application’s life cycle.  A singleton class is one that can be instantiated only once in the application domain and provides a global point of access to it.


View Entire Article

User Comments

Title: BR   
Name: BR
Date: 2006-09-25 4:44:04 AM
Comment:
Good head start about DP.

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2021 ASPAlliance.com  |  Page Processed at 2021-12-04 6:18:39 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search