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

Create data models #312

Open
ekolis opened this issue Apr 21, 2024 · 4 comments · Fixed by #316
Open

Create data models #312

ekolis opened this issue Apr 21, 2024 · 4 comments · Fixed by #316
Assignees
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 Apr 21, 2024

What needs to be cleaned up?

Right now our data models are mixed up with our domain models. This eliminates duplicate code, but makes the models very brittle as any change to the domain model necessitates a change to the data model and vice versa because they are one and the same.

Also let's rename the FrEee project to FrEee.Core to clarify what it is. Maybe put the data models in a separate project called FrEee.Data referenced by FrEee.Core and that alone, to enforce separation of concerns.

How will this benefit us?

Creating separate domain models will make the code flow simpler and more flexible.

What potential drawbacks are there to making this change?

Duplication of code (the reason this wasn't done to begin with)

@ekolis ekolis added the technical debt Things that would make the code cleaner but deliver little to no value to users. label Apr 21, 2024
@ekolis ekolis added this to the beta-1 milestone Apr 21, 2024
@ekolis
Copy link
Owner Author

ekolis commented Apr 21, 2024

This might want to wait on refactoring abilities to be ECS to avoid messing around too much with inheritance in the data model #159

@ekolis
Copy link
Owner Author

ekolis commented May 25, 2024

On the other hand, refactoring the data classes out would tell me what need to be decoupled inheritance-wise...

@ekolis
Copy link
Owner Author

ekolis commented Jun 14, 2024

That PR didn't actually create the data models, but there was some refactoring I wanted to merge.

@ekolis ekolis reopened this Jun 14, 2024
@github-project-automation github-project-automation bot moved this from Done to In progress in FrEee Core Jun 14, 2024
@ekolis ekolis self-assigned this Oct 20, 2024
@ekolis
Copy link
Owner Author

ekolis commented Dec 24, 2024

Made another attempt at this, but the class I chose to data-fy was Hull, which wouldn't work being a generic class, so I tried with not much luck to de-generify it. Maybe this could be revisited after #53 is dealt with, or maybe pick another class to data-fy. Really though, there aren't that many GameReferences in the game to begin with, but it would be nice to make the serializer able to handle changes to classes!

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: In progress
1 participant