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

Add email recipient to all new Trac tickets -

400 Bad Request on Apache/PHP AddHandler wrapper -

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