Home All Groups Group Topic Archive Search About

About Factory Method and Abstract Factory (design pattern)

Author
26 Nov 2007 5:18 PM
Duy Lam
Hi everyone,
Sorry, I don't know what group to post this problem, I think may be this
group is suitable.
I'm styduing DAO (Data Access Object) pattern in this link
http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.html.
While I've read about implementing Data Access Objects by Factory Method
Pattern
(http://java.sun.com/blueprints/corej2eepatterns/Patterns/images09/figure09_07.gif)
and Abstract Factory Pattern
(http://java.sun.com/blueprints/corej2eepatterns/Patterns/images09/figure09_08.gif).
  I don't know what is difference things between them, they're seem the
same pattern.
So my question: in above article, what are difference about these patterns ?

Sorry about my poor English :)

--
Duy Lam Phuong

Author
26 Nov 2007 5:37 PM
Nicholas Paldino [.NET/C# MVP]
Granted, this is a general question about design patterns, but it
revolves around implementations in Java, so you might want to look in
Java-specific forums.

    That being said, there isn't a difference between the two images that
you have shows.  They are the same pattern.  The first image just shows the
complete Cloudscape implementation of the factory, while the second diagram
shows a partial implementation for three different providers.


--
          - Nicholas Paldino [.NET/C# MVP]
          - mvp@spam.guard.caspershouse.com

Show quote
"Duy Lam" <duylamphu***@gmail.com> wrote in message
news:%23vogNBFMIHA.5400@TK2MSFTNGP04.phx.gbl...
> Hi everyone,
> Sorry, I don't know what group to post this problem, I think may be this
> group is suitable.
> I'm styduing DAO (Data Access Object) pattern in this link
> http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.html.
> While I've read about implementing Data Access Objects by Factory Method
> Pattern
> (http://java.sun.com/blueprints/corej2eepatterns/Patterns/images09/figure09_07.gif)
> and Abstract Factory Pattern
> (http://java.sun.com/blueprints/corej2eepatterns/Patterns/images09/figure09_08.gif).
> I don't know what is difference things between them, they're seem the same
> pattern.
> So my question: in above article, what are difference about these patterns
> ?
>
> Sorry about my poor English :)
>
> --
> Duy Lam Phuong
Author
27 Nov 2007 2:55 PM
Duy Lam
Nicholas Paldino [.NET/C# MVP] wrote:
>     Granted, this is a general question about design patterns, but it
> revolves around implementations in Java, so you might want to look in
> Java-specific forums.
>
>     That being said, there isn't a difference between the two images that
> you have shows.  They are the same pattern.  The first image just shows the
> complete Cloudscape implementation of the factory, while the second diagram
> shows a partial implementation for three different providers.
>
>

I know, but i just to know pattern. The implementation of pattern in C#
or Java is ok.
Thank you, i also think it's the same :(

--
Duy Lam Phuong

AddThis Social Bookmark Button