intent: Decouple an abstraction from its implementation so that the two can vary independently.
Implementation here means the objects that the abstract class an its derivations use to implement themselves with.
Focus on the?problem rather than the solution
Use commonality/variability analysis rather than noun/verb analysis
Two mandates of OO design
- Find what varies and encapsulate it.
- Favor composition over inheritance.
?
OO设计:抽象与实现解耦
博客聚焦于OO设计,旨在将抽象与其实现解耦,使二者能独立变化。强调关注问题本身,运用共性/可变性分析。还提及OO设计的两个准则,即找出变化部分并封装,优先使用组合而非继承。
1595

被折叠的 条评论
为什么被折叠?



