Tagged Questions
3
votes
4answers
352 views
Are Compiler Directives an Antipattern?
I'm working on a legacy system that has a helper class that is symbolically linked into many different .Net projects within a solution. The logic is riddled with compiler directives that change it's ...
13
votes
9answers
1k views
Can/should the Single Responsibility Principle be applied to new code?
The principle is defined as modules having one reason to change. My question is, surely these reasons to change are not known until the code actually starts to change?? Pretty much every piece of code ...
-1
votes
1answer
500 views
Low Coupling: Single Responsibility Principle vs Cohesion
I've read several articles on SRP and cohesion, and they seem to contradict each other as far as low coupling is concerned.
Articles on cohesion argue that putting closely related responsibilities ...
5
votes
3answers
641 views
What is the difference between Single Responsibility Principle and Separation of Concerns
a)What is the difference between SRP and SoC? Perhaps that SRP is applied at class level, while SoC can be applied at system, subsystem, module, class or function levels.
b) If answer to a) is yes, ...
5
votes
4answers
473 views
How to determine if class meets single responsibility principle ?
Single Responsibility Principle is based on high cohesion principle. The difference between the two is that highly cohesive classes feature a set of responsibilities that are strongly related, while ...
9
votes
6answers
609 views
Struggling with the Single Responsibility Principle
Consider this example:
I have a website. It allows users to make posts (can be anything) and add tags that describe the post. In the code, I have two classes that represent the post and tags. Lets ...