Mark Lennox

28%
Flag icon
Apply the Dependency Inversion Principle (DIP). In the case in Figure 14.3, we could create an interface that has the methods that User needs. We could then put that interface into Entities and inherit it into Authorizer. This inverts the dependency between Entities and Authorizer, thereby breaking the cycle.
Clean Architecture: A Craftsman's Guide to Software Structure and Design
Rate this book
Clear rating
Open Preview