Hello.
I want to apologize for my bad english first. I am trying to implement DDD in my project, but I have some problems I will try to describe. I am developing a chat application. Front-end is quite simple, no rooms, just one window showing last n messages.
- Here comes the first problem. I don't see any entity here (ChatRoom would be ok, but I have only one room). Message seems like value object to me. So I don't know how to save state of chat (I think that having repositories for value objects is a bad practice).
This chat should have one specific feature, it should group and store related messages together (create something like ChatSegment). These segments will be divided by blocks of m off-topic messages (off-topic messages mean messages unrelated to messages in current segment).
- I cannot imagine the way to make this work, without using stateful service. This behavior does not fit into any Entity (not even into the hypothetical ChatRoom entity). Segmenter entity does not seem right either. How would you solve this problem?
Maybe my thoughts are totally incorrect, but I would need to make them clear. Thank you,
Brano.