• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

BUILDER Pattern

 
Nesan Krish
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is said in the Cade's book about the Builder pattern "Builder pattern Seperates the construction and the representation of a complex object" Plaese anyone explain this more? What is really meant by construction and representation of an object? Thank you very much.
 
Nathaniel Stoddard
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The task of "building" something is delegated to a Builder such that everybody else doesn't have to worry about how complex that object is. It's really just a simple way of separating duties (plus, it does lower the complexity of the code since the complex part is in only one place--the builder).
 
D. Rose
Ranch Hand
Posts: 215
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I compare this to actually building house. If I give house layout plan to two different builders, one may come up with Oriental style other may build western style.
In this case construction would still be construction a house with so many doors and windows etc but representation would be diffrent.
[ August 30, 2004: Message edited by: D. Rose ]
 
Dan Drillich
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nesan,

Here are two nice pages about the Builder pattern:

http://www.dofactory.com/Patterns/PatternBridge.aspx#intent
http://www.cs.clemson.edu/~malloy/courses/patterns/bridge.html

Regards,
Dan
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic