Skip to Content.
Sympa Menu

gang-of-4-patterns - RE : [gang-of-4-patterns] Doubt on creational patterns..

gang-of-4-patterns AT lists.cs.illinois.edu

Subject: Design Patterns discussion

List archive

RE : [gang-of-4-patterns] Doubt on creational patterns..


Chronological Thread 
  • From: "Mikal Ziane" <Mikal.Ziane AT lip6.fr>
  • To: "'Pablo Schor'" <pablo.schor AT lobruno.com.ar>, <gang-of-4-patterns AT cs.uiuc.edu>
  • Subject: RE : [gang-of-4-patterns] Doubt on creational patterns..
  • Date: Thu, 30 Oct 2003 16:31:07 +0100
  • Importance: Normal
  • List-archive: <http://mail.cs.uiuc.edu/pipermail/gang-of-4-patterns/>
  • List-id: Design Patterns discussion <gang-of-4-patterns.cs.uiuc.edu>

Well the name might be confusing, but to me the problem addressed by
Abstract Factory is quite different from that of Factory Method (FM). FM
does not necessarily address parallel families of products: one family
is enough.

On the other hand Prototype seems to be considered more complex than FM
in the GOF book for a reason that I don't understand. FM requires an
hierarchy parallel to the Product hierarchy which is not the case in
Prototype.

I suspect that Prototype in fact addresses two different problems. First
it addresses the same problem as that of FM, namely instantiating an
interface whithout naming the classes which implement it. Second it
addresses the problem of cloning an instance of an interface (without
naming the classes which implement it).

I think it would be better if a pattern solved one clearly defined
problem rather than two or more problems with a similar solution.
Am I right ?

Mikal

> -----Message d'origine-----
> De :
> gang-of-4-patterns-admin AT cs.uiuc.edu
> [mailto:gang-of-4-patterns-
> admin AT cs.uiuc.edu]
> De la part de Pablo Schor
> Envoyé : jeudi 30 octobre 2003 14:53
> À : Mikal Ziane;
> gang-of-4-patterns AT cs.uiuc.edu
> Objet : Re: [gang-of-4-patterns] Doubt on creational patterns..
>
> Mikal, the thing is Abstract Factory always relies on Factory Method
or
> Prototype, cannot be implemented by itself, and I suppose that's the
> reason
> of the confusion. Is that right?
>
> Thanks,
>
> Pablo
>
>
> ----- Original Message -----
> From: "Mikal Ziane"
> <Mikal.Ziane AT lip6.fr>
> To:
> <gang-of-4-patterns AT cs.uiuc.edu>
> Sent: Tuesday, September 23, 2003 3:04 PM
> Subject: RE : [gang-of-4-patterns] Doubt on creational patterns..
>
>
> > Abstract Factory addreses (parallel) families of products. Think
of a
> > matrix of products. Columns are families and rows are product
"kinds".
> Cells
> > are concrete products. Abtract Factory lets you choose the column
first
> and
> > the forget about this choice and think in terms of rows instead of
> concrete
> > (family-dependent) products.
> > Abstract Factory may rely on Factory Method or Prototype.
> > As for the so-called "class" versus "object" scope I would not
pay
> too
> > much attention to it: it's a pretty vague concept.
> > Hope this helps.
> >
> > Mikal
> >
> >
> >
> > _______________________________________________
> > gang-of-4-patterns mailing list
> > gang-of-4-patterns AT cs.uiuc.edu
> > http://mail.cs.uiuc.edu/mailman/listinfo/gang-of-4-patterns
>
>
> _______________________________________________
> gang-of-4-patterns mailing list
> gang-of-4-patterns AT cs.uiuc.edu
> http://mail.cs.uiuc.edu/mailman/listinfo/gang-of-4-patterns






Archive powered by MHonArc 2.6.16.

Top of Page