When working closely with the business stakeholders - which is one of the main pillars of leveraging domain-driven-design - the naming part is most of the time quite obvious. Business people do already know how to name what happened to what part of the system.
The what part of the system will give you the name of the involved entity (or object) while the what happened will give you a verb in the past tense.
When naming the domain events in source code we provide some readable summary of the event which makes it quickly recognizeable as the corresponding event from the business perspective.
You looked at two different naming schemas in your question:
- Schema A: Past tense verb at the beginning
- <past-tense-verb-describing-what-happened><name-of-the-entity-of-interest>
- RegisteredUser
- SentTextMessage
- ShippedOrder
- DeliveredParcel
- Schema B: Past tense verb at the end
- <name-of-the-entity-of-interest><past-tense-verb-describing-what-happened>
- UserRegistered
- TextMessageSent
- OrderShipped
- ParcelDelivered
Appending the ...Event postfix (e.g. UserRegisteredEvent) is of course valid and appending the postfix or not was almost always decided based on the preferences of the teams I've been working with.
When talking about domain events you will also have to consider domain commands. For domain commands you can also add the ...Command postfix. The command represents an order telling you what to do which involves some entity (or object) and some describing verb in it's imperative form.
For instance:
- ShipOrder
- RegisterUser
- SendTextMessage
So let's look again at the following event names from your question as an example using the schema with the past tense verb at the beginning (schema A):
In all cases when I was applying domain-driven design we agreed on using the other schema where the past tense verb is at the end (schema B) and here is why:
The name of the event shall be quickly recognizeable and - which is also very important to me - differentiable from commands even without using ...Event and ...Command postfixes.
I as a reader am having a hard time when I look at the following examples of commands and events using schema A:
- SentTextMessage (event) vs. SendTextMessage (command)
- RegisteredUser (event) vs. RegisterUser (command)
But when I use the other form of event naming (schema B) it is getting a lot easier for all involved people be it in drawings, written architectural documentation, source code, etc., e.g.:
- TextMessageSent (event) vs. SendTextMessage (command)
- UserRegistered (event) vs. RegisterUser (command)