Deprecate generic Repository interfaces in core #7
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
iterative-works/support#7
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Deprecate the generic Repository trait hierarchy in
core/shared/src/main/scala/works/iterative/core/service/Repository.scala.Motivation
The generic Repository interfaces (
GenericLoadService,GenericReadRepository,Repository,WriteRepository,CreateRepository, etc.) don't provide sufficient value to justify their complexity. We've decided to follow a Domain-Driven Design approach where:The current generic hierarchy encourages a one-size-fits-all approach that fights against proper DDD modeling.
Scope
Deprecate:
All traits in
core/shared/src/main/scala/works/iterative/core/service/Repository.scala:GenericLoadServiceGenericUpdateNotifyServiceGenericLoadAllServiceGenericFindServiceGenericReadRepositoryGenericWriteRepositoryGenericCreateRepositoryGenericWriteRepositoryWithKeyAssignmentReadRepositoryWriteRepositoryCreateRepositoryUpdateNotifyRepositoryRepositoryRepositoryWithCreateRepositoryWithKeyAssignmentRelated implementations in core:
InMemoryRepositoryJsStorageRepositoryNot in scope:
FormReadRepository,SubmissionRepository,MessageCatalogueRepository) - these follow the correct DDD approach and will evolve independentlyMigration Path
@deprecatedannotations to all generic Repository traitsChecklist