3 ms·
To me Single Responsibility means that the code should do one thing and one thing only, on the abstraction level which it exists. The example given by OP is ab
by surfsvammel 6y ago
To me Single Responsibility means that the code should do one thing and one thing only, on the abstraction level which it exists.
The example given by OP is about ETL. Is that one thing or more than one thing? It depends on the abstraction level. If you are talking about a data access object, sure let it do all those things because when considered on that abstraction layer it does one thing, access data.
But if you are looking at individual functions or methods, that is one abstraction layer further down, then S in SOLID says you should not mix extraction and transformation, for example.
It all depends on context and SOLID are principles not law.