473,395 Members | 1,919 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

About Factory Method and Abstract Factory (design pattern)

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/corej...essObject.html.
While I've read about implementing Data Access Objects by Factory Method
Pattern
(http://java.sun.com/blueprints/corej...igure09_07.gif)
and Abstract Factory Pattern
(http://java.sun.com/blueprints/corej...gure09_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
Nov 26 '07 #1
2 2546
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]
- mv*@spam.guard.caspershouse.com

"Duy Lam" <du**********@gmail.comwrote in message
news:%2****************@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/corej...essObject.html.
While I've read about implementing Data Access Objects by Factory Method
Pattern
(http://java.sun.com/blueprints/corej...igure09_07.gif)
and Abstract Factory Pattern
(http://java.sun.com/blueprints/corej...gure09_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

Nov 26 '07 #2
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
Nov 27 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
by: Medi Montaseri | last post by:
Hi, Given a collection of similar but not exact entities (or products) Toyota, Ford, Buick, etc; I am contemplating using the Abstraction pattern to provide a common interface to these products....
4
by: max | last post by:
Hello, I analyze this design pattern for a long time but I do not understand how this pattern work and what the purpose is? (I looked a this site...
11
by: FluffyCat | last post by:
In Febraury - April of 2002 I put together in Java examples of all 23 of the classic "Gang Of Four" design patterns for my website. Partly I wanted to get a better understanding of those patterns....
3
by: Christer | last post by:
Hi all! We're creating an administration for a web application. This includes severeal aspx pages. Our key entity in the web application is "Profile", which can have a certain type. Based on...
1
by: David Bellot | last post by:
Hi, if I consider the Factory Method design pattern, then I should have the following objects: Object and ObjectFactory which are usually abstract classes Then for each subclasses like...
10
by: sunny | last post by:
Does this following program implement the factory design.if not what are things that i have to change in order to make this following program to be designed to factory design pattern. ...
1
by: =?Utf-8?B?RXJpYw==?= | last post by:
I am using the factory method to solve a problem where a factory can produce product. I have a base factory class and a base product class. The problem that I am having is that for every product...
16
by: RSH | last post by:
Hi, I am a fairly seasoned developer and have recently started looking at software design patterns. I am starting with the Abstract Factory Pattern and was wondering if someone could help me...
0
by: Duy Lam | last post by:
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.