Skip to main content


Showing posts from October, 2013

The GoF Hot Spots - Factory Method vs Abstract Factory

As part of my "GoF Design Patterns - The Hot Spots" posts series, this post is focused on two Creational Design Patterns: Factory Method and Abstract Factory.

We will dig into the original GoF Design Patterns (aka: DP) description trying to figure out the real Hot Spots (aka: specific particular parts that differentiating them from each other) of these two DPs and the relationship between them.

In order to maximize the clarity of this article, I used two conventions:
Phrases inside [square brackets] are meant to help understanding GoF definitionsItalic sentences are GoF's book citationsFactory Method GoF Definition:" [1] Define an interface for creating an object, [2] but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses."
GoF Description & Hot Pots: "Consider a framework for applications that can present [handle] multiple documents to the user. Two key abstractions in this framework are t…