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

Remove Entities from outer layers using DTOs #26

Merged
merged 3 commits into from
Dec 2, 2021
Merged

Remove Entities from outer layers using DTOs #26

merged 3 commits into from
Dec 2, 2021

Conversation

JasonW029
Copy link
Contributor

@JasonW029 JasonW029 commented Nov 30, 2021

This PR removes all references to Entities from the Controllers, instead replacing them with a simple Data Transfer Object representation.

A significant change for the UI implementation would be the requirement that the Controllers "select" which item that they will work on before every action, rather than being able to simply pass in an object of its choosing. I'm tired right now so I may take another look at this system in the future.

Due to the reliance on mutation for our previous implementation of the Controllers, many changes had to be made to ensure that the same objects internally were being mutated as the copy specified from the Controller. I have done a bit of testing on the CLI demo, and it seems to work as before, at least for the parts which are functional in the CLI.

Note that the database has yet to be modified to fit the changes in the PR.

Closes #31.

@JasonW029 JasonW029 linked an issue Dec 2, 2021 that may be closed by this pull request
@JasonW029 JasonW029 linked an issue Dec 2, 2021 that may be closed by this pull request
@JasonW029 JasonW029 merged commit 23f5282 into main Dec 2, 2021
@JasonW029 JasonW029 deleted the use-dtos branch December 2, 2021 22:43
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.

Avoid referencing entities within controllers
1 participant