This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

When to use Factory and when to use AbstractFactory ?

 
Jigar Naik
Ranch Hand
Posts: 761
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I was going through the factory and abstract factory design patterns... Both patterns looks similar, both are used for object creation.

When to use Factory Pattern & When to use Abstract Factory ?

I am still little confused about AbstractFactory pattern. What is the relation of AbstractFactory and Factory Pattern ?

 
Jimmy Clark
Ranch Hand
Posts: 2187
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
AbstractFactory implementations may consist of a way to obtain multiple "concrete" factories which then are used to create similiar but different objects. It is a more complex implementation than using a simplified Factory Method implementation.

The decision to use one or the other depends upon (1) your understanding of the patterns and their various applications, and (2) the needs the application you are designing, or in other words the requirements.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic