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

Add view models to all forms and controls #292

Open
ekolis opened this issue Feb 4, 2024 · 2 comments
Open

Add view models to all forms and controls #292

ekolis opened this issue Feb 4, 2024 · 2 comments
Labels
technical debt Things that would make the code cleaner but deliver little to no value to users.
Milestone

Comments

@ekolis
Copy link
Owner

ekolis commented Feb 4, 2024

What needs to be cleaned up?
We need to add view models to all of our forms and controls in the UI. And get rid of any properties on the existing model that needed to be moved to the view model, unless the backend also needs them.

How will this benefit us?

Separating UI-related model code from backend data storage related model code will make the game more maintainable. We already have duplicate properties on objects for the "real" property and the "reference" property. Might as well split those into a view model and a data model; that's a perfect way to break them up without breaking serialization.

What potential drawbacks are there to making this change?

Time wasted, duplicate code

** Notes **
This is part of #287.

@ekolis ekolis added the technical debt Things that would make the code cleaner but deliver little to no value to users. label Feb 4, 2024
@ekolis ekolis added this to the alpha-10 milestone Feb 4, 2024
@ekolis
Copy link
Owner Author

ekolis commented Feb 4, 2024

Oh, wait a second, what if we need the real property from inside the model too, for accessing related data? Do we need a data model, a model, and a view model?

@ekolis
Copy link
Owner Author

ekolis commented Jun 9, 2024

Oh, wait a second, what if we need the real property from inside the model too, for accessing related data? Do we need a data model, a model, and a view model?

yes we do, see #312

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
technical debt Things that would make the code cleaner but deliver little to no value to users.
Projects
Status: To do
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant