mhinze / ShortBus

In-process mediator with low-friction API
MIT License
210 stars 41 forks source link

Why do Commands return a result instead of Send() being void? #21

Closed jkodroff closed 10 years ago

jkodroff commented 10 years ago

I had always thought the "right way" to do commands was to following CQS and therefore any command should be void (and be assumed to successful or it throws an exception)., but ShortBus doesn't do it that way.

I'd be interested to hear the reasoning for having Commands return results.

mhinze commented 10 years ago

Check out the linked PR and also #15

Sometimes commands return a result. In HTTP after a POST the server should return a 201 with a Location header indicating the URI.