<a href="http://www.shillitoe.com" target="_blank" rel="nofollow">http://www.shillitoe.com</a>
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Originally posted by Francis Shillitoe:
The command pattern lets you encapsulate a request as an object. Classes that follow this pattern have names which are verbs like "Load" or "Save". It is not mandatory to include an undo() method. Only an execute() method is required. Depending on what your class does, it may be impossible to undo the command.
The builder pattern is unrelated. In the builder pattern the construction logic of an object is moved outside of the class to instantiate.
Still I am not clear about the difference.
http://www.jamonapi.com/ - a fast, free open source performance tuning api.
JavaRanch Performance FAQ
Co-Author of OCP Java SE 8 Programmer II Exam Guide
You could imagine the cook in the diner using Builder to construct his burger: he'd create a Burger object, and then he'd say, burger.makePatty(), burger.chopLettuce(), burger.chopOnion(), burger.sliceTomato(), burger.addBuns(), in the order he wanted to put things on the burger.
http://www.jamonapi.com/ - a fast, free open source performance tuning api.
JavaRanch Performance FAQ
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus