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

Implement Unit of Work. Implement Identity Map and Factory patterns for each entity. #24

Closed
vartanbeno opened this issue Nov 18, 2018 · 0 comments
Assignees
Labels
enhancement New feature or request requirement

Comments

@vartanbeno
Copy link
Owner

No description provided.

@vartanbeno vartanbeno added enhancement New feature or request requirement labels Nov 18, 2018
@vartanbeno vartanbeno self-assigned this Nov 18, 2018
@vartanbeno vartanbeno changed the title Implement Unit of Work. Implement Factory pattern for each entity. Implement Unit of Work. Implement Identity Map and Factory patterns for each entity. Nov 18, 2018
vartanbeno added a commit that referenced this issue Nov 18, 2018
See #24

Signed-off-by: vartanbeno <vartanbeno@gmail.com>
vartanbeno added a commit that referenced this issue Nov 19, 2018
See #24

Signed-off-by: vartanbeno <vartanbeno@gmail.com>
vartanbeno added a commit that referenced this issue Nov 19, 2018
See #24

Signed-off-by: vartanbeno <vartanbeno@gmail.com>
vartanbeno added a commit that referenced this issue Nov 19, 2018
See #24

Signed-off-by: vartanbeno <vartanbeno@gmail.com>
vartanbeno added a commit that referenced this issue Nov 19, 2018
See #24

Signed-off-by: vartanbeno <vartanbeno@gmail.com>
vartanbeno added a commit that referenced this issue Nov 19, 2018
See #24

Signed-off-by: vartanbeno <vartanbeno@gmail.com>
vartanbeno added a commit that referenced this issue Nov 19, 2018
See #24

Signed-off-by: vartanbeno <vartanbeno@gmail.com>
vartanbeno added a commit that referenced this issue Nov 19, 2018
See #24

Signed-off-by: vartanbeno <vartanbeno@gmail.com>
vartanbeno added a commit that referenced this issue Nov 19, 2018
For Register, you make the UserFactory create a new User object.

For AcceptChallenge, you make the ChallengeFactory register the dirty Challenge object (because we update its status).
You also create a new Game object with GameFactory.

For both Register and AcceptChallenge, after doing all the work, you get the current instance of UoW, and commit its work.
The changes will now appear in the database.

See #24

Signed-off-by: vartanbeno <vartanbeno@gmail.com>
vartanbeno added a commit that referenced this issue Nov 19, 2018
See #24

Signed-off-by: vartanbeno <vartanbeno@gmail.com>
vartanbeno added a commit that referenced this issue Nov 19, 2018
The methods delegate to the method of the same name with all of the domain object's properties.

Example:
UserFactory has 2 createNew() methods:
- One taking in ID, version, username, password.
- One taking in a whole User object.
The second one calls the first one with all of the User object's properties.

See #24

Signed-off-by: vartanbeno <vartanbeno@gmail.com>
vartanbeno added a commit that referenced this issue Nov 19, 2018
See #24

Signed-off-by: vartanbeno <vartanbeno@gmail.com>
vartanbeno added a commit that referenced this issue Nov 19, 2018
We are finally not using OutputMappers in the Presentation layer.

See #24

Signed-off-by: vartanbeno <vartanbeno@gmail.com>
vartanbeno added a commit that referenced this issue Nov 19, 2018
The updating was being done in CardInPlayOutputMapper, but we should intertwine entities.
We registerDirty the Game object in the transaction script.

See #24

Signed-off-by: vartanbeno <vartanbeno@gmail.com>
vartanbeno added a commit that referenced this issue Nov 19, 2018
The updating was being done in CardInPlayOutputMapper, but we should intertwine entities.
We registerDirty the Game object in the transaction script.

See #24

Signed-off-by: vartanbeno <vartanbeno@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request requirement
Projects
None yet
Development

No branches or pull requests

1 participant