Women in Technology

Hear us Roar



Article:
  Form Your Own Design Pattern Study Group
Subject:   HFDP's Abstract Factory example discussion
Date:   2005-05-03 02:50:32
From:   MatthiasWeidmann

We've a design patterns study group here using
the HFDP book, which we enjoy a lot.


One thing we noticed in our last session is that
the abstract factory pattern somehow didn't flow
for us. Investigating, discussing, thinking,
we believe what blew us is two things:


1st) Wouldn't it make more sense if the PizzaIngredientFactory is still a PizzaFactory, that is, if the abstract factory is enhanced with the ability to create pizzas as well. This would be in line with the GoF's abstract factory MazeFactory example as well (GoF, p.92), where the creation of the Maze itself is part of the abstract factory.


2nd) Further, the other thing which troubled us is the NYPizzaStore and ChicagoPizzaStore. Shouldn't the store specifics be dealt with only by having selected the appropriate factory ?


We've changed the example's source code to be aligned with our thinking, and to us it looks easier to understand, especially when comparing it to the preceding Factory Method example.


Thoughts/opinions very appreciated,
Matthias

Full Threads Oldest First

Showing messages 1 through 3 of 3.

  • HFDP Study Group on-line
    2005-08-29 23:52:53  Jackar [View]

    We are creating such group on-line. If someone is intersted please contact me: jackar@epf.pl.
  • HFDP's Abstract Factory example discussion
    2005-05-11 20:09:56  gtwdaizi [View]

    can we get the sourece code of this example??
    please tell me where?? thanks
    • HFDP's Abstract Factory example discussion
      2005-05-18 02:08:41  MatthiasWeidmann [View]


      I had sent the code to the authors before posting here but I don't know if there's a special discussion area where one can upload/download alternative implementations of the examples.

      Matthias