Talk:Builder pattern: Difference between revisions

Content deleted Content added
m project tagging using AWB
Hosick (talk | contribs)
Suggestion for improvement.
Line 94:
 
The Builder in the class diagram is not an <<interface>>, but it should be (also for the sake of calling the other class '''Concrete'''Builder). --[[Special:Contributions/78.43.87.113|78.43.87.113]] ([[User talk:78.43.87.113|talk]]) 14:49, 7 August 2008 (UTC)
 
 
== Example more like Abstract-factory ==
 
The example given leans more towards abstract factory. As mentioned, Builder is best used for building up Composites. So, Menu Items in menu system, or Genealogy tree of parents and children. Builders can use factories, and often do. This is why the example is confusing. It is attempting to use factories and be a builder at the same time. An improvement to the example would be to have a PizzaFactory, a SoftDrinkFactory and SideOrderFactory. Then, create an OrderBuilder that would build up an order using these factories. I'm not saying that this is the best example, but much clearer than what is there now. A simpler example, like building up a MenuSystem for an application, would be much clearer.