|
|
|
|
|
by jeremycarter
564 days ago
|
|
It's tricky to provide a really good example right now. I notice in the .NET world there are like these DDD "starter packs", and my god, they're just layers of maintainability hell. If you look at older OOP/DDD books you'll notice that the domain object has real world methods on it, just like as if it were from a UML diagram. What you should end up with are plain OOPy objects that mirror the real world. They're not skewed or constrained by their database model. They shouldn't have any dependencies on your infrastructure layer. The object should encapsulate state, behaviour, validity and consistency. An example (which is probably overkill) would be
https://learn.microsoft.com/en-us/dotnet/architecture/micros... The next post is about modelling an actor and it might provide more insight for you. |
|