aspose file tools*
The moose likes OO, Patterns, UML and Refactoring and the fly likes abstactfactory vs factory method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "abstactfactory vs factory method" Watch "abstactfactory vs factory method" New topic
Author

abstactfactory vs factory method

vasu chowdary
Ranch Hand

Joined: Mar 15, 2008
Posts: 89
I just completed theory about abstract factory and factory method.could any one explain the difference between these two clearly?

Matthew Brown
Bartender

Joined: Apr 06, 2010
Posts: 4392
    
    8

There's an example in a previous thread that might help. The main difference is that with the factory pattern you have one class object producing instances of multiple classes. With the abstract factory pattern you have multiple (related) factories.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: abstactfactory vs factory method