DEV Community

ritaCosta93
ritaCosta93

Posted on

Event VS Command

What's the differnce between an event and a command

  • Command
    • What do you want the system to do
    • We expect a response
    • We name the commands so we know what to expect in the response
  • Event

    • What happens when you send a command to the system
    • We don't expect a response, we are just communicating a change
    • The event doesn't have a name, we just trigger it and the magic happens, the rest isn't relevant

    https://whimsical.com/event-driven-pattern-event-vs-command-K3JJ335TJzP8av5ciT6mn1

Discussion (0)