Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Difference between Abstract Factory and Builder Pattern

 
Kartik Shah
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the key difference between Abstract Factory and Builder Pattern?
 
Ashish Jaiman
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
quoting from gof
Abstract Factory has the factory object producing objects of several classes. Builder has the factory object building a complex product incrementally using a correspondingly complex protocol
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Abstract Factory & Builder pattern are both creational patterns. Each have different intents..
Abstract Factory pattern is about creating related families of objects.
Builder pattern is to decouple the representation from the complex construction proces, so that the same construction process can be used for different representations.
Hope this helps.
Anil
 
Kartik Shah
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That clears up my doubt.
Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic