???????????????
???????????? ???????[ 2013/5/27 13:39:02 ] ????????
????????????(SRP)
???????????y?????????????仯?????????????????????????????????????????????ж???????????.??e????????????????????????Щ??????????????.
???????????(OCP)
????OO???????????????????????????????????????У???????????????????????????????????????????????GoF??23????????????????????????????Щ??????·??????Щ?о??????????????????OOD?????????????????????OOD????????????????????????????OO????裬????????????????????????????????????????裬???????ú????????OOD??????????????1??????????е???????--OCP?????????????CSDN??Health King??????????????????????OCP??????????????????OCP??e??
????????http://blog.csdn.net/kxy/archive/2005/06/27/405013.aspx
????????????????????????????????ЩOOD???Щ????????Щ????????????????????????????????????????????????Щ????????????Щ????????????????Ч???????????????????????????????
??ЩOOD????????????“??-?????”(Open-Closed Principle OCP)??????????????Bertrand Meyer??????????????:Software entities should be open for extension??but closed for modification???????????????????????????????????????????????????????????????????????????????????????????±?????????仰????????????????????????????????????????????
????OCP?????????????????????????????
?????????е???????????????μ????????????????????????仯?е?????????????????????????
???е??????飬????????????????鯔????????????仯?е??????????????????????????
?????????????????????????????????????????????????????????????????????????β????????????????????????????????????????????????ì???????????????????????????????????????????????????????????????????????????????
??????????????????????????????????????????????壬?????????????????????????????????????????????????????????????????????????????????????????????仯????????????????д??????仯????????????????????????
“??-??”???????????????????????????ν??“???????????”(Principle of Encapsulation of Variation?? EVP)???????????????????????????????????????????????????????????????????????????????????????仯?????????????????????仯??????????仯????????????????????????????????仯???????????仯????????????
[SHALL01]????????????仰??????“????????????????????????????”?????????????“????????????”??
“????????????”??ζ??????
???????????????????????????棬???????????????????????檔?????????????????ζ????????е?????е? ?????????????????????????仯?????????????????????????????????????????????(??о?????????)??
???????????????????????????????????????????????????н????????????????ζ????????????????????????
“????????????”???????????????????OCP???????????????????????????????????OCP????????????????п?????????????????OCP??????????????????????????????????????????????仯??????????
????????????????????????????????????????У???????????????????????????
?????????(Astraction)?????(Polymorphism)?????(Inheritance)?????(Interface)????????Щ??????????????OCP??????????????????????OCP??????÷??????ζ????????????(Reusability)????????(Maintainability)???????????к??????????????????????????????η???仯?????????????????????????????????(Astraction)?????(Polymorphism)?????(Inheritance)?????(Interface)?????????????????????У????????...
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11