Skip to content

Commit

Permalink
#7 Added a special tip regarding time-dependent messages
Browse files Browse the repository at this point in the history
  • Loading branch information
yellowbrickc committed Dec 27, 2023
1 parent d525481 commit 385b57e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,19 @@ The message should contain 3 elements:
3. The order in which the message occurs in the flow being modelled

_Note:_ In case of a query, the response is just as important as the request. The information can be seen and represented as one unit, like this
![Message as a query](resources/query-req-resp.png)
<img src="resources/query-req-resp.png" alt="Message as a query" width="250" height="auto">

## Visualisation Tips

The number one problem with Domain Message Flow Diagrams, and diagrams in general, is too much information. [Miller's Law](https://en.wikipedia.org/wiki/Miller%27s_law) is a good heuristic to use here. Aim to have between 5 and 9 messages on your diagram.

If you find that adding the data to each message is breaking your flow of progress, you can defer the data section of each message it until you have placed all of your messages.

### Time-Dependent Messages
Sometimes messages are time-driven. E.g. scenario: cancel an online order after 5 minutes of inactivity. A visualisation like this could work fine. Important is to pay attention to the semantics: **within** or **after** or **every** 5 minutes are very different conditions.
<img src="resources/time-dependent-message.png" alt="Time-dependent Message" width="80%" height="auto">


## Additional Resources

- [DDD Pattern: Library Contexts](https://medium.com/nick-tune-tech-strategy-blog/ddd-pattern-library-contexts-d6ae81f462ef)
Expand Down
Binary file added resources/time-dependent-message.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 385b57e

Please sign in to comment.