You are not logged in. Your edit will be placed in a queue until it is peer reviewed.
We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.
-
Thanks. Are you saying that the application service layer should not access domain objects that are not an aggregate root?w0051977– w00519772017-11-07 16:18:50 +00:00Commented Nov 7, 2017 at 16:18
-
Exactly. And that's mainly because the aggregate root need to be responsible for maintaining the invariants of the aggregateMBouallegue– MBouallegue2017-11-07 16:24:00 +00:00Commented Nov 7, 2017 at 16:24
-
Thanks. Is there a set of guidelines that can be used to design DDD classes? When designing databases you have Normalisation. Is there something similar for the Domain Classes? (which would perhaps show that Invoice is not a valid property of Customer and perhaps an aggregate root in its own right).w0051977– w00519772017-11-07 16:28:02 +00:00Commented Nov 7, 2017 at 16:28
-
Do not fall in the ORM mindset trap: Aggregates often have a very different organisation of state/data than the schema structure, when such state gets persisted in a store/db. You use a Mapper for that (inside a Repository, when implementing its interface in the Application layer): with a mapper you can normalise your data before persisting it. — While for specific domain consistency rules (e.g. InvalidInvoice) you can use Invariants, inside the boundaries of the Aggregate.Kamafeather– Kamafeather2024-10-31 02:15:44 +00:00Commented Oct 31, 2024 at 2:15
Add a comment
|
How to Edit
- Correct minor typos or mistakes
- Clarify meaning without changing it
- Add related resources or links
- Always respect the author’s intent
- Don’t use edits to reply to the author
How to Format
-
create code fences with backticks ` or tildes ~
```
like so
``` -
add language identifier to highlight code
```python
def function(foo):
print(foo)
``` - put returns between paragraphs
- for linebreak add 2 spaces at end
- _italic_ or **bold**
- indent code by 4 spaces
- backtick escapes
`like _so_` - quote by placing > at start of line
- to make links (use https whenever possible)
<https://example.com>[example](https://example.com)<a href="https://example.com">example</a>
How to Tag
A tag is a keyword or label that categorizes your question with other, similar questions. Choose one or more (up to 5) tags that will help answerers to find and interpret your question.
- complete the sentence: my question is about...
- use tags that describe things or concepts that are essential, not incidental to your question
- favor using existing popular tags
- read the descriptions that appear below the tag
If your question is primarily about a topic for which you can't find a tag:
- combine multiple words into single-words with hyphens (e.g. design-patterns), up to a maximum of 35 characters
- creating new tags is a privilege; if you can't yet create a tag you need, then post this question without it, then ask the community to create it for you
lang-cs