• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

differences between abstarct factory pattern and factory method

 
shambhu lingam
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can someone throw light on differences between abstract factory pattern and factory method pattern?.
i have a feeling(may be a wrong idea) that they both can be used in the same context .
thanks
Shambhu Lingam
 
Dirk Schreckmann
Sheriff
Posts: 7023
 
Malay Thakkar
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Abstract Factory Pattern
Abstract Factory is a tool kit; the usage is when you want to create related objects.
Factory Pattern
This pattern helps to model an interface for creating an object which at creation time can let its subclasses decide which class to instantiate. We call this a Factory Pattern since it is responsible for "Manufacturing" an Object. It helps instantiate the appropriate Subclass by creating the right Object from a group of related classes. The Factory Pattern promotes loose coupling by eliminating the need to bind application-specific classes into the code.
From the intent perspective, there is nothing similar about the two.
Regards
Malay
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic