| Author |
Timber Lee: Builder Answer
|
Sanjay Raghavan
Ranch Hand
Joined: May 14, 2002
Posts: 148
|
|
Timber, You had sent me a mail with a question on the builder pattern. Because of your privacy settings at the ranch, I am unable to respond to you privately. Further I also figured that this way, others will have an opportunity to participate as well. The question was to do with an example for the Builder pattern. Builder is a creational GoF pattern. A while back I had posted a detailed description with fast-foods as an example. Please try to read through that. It will give you a clear example of the Builder pattern. Here's another example. Let us assume that a diagram has to have two objects and some relationship between them. Given this construct, you can create: 1. Class, Class, Association 2. Interface, Class, Implementation 3. Class, Class, Inheritance and so on. The idea is that you can only have 2 objects and 1 relationship, but the objects and the relationship can be constructed dynamically Ala Carte. HTH.
|
Sanjay Raghavan<br />SCJP2, SCEA-J2EE<br />Moderator - <a href="http://groups.yahoo.com/group/scea_prep" target="_blank" rel="nofollow">SCEA PREP</a><br />Co-Author - <a href="http://www.whizlabs.com/scea/scea.html" target="_blank" rel="nofollow">SCEA@Whiz</a><br /><i>Where did you sip your Java Today?</i>
|
 |
 |
|
|
subject: Timber Lee: Builder Answer
|
|
|