Comments (5)
yeah something is off. My guess is that the sprint.commit()
should be accepting a BacklogItemCommited class. And the flow should be BacklogItem.commitTo(sprint) -> backlogItemCommitedEvent() -> sprint.commit(backlogItemCommited)
from iddd_samples.
Passing in
CommittedBacklogItem
would leak business logic into the application service. I suggest that if anything, thecommit(BacklogItem backlogItem)
language could be improved by this:public void assignCommitted(BacklogItem backlogItem) { }
And, no, this operation does not break the
BacklogItem
invariants, because theBacklogItem
is not modified by theSprint
.
Okay that makes sense - however shouldn't the sprint be checking that the backlog item is in fact committed to itself? otherwise if called out of order you have a sprint that thinks a backlog item is committed to it and a backlog item that thinks it has not been committed to a sprint?
from iddd_samples.
You don't send events into the model. Events are translated to corresponding commands. The Sprint
is accepting that a BacklogItem
has been committed to it.
The commit()
command could take on additional responsibility. For example, the Sprint
might know the total commitment that can be taken on. If, for example, any given BacklogItem
causes over-commitment (too much work for the Sprint
), it could emit SprintOverCommitted
, which could lead to a sub-process that helps the team understand how they might most effectively uncommit specific BacklogItem
s.
Still, that doesn't necessarily mean that the Sprint must emit a SprintCommittedBacklogItem
. It depends on the downstream interests or possibly terminating an orchestration. But this is a simple in-context choreography that need not be managed and thus terminated. The commit()
could still emit SprintCommittedBacklogItem
, but apparently, at least for now, no one is interested in knowing that. (And this context is using KV storage, not Event Sourcing.)
from iddd_samples.
You don't send events into the model. Events are translated to corresponding commands. The
Sprint
is accepting that aBacklogItem
has been committed to it.The
commit()
command could take on additional responsibility. For example, theSprint
might know the total commitment that can be taken on. If, for example, any givenBacklogItem
causes over-commitment (too much work for theSprint
), it could emitSprintOverCommitted
, which could lead to a sub-process that helps the team understand how they might most effectively uncommit specificBacklogItem
s.Still, that doesn't necessarily mean that the Sprint must emit a
SprintCommittedBacklogItem
. It depends on the downstream interests or possibly terminating an orchestration. But this is a simple in-context choreography that need not be managed and thus terminated. Thecommit()
could still emitSprintCommittedBacklogItem
, but apparently, at least for now, no one is interested in knowing that. (And this context is using KV storage, not Event Sourcing.)
I apologize, I wasn't saying to send events into the model but rather the action of BacklogItem.commitTo() emits an event. A handler would listen to that event and then utilize the commit
command on the sprint model to inform the sprint model that a backlog item is to be added to the sprint. What confused me a bit was that the sprint took a BacklogItem instead of a CommittedBackLogItem as the parameter. The backlog item being the parameter at first glance makes it seem that calling this would commit the backlog item to the sprint (which technically it does? So it appears like theres two places to commit a backlog item to a sprint). But doesn't this then bypass the model invariants in the BacklogItem that are checked when you call commitTo with a given sprint?
EDIT: Would adding a check in the sprint model's commit
method that checks that the backlogItem's sprintId
is assigned to the same sprint its being committed to make sense here?
from iddd_samples.
Passing in CommittedBacklogItem
would leak business logic into the application service. I suggest that if anything, the commit(BacklogItem backlogItem)
language could be improved by this:
public void assignCommitted(BacklogItem backlogItem) {
}
And, no, this operation does not break the BacklogItem
invariants, because the BacklogItem
is not modified by the Sprint
.
from iddd_samples.
Related Issues (20)
- What's the point of com.saasovation.identityaccess.application.command? HOT 1
- Reference for functional programming
- Can't enable Mysql in EventStoreProvider HOT 1
- [question] implicit dependency from iddd_agilepm to iddd_identityaccess HOT 1
- Store aggregates: mongodb or postgres json
- Why didn't handle the situation that the user doesn't have the role
- Getting Peer not authenticated error when I'm trying to run gradlew build HOT 1
- why some entities in equals(..) use many properties and not only their ID? HOT 3
- Where is the aggregate root? HOT 1
- Why do some contexts contain port & adapter modules and others don't? HOT 3
- A duplicated tracker is created when retrying ProductDiscussionRequest HOT 2
- Build fails because of the version of tools
- The setup script fails
- Updating multiple aggregates in the same transaction? HOT 3
- Post on a closed discussion or closed forum
- How to use ValidationNotificationHandler HOT 1
- State in domain services HOT 3
- Limiting the modification of one aggregate per transaction
- isClosed() considered to be true invariant or not? HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from iddd_samples.