Question

Trying to convert some entities into value objects I am stuck in a case where what seems a value object must be unique within an aggregate.

Suppose we have a Movie entity which makes the root of an aggregate. This Movie entity is related with some set of AdvertisementEvent objects with the role of displaying an advertisement at certain timestamp.

The AdvertisementEvent contains a link to some Banner that must be displayed, the coordinates and some effect filters.

Since AdvertisementEvent is just a collection of configuration parameters I am not sure if I should care about its identity and treat it like just a large value object. However I do care that within a Movie there must be only one AdvertisementEvent at a certain timestamp, probably even around the timestamps.

I find hard to split my doubts in multiple independent questions, so there they go:

  1. Does a collection of configuration parameters sounds like a value object?
  2. Am I mixing the concept of uniqueness of AdvertisementEvent within Movie and transactional integrity rule?
  3. Does any of the choices in point (2) implies that AdvertisementEvent must be a member of the aggregate made by Movie?
  4. Is my AdvertisementEvent object an Entity, a Value Object or an Event Object? (I used the Event suffix in the name to highlight my confusion)
  5. Are large value objects like this a design smell?

I guess that I am not dealing with an Event in the sense of DDD because it is not something that just happens. The real DDD event should be something more like AdvertisementEventReached

No correct solution

Licensed under: CC-BY-SA with attribution
scroll top