March 2002
Intermediate to advanced
496 pages
8h 51m
English
Polymorphism lets you encapsulate a request, or a command as an object: Establish the signature of a method to call, and vary the effect of calling the method by varying the implementation. The COMMAND pattern establishes a method signature, most often execute() or perform(), and lets you define various implementations of this interface. This lets you encapsulate a request as an object, so that you can parameterize clients with different requests, queue, time, or log requests, and require companion operations, such as undo().
Read now
Unlock full access