• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Regarding factory patterns

 
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello All,

What is the exact difference between Abstract Factory and Factory method design patterns?
What is the difference in their application?

Can someone explain me this point.

Thanks and regards,
Paritosh Chandorkar
 
Ranch Hand
Posts: 52
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can consider the abstract factory pattern as parent of factory method pattern...basically the abstract factory represents multiple factories and provide a single view to the client.

Abstract Factory Design Pattern provides an interface for creating families of related or dependent objects without specifying their concrete classes.


example in j2ee:
Data Access Object in JEE uses the (GoF) Abstract Factory Pattern to create various product DAO from RdbDAOFactory, XmlDAOFactory, OdbDAOFactory.

Tried to explain with example in the following articles:
abstract factory : http://idiotechie.com/abstract-factory-design-pattern-explained/
factory method: http://idiotechie.com/design-best-practices-using-factory-method-pattern/

Hope this helps.
 
Grow your own food... or this tiny ad:
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
reply
    Bookmark Topic Watch Topic
  • New Topic