This link has been bookmarked by 48 people . It was first bookmarked on 13 Jul 2006, by alan le.
-
11 Oct 13
-
object is used to represent and encapsulate all the information needed to call a method at a later time
-
includes the method name, the object that owns the method and values for the method parameters
-
has a receiver object
-
command object
-
Four terms always associated with the command patter
-
command, receiver, invoker and client
-
invokes a method of the receiver in a way that is specific to that receiver's class
-
command object is separately passed to an invoker object
-
invokes the command
-
Any command object can be passed to the same invoker object
-
invoker object and several command objects are held by a client objec
-
client contains the decision making about which commands to execute at which points
-
makes it easier to construct general components that need to delegate, sequence or execute method calls at a time of their choosing
-
-
02 Oct 13
-
is a behavioral design pattern in which an object is used to represent and encapsulate all the information needed to call a method at a later time. This information includes the method name, the object that owns the method and values for the method parameters.
-
command, receiver, invoker and clien
-
command object has a receiver object and invokes a method of the receiver in a way that is specific to that receiver's class. The receiver then does the work. A command object is separately passed to an invoker object, which invokes the command, and optionally does bookkeeping about the command execution. Any command object can be passed to the same invoker object. Both an invoker object and several command objects are held by a client object. The client contains the decision making about which commands to execute at which points. To execute a command, it passes the command object to the invoker object. See example code below.
-
sing command objects makes it easier to construct general components that need to delegate, sequence or execute method calls at a time of their choosing without the need to know the class of the method or the method parameters.
-
nvoker object allows bookkeeping about command executions to be conveniently performed, as well as implementing different modes for commands, which are managed by the invoker objec
-
-
25 Mar 13
-
an object is used to represent and encapsulate all the information
-
to call a method at a later time
-
object
-
values for the method parameters
-
method name
-
concrete command object has a receiver object
-
invokes a method of the receiver
-
an invoker
-
receiver then does the work
-
invokes the command
-
client contains the decision making
-
which commands to
-
execute at which points
-
passes the command object to the invoker object
-
user actions
-
code can be streamed/slurped from one location to another
-
keep a stack of the
-
most recently executed commands
-
send whole command objects across the network to be executed on the other machines,
-
using a separate object for each invocation of a command
-
The receiver object owns the method that is called by the command's execute method
-
handler code is part of the command/action object
-
In other implementations the code is part of the Receiver/Target Object
-
holds on to command/event objects until other objects are ready to act on them
-
routed commands
-
combine the command pattern with event processing
-
Switch with two commands
-
List<ICommand>
-
-
28 Feb 13
-
command, receiver, invoker and client
-
The client contains the decision making about which commands to execute at which points
-
invoker object, which invokes the command, and optionally does bookkeeping about the command execution
-
-
01 Aug 12
-
Using command objects makes it easier to construct general components that need to delegate, sequence or execute method calls at a time of their choosing without the need to know the owner of the method or the method parameters.
-
-
07 Apr 12
-
15 Feb 12
-
Command pattern
-
-
16 Sep 11
-
18 Jul 11
-
21 Jan 11
-
09 Dec 10
-
an object is used to represent and encapsulate all the information needed to call a method at a later time
-
client, invoker and receiver
-
-
02 Nov 10
-
09 Jul 10
-
25 Jun 10
-
21 Apr 10
-
29 Dec 09
-
01 Nov 09
-
It maintains a pool of threads that execute commands from the queue. The items in the queue are command objects.
-
the object that is passed from the source to the Command/Action object, to the Target object to the code that does the work. Each button click or shortcut key results in a new command/event object.
-
Microsoft's Windows Presentation Foundation (WPF), introduces routed commands, which combine the command pattern with event processing. As a result the command object no longer contains a reference to the target object nor a reference to the application code. Instead, invoking the command object's execute command results in a so called Executed Routed Event which during the event's tunneling or bubbling may encounter a so called binding object which identifies the target and the application code, which is executed at that point.
-
-
23 Oct 09
-
04 Jul 09
-
30 Dec 08
-
25 May 07
-
09 Apr 07
-
15 Nov 06
Would you like to comment?
Join Diigo for a free account, or sign in if you are already a member.