Chapter 2

Inverting Dependencies

After the rant about layered architecture in the previous chapter, you are right to expect this chapter to discuss an alternative approach. We will start by discussing the Single Responsibility Principle and the Dependency Inversion Principle. They are the "S" and the "D" of the SOLID principles, which you can read about in detail in "Clean Architecture" by Robert C. Martin or on Wikipedia at

The Single Responsibility Principle

Everyone in software development probably knows the Single Responsibility Principle (SRP) or at least assumes they know it.

A common interpretation of this principle is this:

A component should do only one thing, and do it right.

That's good advice, ...

Get Get Your Hands Dirty on Clean Architecture now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.