Hacker News new | ask | show | jobs
by nfgivivu 1328 days ago
I'd settle for developers just making sure events were events that have happened and not action commands they want to happen.

Nothing is worse than an event driven system polluted with action commands.

1 comments

I agree in principle, but I also to need action commands when crossing boundaries in and out of the event system (e.g. to the user, or to an external provider.) Of course I still phrase them in the past tense:

    PurchaseRequested { userId = ... }

    PaymentRequestSentToStripe { userId = ... }
It really helps with debugging, especially if the user gets into some failed state (and the events tell you that they accidentally requested twice)
Of course you need command actions. All I'm asking is that you stop mixing them up with events.

Whether you're mixing or not is hard to tell if you're fudging the wording.

Whats the point of the payment request sent to stripe event? Does it trigger a stripe API request or is it emitted after an API request to stripe is made?