single-responsibility-principle
Graph limitations - Should I use Decorator?
I have a functional AdjacencyListGraph class that adheres to a defined interface GraphStructure. In order to layer limitations on this (eg. acyclic, non-null, unique vertex data etc.), I can see two p[详细]
2022-12-24 05:54 分类:问答How do you determine how coarse or fine-grained a 'responsibility' should be when using the single responsibility principle?
In the SRP, a \'r开发者_运维问答esponsibility\' is usually described as \'a reason to change\', so that each class (or object?) should have only one reason someone should have to go in there and chang[详细]
2022-12-23 16:22 分类:问答Does having a method do more than one thing violate the Single Responsibility Principle?
For my purposes, I need to search for a specific node in an xml file and, if found, delet开发者_高级运维e it.Should I pull search functionality out into its own method and delete functionality out int[详细]
2022-12-22 07:15 分类:问答Help understanding the Single Responsibility Principle [closed]
Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing[详细]
2022-12-20 13:06 分类:问答Designing database interaction while following Single Responsibility Principle
I\'m trying to adhere to Single Responsibility Principle better, and I\'m having issues grasping how to structure the general class design for communicating with a database. In a simplified version, I[详细]
2022-12-16 21:17 分类:问答Validating a domain object for persistence
In the system I\'m currently working on, I\'m following SRP (I think!) by separating the validation of domain business rules vs persistence constraints.Let\'s employ the overused customer example.Say[详细]
2022-12-14 15:24 分类:问答Is Form validation and Business validation too much?
I\'ve got this question about form validation and business validation. I see a lot of frameworks that use some sort of form validation library. You submit some values and the library validates the val[详细]
2022-12-14 13:57 分类:问答At what level of abstraction does Single Responsibility Principle (SRP) no longer make sense?
I\'m getting push back on a design from a colleague, and am wondering if there\'s consensus as to who is correct on application of SRP in this case.[详细]
2022-12-13 19:49 分类:问答Difference between Single Responsibility Principle and Separation of Concerns
开发者_StackOverflow社区What is the difference between Single Responsibility Principle and Separation of Concerns?[详细]
2022-12-11 01:53 分类:问答