File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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: 1368
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: 1368
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Builder Vs Factory
 
Similar Threads
design pattern
Factory Method and Builder
Regarding Design Patterns
Difference between Abstract Factory and Builder Pattern
Difference between Builder and Factory Pattern