aspose file tools*
The moose likes OO, Patterns, UML and Refactoring and the fly likes Builder  Vs   Factory 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 "Builder  Vs   Factory" Watch "Builder  Vs   Factory" New topic
Author

Builder Vs Factory

kri shan
Ranch Hand

Joined: Apr 08, 2004
Posts: 1382
How builder pattern is different from Factory pattern?
pete stein
Bartender

Joined: Feb 23, 2007
Posts: 1561
kri shan wrote:How builder pattern is different from Factory pattern?


Surely you've looked this up on Wikipedia or Googled it, correct? So rather than ask such a general question, wouldn't it be better for you to post what specifically about the two patterns confuse you?
kri shan
Ranch Hand

Joined: Apr 08, 2004
Posts: 1382
I got this answer from one of the javaranch post.

Abstract Factory: Provide an interface for creating families of related or dependent objects without specifying their concrete classes.
Builder: Separate the construction of a complex object from its representation so that the same construction process can create different representations.
Factory Method: Define an interface for creating an object, but let subclasses decide which class to instantiate. Factory method lets a class defer instantiation to subclasses.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Builder Vs Factory