Solved

What is the diffrence between Factory and abstract factory design pattern

Posted on 2009-03-31
4
545 Views
Last Modified: 2013-11-12
What is the diffrence between Factory and abstract factory design pattern
0
Comment
Question by:replyanshu
4 Comments
 
LVL 9

Assisted Solution

by:Misbah
Misbah earned 100 total points
Comment Utility
in Factory. you will use a static method that will return and object of type x and store this object in a variable of the same type x.

Circle c = Factory.CreateCircle();

in Abstract Factory, the difference is that the return object will be stored in super abstract class.

Shape c = Factory.CreateCircle();
0
 
LVL 15

Assisted Solution

by:alienvoice
alienvoice earned 25 total points
Comment Utility
Hope this helps. Has already been addressed in another forum.

http://www.coderanch.com/t/99780/OO-Patterns-UML-Refactoring/Factory-Vs-Abstract-Factory-Pattern
0
 
LVL 20

Accepted Solution

by:
Venabili earned 125 total points
Comment Utility
The guys above already gave you some good advice, but I had always found http://jamesthornton.com/eckel/TIPatterns/html/Chapter06.html a good explanation for all types of Factories.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This article explores the difference between two entities: List and Category.   In part one,  we'll look at the basic concepts, and set some groundwork.  In part two, we'll get to some conclusions. I know that these two things are different, but…
The Fluent Interface Design Pattern You can use the Fluent Interface (http://en.wikipedia.org/wiki/Fluent_interface) design pattern to make your PHP code easier to read and maintain.  "Fluent Interface" is an object-oriented design pattern that r…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now