Modeling Object History

We are developing a system, and one of our requirements is the ability to record various events that are accepted on our domains as they go through their life cycle. Few of me think that we should store all these events as β€œCommand” objects with associated metadata (actor, date / time, etc.), but this is based on the fact that I used it to implement Undo / Redo in the past that is not necessary conditions here. We also have an additional difficulty in that some actions act on several types of entities, while others are more restrained.

Does anyone have any experience? Is using Command appropriate or is there an easier way to do this?

TIA

+3
source share
1 answer

Instead of storing received events, an alternative could be to archive the past state of an object.

+6
source

Source: https://habr.com/ru/post/1760746/


All Articles