Snapshot
Represent the public state of an object at a point in time
Temporality is often considered important when talking Snapshot.
In our case, it's a side effect. The most important property of a Snapshot is that it's a value representing what an object is willing to expose, in order to be saved into a database or to be serialized for public access.
Our snapshot system needs two methods
A snapshot method : to create a snapshot of the specific object
A fromSnapshot static factory : to create an object from the snapshot
The following property must be true.
Snapshot often follows a composite structure : nested objects also need to be snapshotted, so they must also implement a Snapshottable interface.
Last updated