Re: [DDD/CQRS] Common models for entities in events/commands/aggregates

86 views
Skip to first unread message

Ben Kloosterman

unread,
Jan 15, 2017, 7:42:01 PM1/15/17
to ddd...@googlegroups.com
Assuming CQRS /ES.

If your domain is simple why use DDD/CQRS if complex dont start with the data, start with the behaviour and fill in the data as you implement behaviour,
ContactInformation is not something i would expect in an aggregate its just info that would normally fly to the read model. eg "A problem would be that there would be lots of properties that aren't required for business rules (but they could just left as nulls?). "  No they should not be in the domain  your letting the data drive the domain. 

Start with a single model refactor it later.  Its fine to violate DRY for business behavior if you cant reuse it  ( for the infrastructure less so but i tend not to worry unless i see lots of repetition)  , SOLID applies to OO  . 


Ben

Reply all
Reply to author
Forward
0 new messages