android-modular-architecture icon indicating copy to clipboard operation
android-modular-architecture copied to clipboard

Repository is not glued to Interface

Open alirezaeiii opened this issue 4 years ago • 1 comments

Thank you for the great sample. I wonder why You do not have an interface for MarvelRepository or any other Repositories in your core module. You are following SOLID principles, and that is D is SOLID to follow dependency inversion.

High-level modules should not depend on low-level modules. Both should depend on abstractions (e.g., interfaces)

Using interfaces will also simplify unit testing.

Were there any specific reason that you did not use interface for Repository?

alirezaeiii avatar May 04 '21 09:05 alirezaeiii

@vmadalin can I make the interfaces for your repositories and rather than providing Repository implementation , provide The interface abstraction, which would make the code less tightly coupled, and will also make it easier for testing. Can u assign this to me?

Vaibhav2002 avatar Oct 07 '21 10:10 Vaibhav2002