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

Issue #63: Architecture refacto: inversion of repository/domain dependency #64

Merged
merged 4 commits into from
Mar 10, 2024

Conversation

caarmen
Copy link
Owner

@caarmen caarmen commented Mar 9, 2024

Issue #63

In an attempt to be a bit closer to more common clean archi practices:

  • Introduce WithingsRepository as an abstract class
  • Introduce WithingsDbRepository as a concrete class which implements WithingsRepository. The implementation is mostly what the previous withingsrepository module did.
  • Provide an instance of WithingsDbRepository to the use cases, instead of providing an instance of AsyncSession.
  • Remove mappers between (old) repo objects and domain objects.

Similar changes for fitbit.

@caarmen caarmen force-pushed the issue-63-refactor-archi branch 7 times, most recently from c50e65c to 74d1122 Compare March 10, 2024 17:15
caarmen added 4 commits March 10, 2024 19:50
In an attempt to be a bit closer to more common clean archi practices:

* Introduce `WithingsRepository` as an abstract class
* Introduce `WithingsDbRepository` as a concrete class which implements `WithingsRepository`. The implementation is mostly what the previous `withingsrepository` module did.
* Provide an instance of `WithingsDbRepository` to the use cases, instead of providing an instance of `AsyncSession`.
* Remove mappers between (old) repo objects and domain objects.
ithings
In an attempt to be a bit closer to more common clean archi practices:

* Introduce `FitbitRepository` as an abstract class.
* Introduce `FitbitDbRepository` as a concrete class which implements `FitbitRepository`. The implementation is mostly what the previous `fitbitrepository` module did.
* Provide an instance of `FitbitDbRepository` to the use cases, instead of providing an instance of `AsyncSession`.
* Remove mappers between (old) repo objects and domain objects.
We don't use AsyncAttrs anymore since we introduced repositories.
@caarmen caarmen force-pushed the issue-63-refactor-archi branch from 530b19c to 0e5eb61 Compare March 10, 2024 18:52
@caarmen caarmen marked this pull request as ready for review March 10, 2024 19:09
@caarmen caarmen changed the title Issue #63: Use more common clean architecture pattern Issue #63: Architecture refacto: inversion of repository/domain dependency Mar 10, 2024
@caarmen caarmen merged commit e62a7b2 into main Mar 10, 2024
2 checks passed
@caarmen caarmen deleted the issue-63-refactor-archi branch March 10, 2024 19:11
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.

1 participant