何謂原則(Principle)
白話文解釋
背起來
學習SOLID物件導向設計原則的好處
何謂責任(Responsibility)
A:Many client specific interfaces are better than one general purpose interface.
B:Clients should not be forced to depend upon interface that they don't use.
A:多個用戶端專用的介面優於一個通用需求介面
B:用戶端不應該強迫相依於沒用到的介面
針對不同需求的用戶端,僅開放其對應需求的介面就好
A.High-level modules should not depend on low-level modules.Both should depend on abstractions.
B.Abstractions should not depend on details.Details should depend on abstractions.
A.高階模組不應該依賴於低階模組,兩者都應相依於抽象
B.抽象不應該相依於細節,而細節則應該相依於抽象
物件導向設計原則:SOLID
Udemy - 保哥SOLID 課程
本篇已同步發表至個人部落格
https://moushih.com/2022ithome22/