solid-principles
Learning Single Responsibility Principle with C#
I am trying to learn the Single Responsibility Principle (SRP) but it is being quite difficult as I am having a huge difficult to figure out when and what I should remove from one class and where I sh[详细]
2023-04-07 13:36 分类:问答Connection between GoF Design Patterns and SOLID
I am interested to know which GoF design pattern translates directly to a specific SOLID principle? Like for instance I think (in my opinion) the strategy pattern tra开发者_运维百科nslates to the Depe[详细]
2023-04-04 17:24 分类:问答Good examples of OCP in open source libraries [closed]
Closed. This question is seeking recommendations for books, tools, software libraries, and more. It does not meet Stack Overflow guidelines. It is not currently accepting answers.[详细]
2023-03-31 02:56 分类:问答Dependency inversion. Object creation
According to SOLID principles a class cannot depend on other classes, dependencies have to be injected. It\'s simple:[详细]
2023-03-30 19:05 分类:问答Write programs that do one thing and do it well
I can grasp the part \"do one thing\" via encapsulation, Dependency Injection, Principle of Least Knowledge, and You Ain\'t Gonna Need It; but how do I understand the second part \"do it well?\"[详细]
2023-02-20 11:25 分类:问答class design for for a dynamic GetHash function
I have the requirement to calculate an internal hashcode of instances of several types (some types are derived from each other). Two aspect开发者_开发知识库s are dynamic here and can vary independentl[详细]
2023-02-20 03:10 分类:问答Dependency Inversion Principle in PHP
Since PHP is a loosely typed language,开发者_如何学JAVA how can the DIP principle be applied in PHP?[详细]
2023-02-15 18:54 分类:问答Adapter Pattern vs Liskov Substitution
The Adapter design pattern is used to convert the interface of a class (Target) into another interface (Adaptee) clients expect. Adapter lets incompatible classes work together that could not otherwis[详细]
2023-02-13 16:15 分类:问答The "Dial-able" Power Principle (aka?)
As a designer, I like providing interfaces that cater to a power/simplicity balance.For example, I think the LINQ designers followed that principle because they offered both dot-notation and query-not[详细]
2023-02-08 08:13 分类:问答Why declare an instance as a supertype but instantiate it as a subtype, plus Liskov Substitution Principle
I\'ve been trying to understand the Liskov Substitution Principle for a couple of days now, and while doing some code tests with the very typical Rectangle/Square example, I created the code below, an[详细]
2023-02-08 05:26 分类:问答