When Looking at the command pattern a found a slight difference. May be some is able to more clearify this.
When looking at Gang Of Four it says that each command has a Execute Method see for example: http://ift.tt/1RfmGa4 like:
myCommand.Execute(myValue);
Now when i look at the commands how there are used in CQRS (Greg Young) i see that this commands don't have an execute method. They are only some kind of "Command Instruction" instance. Similar things are said in the CQRS webcasts like.
And the command is handled by the domainobject. like
class myDomainObject
{
void UpdateValue(UpdateValueCommand cmd){
this.value = cmd.value;
}
}
Is it right that it's just another CommandPattern definition like "CQRS-Command Pattern" ? or am I missing something the command pattern or CQRS implementation?
Aucun commentaire:
Enregistrer un commentaire