...

/

Decoupling with Interfaces

Decoupling with Interfaces

Let’s learn about the drawbacks of loose coupling with our repository.

The clean architecture we’ve built in the previous chapters defines a use case that receives a repository instance as an argument and uses its list method to retrieve the contents. This allows the use case to form a loose coupling with the repository, which is connected only through the API exposed by the object. It isn’t connected to the real implementation. In other words, the use cases are polymorphic with ...