php-ddd icon indicating copy to clipboard operation
php-ddd copied to clipboard

Single Commands / Handler vs. Abstract Commands

Open webdevilopers opened this issue 8 years ago • 0 comments

The discussion originally started on Twitter:

  • https://twitter.com/webdevilopers/status/798566284615094272

The question was triggered by an older post by @shijuvar:

  • https://weblogs.asp.net/shijuvarghese/cqrs-commands-command-handlers-and-command-dispatcher

Later @gnugat and @mauroservienti joined the discussion and @Selrahcd opened a gist here:

  • https://gist.github.com/SelrahcD/d56f19bd832060dedad29a6ba3b842b1

Voting results:

  • https://twitter.com/webdevilopers/status/799322124242612224

In the end I pretty much agree with @Selrahcd

I guess a service and an abstract command are quite the same in the end, so yes, an abstract command would work. I won't use the same command yet and keep the two "real" commands separated.

webdevilopers avatar Nov 23 '16 21:11 webdevilopers