I have been reading several event sourcing articles and examples. I have seem some as verbs, and others name as nouns with both of which might have event tacked on the end. Which is more correct? One example would be. OrderShippedEvent ( or sometimes just OrderShipped) vs ShipOrderEvent. The tense of the methods that operate on these types of objects have not helped much either. Here are some examples I've found.
process(OrderShippedEvent);
or
apply(ShipOrderEvent);
in other cases there will be handlers like
HandleOrderShipped(OrderShippedEvent)
or
HandleShipOrder(ShipOrderEvent)
I assume there should be a standard way to name and handle any type of events in any context, although I'm most interested in an Event Sourcing scenario.
Well, they mean different things:
They are smilar to the FormClosing/FormClosed events of the System.Windows.Forms.Form class in .NET. So, rather than suggesting what name to use, I'd rather suggest that you think what you want to represent by your event, and name it accordingly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With