英文: Applying Clean Architecture Principle When Add Dashboard module witch query multiple services fr...
Getter 和 Setter 方法是否违反了单一职责原则?
英文: Do getter and setter methods violate the Single Responsibilty Principle 问题 class Rectangle { pri...
如何在 PHP 8.1 Enums 中实现 EnumClass::$userInput?
英文: how to implement EnumClass::$userInput on php 8.1 Enums? 问题 我一直在学习 PHP 8.1 中的新枚举特性,结合 Laravel 构建...
这在实现多个接口时,是否仍遵循了依赖反转原则?
英文: Is this still follow Dependency Inversion Principle when implement multiple interface? 问题 抱歉,代码部...
尝试理解里氏替换原则。
英文: Trying to understand Liskov substitution principle 问题 我正试图理解Liskov替换原则,我有以下代码: class Vehicle { }...
Liskov替换原则如何适用于类似Object的类?
英文: How does Liskov's Substitution Principle work for classes like Object? 问题 简而言之,Liskov的替换原则指出...
子类继承的字段从未被使用
英文: Subclass inherited field is never used 问题 可以在知道某些字段永远不会被使用的情况下继承一个类吗? 假设我有一个父类 Parent 及其子类 Child...
被违反的原则是哪个?
英文: Which principle is being violated? 问题 这个假设性的函数名字让人觉得不太好理解,我更擅长表达感觉。 假设我们有这个假设性的函数: function comp...
开放-封闭原则和编程到接口是否相同?
英文: Is the Open-Closed SOLID principle the same as Coding to an Interface? 问题 "Does open-for-ex...
在Go应用程序中实现SOLID设计原则
英文: Implementing SOLID Design in Go application 问题 最好的方法是将模型(用户)和数据库建模,避免出现循环依赖。你可以将数据库存储和模型分开处理,以解决...