Architectures allow decoupling different units of your code in an organized manner. That way the code gets easier to understand, modify and test.
If you have learned about SOLID principles, you may have read about Dependency Inversion. But, as with many of these concepts, it’s possible that you didn’t understand how to apply it. The dependency inversion is the “D” of SOLID, and this is what it states:
- High-level modules should not depend on low-level modules. Both should depend on abstractions. Just remember not to add dependencies to the outer modules from the inner ones.