solid-principles
How to apply Single Responsibility Principle to a service class
Suppose we are designing a UserServiceImpl class which does CRUD (Create, Read, Update, and Delete) operations. In my view Create, Read, Update, and Delete are four reasons for a class to change. Does[详细]
2022-12-26 18:05 分类:问答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 分类:问答Real world Opensource c# applications showing good code [closed]
开发者_如何学C As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references,or expertise, but this question will likely sol[详细]
2022-12-20 05:04 分类:问答SOLID SRP and FluentNhibernate entities
this class is from http://wiki.fluentnhibernate.org/Getting_started it has some logic in it and I think this violates the Single Responsibility Principle, how do you think, how would you resolve this[详细]
2022-12-17 15:24 分类:问答Robust Code framework?
I hate writing code that makes my software more solid. This is something the framework should have done! So, is anybody aware of a code \"enhancing\" utility that solidifies the code?[详细]
2022-12-16 09:50 分类:问答How should I plan the architecture for a system rewrite?
I am planning to rewrite a current system that I previously worked on a portion of. I am doing this as a learning exercise. Below is a description of the old system, basic architecture of the new syst[详细]
2022-12-15 12:35 分类:问答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 分类:问答Avoid Type casting on Factory Pattern
I am writing a payment service class in Dart that wraps more than 1 payment provider. The expectation is the caller can simply switch one to another without any hassle.[详细]
2022-12-07 18:36 分类:问答