?????????????
???????????? ???????[ 2013/6/7 13:55:22 ] ????????
????1.1 ???????“????”???????Symptoms of Rotting Design??
????????????????????????????????????“????”?С?????????????????????????????????????????????????????????????????????????
????1. ??????Rigidity Rigidity ???????????????????????????????????????????????????????????????????????????????????????????????ɡ?
????2. ???????Fragility Fragility ??????????????????????????????????????????????????????????????????????С?????????????????????????????????????????????????????????
????3. ??????????immobility immobility ????????????????????????С????????????λ???е???????????????????????????????????????????????????????????????????????????????д?????????á?
????4. ????????viscosity viscosity???????????????viscosity???????viscosity.????????и??????????????????в???????????????????? ????Щ?????У??Щ??????е??????????????Щ????????????Щ????hacks???????????????????????????????????????????? viscosity ?????
??????????viscosity?????????????????????Ч?????
????2 ????????????????
????2.1 ?????????The Open Closed Principle ??OCP??
????A module should be open for extension but closed for modification.????????????????????????????????????????????????????????????????
?????????е???????????????У?????????????????????????????????????????????????????????????
????2.1.1 ?????????Dynamic Polymorphism??
????2.1.2 ?????????Static Polymorphism??
??????????????OCP???????????????????Listing 2-3.LogOn???????????????????????????????modem. 2.1.3 OCP??????????Architectural Goals of the OCP??
???????????OCP?????Щ????????????????????????????????????????顣?????????????????????????1?????????????μ?????????????? ?????? ?? 3 ????? 17 ????????????OCP?????????????????????????OCP????????????????????к?????????????ü??????仯??????????????????????? ???????
????2.2 Liskov ?滻???The Liskov Substitution Principle??LSP??
????Subclasses should be substitutable for their base classes.???????????滻?????
????Derived????????滻??Base????????Base???????????User?????????????Devrived???????Base?????????????????????????
????2.3 ????????????The Dependency Inversion Principle ??DIP??1
????Depend upon Abstractions. Do not depend upon concretions.??????????????????塣
????????OCP??????OO???????????DIP???????????????????????????????????????????????????????????????????????????????????????????????????COM??CORBA??EJB?????????????
????2.3.1 ????????Depending upon Abstractions.
?????????????????????е?????????????????????????????????κ??????????
??????????????????????????????????t????????????????????????????????仯??????????仯???????????????“????”??????Щλ???????????????????????????y??и????OCP????
????2.4 ?????????The Interface Segregation Principle ??ISP??
????Many client specific interfaces are better than one general purpose interface???????????????????????y???
????ISP???????????????????COM????????????????????????????????????????????????????????????????????м??????????????? ????????????????????????????з?????????????????????????????????????????????????Щ????
??????
???·???
??????????????????
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