A day with .Net

My day to day experince in .net

Abstract Factory Pattern

Posted by vivekcek on September 15, 2012

Source Code http://sdrv.ms/O4X56A

Provide an interface for creating families of related or dependent objects without specifying their concrete classes.


The classes and/or objects participating in this pattern are:

AbstractFactory (IMobileFactory)
declares an interface for operations that create abstract mobiles

ConcreteFactory (IPhoneFactory, NokiaFactory)
implements the operations to create concrete product objects

AbstractProduct (IMobile)
declares an interface for a type of product object

Product (IPhone3,Iphone3gs,Lumia800 etc..)
defines a product object to be created by the corresponding concrete factory
implements the AbstractProduct interface
Client (Program.cs)
uses interfaces declared by AbstractFactory and AbstractProduct classes


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s