3 ms·
I think this is a very well written article with great examples. However, I would give the same criticism as I would to the SRP (Single Responsibility Principl
by cloogshicer 5y ago
I think this is a very well written article with great examples.
However, I would give the same criticism as I would to the SRP (Single Responsibility Principle): What exactly is a "reason to change"?
In my experience, it is rarely as clear as in the examples that were given. This vagueness of the SRP has always bothered me. In my opinion, this problem invalidates (or at least weakens) the entire SOLID concept and many of the Gang of Four patterns with it.
- iovrthoughtthis 5y agomy understanding is that a "reason to change" is entirely context dependent, so difficult to make concrete. what are you seeking to understand as a result of knowing precisely what a "reasons to change" is?
- cloogshicer 5y ago> my understanding is that a "reason to change" is entirely context dependent, so difficult to make concrete. Agreed. The problem is that the SRP mandates that you make decisions based on this vaguely defined concept.
- mrloba 5y agoThis is is the crux. It's possible to justify any and all designs using the single responsibility principle / separation of concerns. I've seen plenty of bad designs rationalized this way. Answering your question (or "what is _one_ thing?") is often called an art, and seems to be learned through experience. Though I do wonder if it's possible to teach as well. So far in this industry we teach it using rules of thumb and "principles", but it doesn't seem to work very well.
- deleted 5y ago[deleted]