Win a copy of Murach's MySQL this week in the JDBC and Relational Databases forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

Timber Lee: Builder Answer

Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic