, 26 tweets, 12 min read Read on Twitter
I write a #DDDesign series about "domain facts" and ask you to please help me 🙏 by liking, sharing or challenging the individual sentences in this thread. I categorize "domain facts" into (a) domain events and (b) domain statements: commands, queries and documents. 😊 (1)
A "like" expresses agreement with a sentence. A "retweet" doesn't express anything aside of interest and your kind willingness to help me with your own follower power! 🖖 Your "reply" comments a sentence. Thank you very much! We love #DDDesign and I love you all. ❤️ (2)
While we discuss commands, queries and documents in #DDDesign, we do not often discuss such statements as if they were observable historical facts in themselves, and as if they needed to be at least temporarily recorded in order to continue a meaningful domain conversation. (3)
Domain events describe "something that has happened in the past". Humans use past tense to describe things that happened in the environment surrounding them and happened in a way observable for them. (4) #DDDesign
Such events might have occurred as a domain relevant (maybe intermediate) "outcome" of some other actor's action or because of less intentional things going on in our environment, like e.g. the observable fact that the wind direction suddenly changed. (5) #DDDesign
We may also decide to describe the passage of time itself as an ongoing "occurrence" which actors can observe and which therefore influences their behavior on an ongoing basis. (@mathiasverraes recently wrote a post about that as part of a cool series of posts.) (6) #DDDesign
I think there is another category of very domain relevant facts aside domain events. These are the statements expressed by actors. Other actors can directly observe such statements in their environment. They may, but do not necessarily need to be addressed by them. (7) #DDDesign
In a way, statements also reflect things that have happened in the past. But contrary to directly observable "state transitions" in a constrained world of matter and information, "statement transitions" occur inside of an actor's unconstrained world of thoughts. (8) #DDDesign
These facts occur the moment an actor mentally and internally decided to command other actors, to query other actors or to simply document its own, internal state for other actors. As thoughts are free, the actor is not constrained in doing so in any way. (9) #DDDesign
Our languages distinguish three types of statements and three kinds of punctuation marks for these three kinds of imperative, interrogative and declarative statements humans exchange: the exclamation mark, the question mark and the dot. (10) #DDDesign
We do not just use past tense, when expressing ourselves with statements, but we typically use imperative mood for commands as well as other tenses for queries and documents, e.g. present tense if we document our current state to other actors. (11) #DDDesign
Similar to events, the moment a statement was expressed, the actor's internal decision to express itself becomes observable for other actors. Therefore the statement itself becomes a new fact of the observable world. It can't be changed anymore. (12) #DDDesign
All the influences a new fact has on other actors already start to happen. In that sense, what has been ordered, cannot be unordered anymore, what has been asked cannot be unasked anymore, what has been said, cannot be unsaid anymore. (13) #DDDesign
This truth must of course be differentiated from actors' abilities to compensate for previous actions or statements by making additional explicit statements or by communicating implicitly and creating factual change in the physical environment observable by others. (14) #DDDesign
When we model any such intentional state transition created by actors as domain events in software, we are well advised to also represent the fact that an actor decided *not* to react to another actor's statement, even though that was expectable by the other actor. (15) #DDDesign
This way, we mimic the observability of the fact that "nothing happened" in reality. When my wife reads a book and asks me to bring her a coffee (a command, in fact), my brain, even though processing, may subconsciously decide not to react. And my wife can observe! (16) #DDDesign
By recording new domain facts (statements and events) in our short term memory, if not for longer, we bring ourselves in the position to protect our integrity and invariants during an eventually consistent conversation consisting of many statements and events. (17) #DDDesign
Because I remember I "commanded" #Amazon to dispatch a pair of shoes, I am now in a position to deal with concurrently happening offers from others. Because I know I ordered and I trust on probabilities, I can protect the limits of my money and my shoe cabinet. (18) #DDDesign
Likewise, I may decide to remember observations of domain facts happening around me. Because I know I didn't create them, my trust in them might be lower. They may however also help me to detect redundant information and to sort out ordering issues I may suspect. (19) #DDDesign
Loading "factsourced" #DDDesign aggregates means to apply all recorded statements and events to reconstruct state. When modelling a domain with "facts", collaboration on eye-level emerges, with aggregates working through small tasks as well as sagas and business processes. (20)
"Handling an incoming fact" for such a #DDDesign aggregate means to accept all types of domain statements as well as events as incoming stimuli and as outgoing new facts. Provided all observable reactions are properly modelled facts, handlers always "succeed" - technically. (21)
Please be patient. ☺ I might not "react" to your answers and helpfulness I hope for anytime soon. My body is currently under a lot of physical stress and my brain is occupied with #DDDesign concurrently. I love you. 🤟 And I'll be back! (22) #DDDesign. (End of Thread. Almost.)
You find my blog at medium.com/plexiti. I wrote a few posts about the topic in 2018, probably not always using best terms yet. I am working on that! Please also help to find out who deserve credits. Kudos @PatHelland and @ericevans0! (23) #DDDesign. (End of Thread. For Now.)
@PatHelland @ericevans0 So, aside events, the material change in our world, our statements also become historical facts, but express immaterial change in our mind. Once some statements have been made, a little time has passed, the action can be executed! I wish you a wonderful weekend! 🏖️ (24) #DDDesign
@PatHelland @ericevans0 Ah, one more thing. I got a private hint that a "statement" in english is a sentence ending with a dot. Thank you so much! It could mean we should call the immaterial facts "sentences" (spoken) with commands given, questions asked, statements made as subcategories? (25) #DDDesign
@PatHelland @ericevans0 I like that pretty much ... because a stage play really consists of visible events and actors speaking sentences. For the attentive observer and connoisseur of the piece's domain language, the facts gradually merge into a consistent picture. (26) #DDDesign
Missing some Tweet in this thread?
You can try to force a refresh.

Like this thread? Get email updates or save it to PDF!

Subscribe to Martin Schimak
Profile picture

Get real-time email alerts when new unrolls are available from this author!

This content may be removed anytime!

Twitter may remove this content at anytime, convert it as a PDF, save and print for later use!

Try unrolling a thread yourself!

how to unroll video

1) Follow Thread Reader App on Twitter so you can easily mention us!

2) Go to a Twitter thread (series of Tweets by the same owner) and mention us with a keyword "unroll" @threadreaderapp unroll

You can practice here first or read more on our help page!

Follow Us on Twitter!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just three indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3.00/month or $30.00/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!