????????????????е??????ζ????????????“Feature Envy”(???????????????????????Υ????LoC???????Feature Envy?????????????????????????????????????????????????????????????????????????????????????????????????????????????????д????“????”????????????????е??????????????????????????ù????????????????ó?????“????”????????????????????????????????????????????????????????????????????feature????????ú???????????????Facade??Mediator????

?????ο???http://en.wikipedia.org/wiki/Principle_of_Least_Knowledge

????????????S.O.L.I.D ???

???????????????????????????????????????????Щ?????????????е??????????

????Single Responsibility Principle (SRP) – ???????

????????????????????????????????????????£??????????????????????????????仯???????????????????????????????????????????????????????????????仯?????????????????????????仯??????????????????????仯??????????????????????????????????????????????????????????????????????ζ?????????????????????????????????????????????????????仯?????

????Unix/Linux???????????????????????????????????????????????

????Windows????????????????????????е???????????????

????Open/Closed Principle (OCP) – ???????

???????????????????????????????????????????????????????????????????????????????????

????????????????ζ?????μ??????仯???????????д?????????????????μ??????

??????????????ζ?????????????????????????乤?????????????????κ?????

???????????????????????????????????????????23????????????е?“??????”?????????????????????????ЩAPI??????????????????????????????????C ?????qsort()???????????“?????”??STL?е??????????????ACE?е???????????????????????棬????????????????????????????

????Liskov substitution principle (LSP) – ??????????

?????????????Robert C. Martin??????????????????仰??“Subtypes must be substitutable for their base types”?????????????????滻?????????????????????????滻?κλ???????????????????????滻??????????????????????????????????г???if/else????????????????ж?????????????滻???LSP?????????????????????????????????????????????滻??????????????????????????????????????

????????????????е????????????????????????????????????????——“?????β????????”??“????????”?????????????????????????ī?? С???????? ——“淣??????????淣?????????….??????????????????????”——??????????????????????ò???????????????????????????????????????????????????????????????????????????????????????????????????

????????????£???????????????????????????????LSP?????????????ж???????????????????費(fèi)?????У????????????й????

????Interface Segregation Principle (ISP) – ?????????

??????????????????????????????У??????????У??????????????????????????á?

?????????????????????в??????÷???????磺д????????????????????????????????????????????????????Щ?????????????????????棬??????????????????PC??????????????????????????????е???Щ??????????????????????????????????Щ????????????????磺??????????????????????????????????????????????????????????????????????????????????Щ????

?????????????????????“?????”???????????????????????Java?е????Event Listener??Adapter??????????????????????????????в?????????????汾?в?????????????????????á?