The Shape of the Domain Model
This is a bit of a random thought which I had this morning regarding the relationship between the domain model and data.
An instance of the domain model (or parts of it) is a snapshot of the model at a given point in time. Specifically, the state of the model is the snapshot. The configuration of the pieces of data in the model is the shape of the domain model.
If the shape of the domain model corresponds closely to the database schema, changes in the domain model’s shape require data migrations in the database.
It’s not earth shattering, but thinking of the model in terms of shape is an interesting concept to me. Thinking about the evolution of the model’s shape over the lifetime of the application is also a cool concept (ie..shape in relationship to time).