Domain Driven Project - General Behavior

Imagine that in a DDD-inspired system, we got multiple bounded contexts, each with a variation of the Person domain object.

How are we going to design the behavior that is common to all of these different Person objects?

Are we duplicating this behavior in every Person class, or are we using something like a domain service? I am a bit confused.

Share your thoughts.

+3


source to share


1 answer


Set that you have general bounded contexts. Don't get caught up in the wrong crowd - think that the individual bounded contexts are shared and therefore should be everywhere. People hear that they are important and therefore I must have some!

In a domain model, there are ways to model things, people, and places that act in different roles (contexts). This is one of the most common problems in domain name modeling.

A person can act (participate) as a Client, Supplier, TeamMember, AwardRecipient and SocialGroupMember.



At the airport there may be departures, ArrivalGate and possibly from time to time EmergencyGate.

The product can be ProductBeingSold, ProductBeingReturned, ProductUnderDevelopment.

All of them, as a rule, are modeled in one domain representing the problem under consideration.

0


source







All Articles