Skip to content
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

Update user view on TodoWasMarkedAsDone #28

Merged
merged 2 commits into from
Sep 18, 2015

Conversation

codeliner
Copy link
Member

This PR adds the UserProjector as a listener to the TodoWasMarkedAsDone event so the the user view gets also updated correctly.

@DannyvdSluijs I'm sorry. I've forgotten to list this step in the exercise issue. My bad. Can you review my changes because you are responsible for the exercise 😃 ?

The read_user table needs to be updated too, because read tables are not normalized. Each table corresponds to a view in the UI and includes all data required to serve the UI. This allows for very fast read queries without any expensive joins.

/cc @prolic

@prolic
Copy link
Member

prolic commented Sep 18, 2015

Looks good, sorry that I didn't notice it already yesterday.

@codeliner
Copy link
Member Author

@prolic np. The PR by @DannyvdSluijs was perfect so accepting and merging it was absolutely right.
The product owner (me 😄) did not define the feature correctly. But that is the reason why we have a develop branch. The product owner can verify the implementation and request further changes before the feature is going to production (master branch)

/cc @danizord ;)

@DannyvdSluijs
Copy link

Seems correct, just missing a single php doc. But is in line with my commits / PR, and actually proofs that the general concept is working. As we forgot a single piece of functionality which was actually pretty isolated in the code.

@codeliner
Copy link
Member Author

@DannyvdSluijs Missing phpdoc is added. Good catch 👍

actually proofs that the general concept is working.

Yeah, that is the power of event sourcing and read models. You can add as many views as you need just by adding a projector as a listener on the related domain events and populate the view. I can no longer live without it because you can provide high quality and ultra fast data analysis based on the event stream and/or aggregated data.

codeliner added a commit that referenced this pull request Sep 18, 2015
Update user view on TodoWasMarkedAsDone
@codeliner codeliner merged commit f312459 into prooph:develop Sep 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants