-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add the AggregateMessageHandler
interface, and associated types.
#1
Conversation
I am still not very happy with Edit: referring to its name, specifically. |
When looking at the closest synonyms of scope: context and span, they both are meaningful in their own areas while scope is not used anywhere that much. TBH, I don’t know why scope is so unattractive. To me it’s quite a fit. |
I don't think it's so much that the word "scope" is bad, but that the name |
I've pushed some fairly substantial changes to the documentation after working through it with @koden-km. There is one other issue I feel that should be raised in this PR, which is whether or not In Ax, aggregates are created whenever they receive a command. We do have the ability to "complete" a saga of any type, including aggregates. The exact meaning of complete depends on whether the saga is using CRUD or ES persistence. "deletion" proper doesn't make much sense when doing ES, but as it stands, there would be no way to delete a CRUD aggregate with the Dogma interfaces. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The docs are much clearer now. Just the suggestions/questions.
Docs are good now. As for
|
The application. The way the equivalent methods work for workflows is that
These are all valid points and approaches. I would expect these decisions to be considered "implementation defined", that is, engine specific. You could even have an ES implementation which stores events to represent create and destroy operations then only loads state from the most recent create event. It sounds like we agree that these are a necessity for any CRUD-based engine, anyway. On a slightly different note, I believe these operations might be a good fit from an "expressing intent" point of view as well. Some aggregates merely need to track their existence, without further state. These methods would provide a way to do that without having to define an |
I will merge this PR, and create a separate one for further discussion and implementation of the create/destroy operations. |
I've brought the
Aggregate
interface over from the old repo, and made some terminology changes to bring the naming more into line with official DDD terminology.The
Aggregate
interface is now namedAggregateMessageHandler
, to make it clear that the interface is to an object that handles messages, not "the aggregate" itself, which more correctly refers to a "collection of domain objects".The
AggregateState
interface is now namedAggregateRoot
, to reflect that fact that it is just the interface to the root object within the aggregate.