• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

What is the difference between AbstractFactory and Factory pattern

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All
Can some body explain me what is the difference between AbstractFactory and Factory pattern and in what kind of application we use them.
I read that
AbstractFactory patterns "Provide an interface for creating families of related or dependent objects without specifying their concrete classes." and Factory pattern "Define an interface for creating an object, but let subclasses decide which class to instantiate".
but could not able to visulaize exactly where we can apply these patterns.
Regards
Radha
 
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In abstract factory, u'll get a reference to an abstract class. From this u can select actual implementation.
In factory ( or concrete factory), u'll get a reference to the actual implementation.
for more info and example :
http://www.exciton.cs.rice.edu/JavaResources/DesignPatterns/FactoryPattern.htm
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic