Events vs Commands in Event-Driven Architectures, when to use which?

แชร์
ฝัง

ความคิดเห็น • 7

  • @RaulMercado
    @RaulMercado 5 หลายเดือนก่อน +1

    Thank you for the video, very instructive and clear.

    • @theburningmonk
      @theburningmonk  5 หลายเดือนก่อน

      Glad you enjoyed it!

  • @CyrilCommando
    @CyrilCommando 7 วันที่ผ่านมา

    The tech industry seems to disagree with me that if it's functionally the same, it's the same. Yes, there are architectural and conceptual differences, perhaps you could argue they function differently simply because of where the consumer is placed in the design, but I can either have a global function callable in an event, perform the function directly in the event handler, or call a command from an event handler. If we aren't talking about command line programs, commands will be invoked by an event on the user interface. & if it is a decent design the user interface will need to react. There is no ultimate difference in function whether it's a command, event handler method call, or inline procedure in the event handler. Although from my experience in WPF, commands make it much harder for the control to properly react.

  • @XStrikeSuper
    @XStrikeSuper 5 หลายเดือนก่อน

    How is Command is different from Lambda Invoke? You can wait for response from lambda invoke

    • @theburningmonk
      @theburningmonk  5 หลายเดือนก่อน

      Conceptually they're different things. Events and commands are used to model your system's behaviour and their interaction, and a Lambda function is used to carry out some business logic in response to an invocation request.
      In your example, the invocation event might be a "command", if the event carries a message that requests some action to be performed. But Lambda functions can be invoked in response to an event too.
      Commands often follow a request & response pattern, but not all request & response communications are related to processing commands.

  • @markraven6950
    @markraven6950 5 หลายเดือนก่อน +1

    awesome content

    • @theburningmonk
      @theburningmonk  5 หลายเดือนก่อน +2

      thank you, glad you liked it!