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.