DEV Community

Discussion on: SOLID Programming (Part 1): Single Responsibility Principle

Collapse
 
kwasielew profile image
Krzysztof Wasielewski

Hey, as Uncle Bob said(the creator of SOLID principles) Single responsibility principle is not only about splitting the code to the smallest possible chunks - as in this article - but to split by business domain. There should be only one business/technical/finance etc. reason to change that class.
Here is the link with a good example from SOLID author: blog.cleancoder.com/uncle-bob/2014...

So in my opinion example from this article is not about SRP, but about code splitting.