Clean Architecture and Module Dependencies
In his book Clean Architecture, Robert C. Martin gives us a nice guide about how to build well designed systems; how to think about modules, dependencies, boundaries and how the information flows.
From all the interesting ideas one can find in this book, there are a few that I feel I remember very often during my regular work days:
- Frameworks are tools, not ways of life.
- Architecture must be independent from Frameworks, UI, DB and any external agency
- Code Dependencies must only point toward Higher-level Policies
The last one in particular is an idea, a concept that I'm trying to live by.
As a Python programmer, I've been always bothered by imports inside functions to avoid circular dependencies. Every time I see or have to do it, I feel like something is completely wrong; I feel that dependencies are not pointing to the right direction.