-
# 菜雞與物件導向 (10): 單一職責原則 | 伊果的沒人看筆記本
記錄了 SOLID 中的單一職責原則 (Single Responsibility Principle, SRP):就一個類別而言,應該只有一個引起它變化的原因。當我們遵守單一職責原則,不但讓程式碼的重複使用率上升,降低大量重複冗餘的程式碼,也能快速掌握修改目標和範圍,達到高內聚低耦合的目標。
[https://igouis…
-
**Single Responsibility**
يجب على كل
class او method
ان تكون مسؤوله عن مهمه واحده فقط لتسهيل قراءة ال
code
و ايضا ل اتباع طريقة كتابة الكود النظيف
clean code
وهذا الشيء يجعل ال
code
م…
-
Written on 01/04/2018 08:18:07
URL: https://nsscreencast.com/episodes/311-solid-srp
-
In GitLab by @ksiero on Oct 15, 2021, 14:10
Context class does not follow SRP from SOLID. Right know it is responsible for:
1. Holding plugin store.
2. Creating and holding datatypes.
3. Adding datat…
-
Hello!
I have read the SRP definition on the website. As a reminder, here is how it is currently described:
https://github.com/codeguy/php-the-right-way/blob/4e688e010e4e1f4c1ae279bfafbbc95aef22…
-
This is the first principle in the SOLID principle of object oriented programming. A class should generally have only a single responsibility and a single reason to change. For example, a translator c…
-
### Summary of the new feature / enhancement
As a user, I expect Publish-Module to publish a module, not package _AND_ publish a module. As a user, I also expect that I can issue Package-Module to cr…
-
This principle should not be in your glossary as it is not specific to your project and has a widely-understood definition.
-
**Note from the teaching team:** This bug was reported during the _Part II (Evaluating Documents)_ stage of the PE. **You may reject this bug if it is not related to the quality of documentation.**
Th…
-
Looking at the Erlang\Util test case indicates the class has clearly too much responsibility. In an effort to make this area of the app more testable, the following structure is desirable as a startin…