Back to list
Views:   10.7K
Replies:  1

What is the difference between Builder Pattern And Composite Pattern

We all know that Builder Pattern is one of the creational patterns and Composite Pattern is one of the structural patterns .
My question is, can I create a menu like a Command menu or menutoolbar with two of these Patterns?
What are their critical differences?  Or, which is better to create a menu toolbar?

Best Regards.

Volkan Genç, Jan 23, 2012
Reply 1

You should use Composite Pattern as your menu items will be dynamic. 
Composite creates Parent - Child relations between your objects while Builder is used to create group of objects of predefined types.

So i would suggest you to use Composite to create your menu items.

Ankit Parikh
Ankit Parikh, Jan 23, 2012
Yep. well thanks for u entered my question. Right now i am applying general OOD principles to the application that what i asked. i thank u once again.
Apr 27, 2011
Stay Inspired!
Join other developers and designers who have already signed up for our mailing list.
Terms     Privacy     Cookies       Do Not Sell       Licensing      
Made with    in Austin, Texas.  - vsn 44.0.0
© Data & Object Factory, LLC.