Talk:Builder pattern: Difference between revisions

Content deleted Content added
Hosick (talk | contribs)
Suggestion for improvement.
SineBot (talk | contribs)
m Signing comment by Hosick - "Suggestion for improvement."
Line 98:
== 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. <small><span class="autosigned">—Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[User:Hosick|Hosick]] ([[User talk:Hosick|talk]] • [[Special:Contributions/Hosick|contribs]]) 07:44, 17 May 2009 (UTC)</span></small><!-- Template:Unsigned --> <!--Autosigned by SineBot-->