Exemplifying the Factory Method Pattern inside the .NET Framework
page 1 of 6
Published: 12 Nov 2008
The Factory Method pattern is one of the most used design patterns. In this article, Xianzhong demonstrates the basic idea of the popular Factory Method pattern, and then gets further into the utilization of this pattern in .NET by unveiling the design secret of the WebRequest class with the help of relevant screenshots and source code.
by Xianzhong Zhu
Average Rating: 
Views (Total / Last 10 Days): 33939/ 58


Design patterns were introduced in Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides's seminal work "Design Patterns: Elements of Reusable Object-Oriented Software" (Addison-Wesley). In this book, 23 patterns were specified and described, which form the foundation of any study of the subject. Today, these patterns are still regarded as the essential core patterns. According to this masterpiece, The Factory Method pattern defines an interface for creating an object, but let subclasses decide which class to instantiate. More precisely, Factory Method transfers the responsibility of instantiating a class to the factory class, and defers the instantiation to concrete factory classes.

In this article, I will try to detail into the Factory Method pattern in combination with the typical implementation cases in the .NET Framework.

View Entire Article

User Comments

Title: Images missing   
Name: James
Date: 2013-01-21 4:01:32 PM
Hey all figure images are missing. Can you fix this??
Title: Amazing   
Name: Nimesh
Date: 2010-08-04 9:11:39 PM
Hi Xianzhong Zhu,
I can stop praising you for this article. It has answered so many of my questions along the way of learning new things. You should never stop writing such interesting articles man.

Carry on mate,


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

©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-06-25 11:10:40 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search