Factory Design Pattern


 Usually, I wait a bit before consuming and championing a design an architecture principle to see how widespread it becomes and how others have implemented it successfully.  Coupled with my own research, I then usually throw my hat in the ring and come on board with the methodology, or decide to wait to evaluate it further.  The Factory Design Pattern for development is a great method to introduce abstraction within your .NET projects.  The basic element of this design pattern is to introduce a layer that is responsible for abstracting the actual class instantiations and management from a client perspective.  In other words, the Client calls the Factory and the Factory instantiates the Classes.  This allows the interface from the Client to be loosely coupled (not tightly bound) to complex class structures.  This provides the developer flexibility in altering the project's class implementation and complexity by exposing instantiated object through the Factory.  The Factory can either return an instance of the class to the consumer, or act on the clients behalf by masking all class operations. 


Here is a link with more information:


http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/factopattern.asp


 

Skip to main content