?????????????
???????????? ???????[ 2013/6/7 13:55:22 ] ????????
????3 ????????????Principles of Package Architecture
??????????????????????????????????????????????????????????????????????????Э?????????????????????????????????????????????????????????
????3.1 ????????
????3.1.1 ?????????????The Release Reuse Equivalency Principle ??REP??1
?????????????????????????The granule of reuse is the granule of release.????????????????????????????????????????????????????Release???????????????????á??????????????Щ? ?θ???????????????????????????????????????????????????°汾??????????????????汾??????????????????????°汾??
???????????????????????е??ж????????????????????????????С????????????????????С?????????????y????????????????С?
????3.1.2 ?????????The Common Closure Principle ??CCP??2
???????仯??????????Classes that change together?? belong together.????????????????????????????????????????????????Щ????????????????????????????κ??????????汾?У??????? ??????????????????????????????????????t?????????????????????б????????????????????????????仯?????????????? ??????
????3.1.3 ??????????The Common Reuse Principle ??CRP??3
??????????????????÷??????Classes that aren‘t reused together should not be grouped together.????????????????????????ж????????????????????????????????????????????????????????????У???????????????????? ?θ??????С?
?????????????????????????????????????????????????°汾??????????????????????????????????????汾???????????°汾????κ???????????????????
??????????????????????????????????????????????????????????????????????????????°汾???????????????????????????????????????С?
????3.1.4 ????????????????Tension between the Package Cohesion Principles
??????????????????????????????????????????????????????????棬????????????к????REP??CRP????????????????к????CCP ?????????к????CCP??e??о???????????????????????е??????????????????????????????仯????CRP??????e???С??
????????????????????????????????????????????У?????????????????????????????????????????????????????????????????CCP??????? λ???????????????????????????????????????????????????????????????REP??CRP?????????????????????????
????3.2 ????????The Package Coupling Principles.
???????????????????????????????
????3.2.1 ????????·???The Acyclic Dependencies Principle ??ADP??1
??????????????????????γ??·??The dependencies between packages must not form cycles.??????????????????????????????????????????????????????д??????????????????????????????????????????????????? ???????????顣
???????????????????????????????????????????Щ?????????????????????????????????????????????????в???????????????????????????????????????????е????
????3.2.2 ??????????Stable Dependencies Principle??SDP??
??????????????????Depend in the direction of stability.???????????????????????????????滹???к??????????????????????????????????
????????????????????????????????????????????????????????????????????????λ?ú??????????б仯??????????????????????????? ??????????????????????????????????????????С???????????????????????????????????????
????????????????????????????????????????????????????С??????????????????Щ????????????????????????????к??????????????? ?????????????????????????????????????????????????????????e?????????????????????κ???????????????????????????????
????3.2.3 ?????????? Stable Abstractions Principle ??SAP??
?????????????????????Stable packages should be abstract packages.?????????????ó??????????????????????????????????в????????????????????????????е??????????????Щ????? ?????????????????????Щ???????????????????????????棺?????????????????????????
?????????????????????????????????????????????????????????????????????λ???????????????????????????????????????????OCP??????????????????????
??????
???·???
??????????????????
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