Sometimes my Aggregate will be very simple; some scenarios are simply not complex enough to require deep trees of objects and relations.
Consider a Website Monitoring application, which periodically pings a URL to check if it is alive.
The Web App will have:
- Id
- FriendlyName
- URL
- IsAlive
It doesn't have much data, doesn't have child objects (except maybe for URL being a Value Object) and will certainly not have much invariants - if any - to enforce either, at least not at this time.
Now some say that because it is not modelling a more complex model, with relationships and internals and whatnot, it is not an Aggregate, it is only an Entity.
The thing is, I don't think that complexity or size should be dictating if it's an Aggregate, Entity or Value Object, but rather its MEANING.
For the Web Application Monitoring domain, that Web App "entity" is the root model, it's what is going to be returned from a Repository. If the domain expert brings new requirements, they will be related to that Web App model.
So, for me, I believe it makes it a WebAppAggregate, rather than a WebAppEntity.
Question: is my line of thinking correct, or did I get it all wrong? Thanks in advance.