c# - Command Pattern - Purpose? -


after reading this: http://sourcemaking.com/design_patterns/command

i still don't quite understand why need this.

the idea if commands encapsulated objects commands can captured, stored, queued, replayed etc.

it makes easier command know how undo (ie perform reverse operation) if command processed can stored in list , 'undone' in reverse order restore state before commands done.

also decouples sender of command receiver. can allow multiple things generate same command (a menu item , button example) , handled in same way.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -