About Factory Method and Abstract Factory (design pattern)

D

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 :)
 
N

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.
 
D

Duy Lam

Nicholas said:
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 :(
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top