I am reading Uncle Bob's Agile PPP, Specifically i am reading the SRP part of it, while reading about the principle i got a doubt that is it not that SRP is increasing the coupling in our design with so many small-small classes inter-dependent on开发者_如何学C each other? I know the book says that it reduces coupling but i didn't understand how?
If a class has more than one responsibility then you are coupling those responsibilities together in the one class. By separating them out into their own classes the responsibilities are being decoupled and now each class only has one reason to change.
精彩评论