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

Tight Coupling Between DataBlobs and Entity Class Prevents Use of ProtoEntities in Factories #379

Open
DifferentLevelDan opened this issue Oct 28, 2023 · 0 comments

Comments

@DifferentLevelDan
Copy link
Contributor

Problem:

The current implementation of DataBlobs is tightly coupled with the Entity class, making it challenging to use ProtoEntities within Factories for building entities. This architectural decision restricts the flexibility of our entity creation and validation process.

Scope:

Entity Class
DataBlobs
Factories
ProtoEntities

Impact:

Limits the effectiveness of ProtoEntities as a way to build or manipulate entities before adding them to the manager.
Inhibits the use of centralized validation or factory methods for creating entities, potentially leading to inconsistent or invalid entities.

Expected Behavior:

Factories should be able to use ProtoEntities to construct new entities without any dependencies on the Entity class. This would make it easier to perform centralized validation and transformations during entity creation.

Steps to Reproduce:

Try to create an entity using a Factory that leverages ProtoEntities.
Observe that the Factory cannot proceed without involving the Entity class due to the tight coupling with DataBlobs.

Suggested Solutions:

Refactor DataBlobs to be more decoupled from the Entity class.
Introduce an interface or abstract base class that both Entity and ProtoEntities can implement, making it easier to interchange them in Factories.

Acceptance Criteria:

Factories can create entities using ProtoEntities.
DataBlobs can exist independently of the Entity class.

Additional Information:
This is blocking Factory Refactor in issue #376 and therefore also Entity DataBlob Validation in issue #375

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

No branches or pull requests

1 participant