资源描述:
《OO Design Quality Metrics》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、OODesignQualityMetricsAnAnalysisofDependenciesByRobertMartinOctober28,19942080CranbrookRoadGreenOaks,IL60048Phone:708.918.1004Fax:708.918.1023Email:rmartin@oma.comAbstractThispaperdescribesasetofmetricsthatcanbeusedtomeasurethequalityofanobject-orienteddesignintermsoftheinte
2、rdependencebetweenthesubsystemsofthatdesign.Designswhicharehighlyinterdependenttendtoberigid,unreusableandhardtomaintain.Yetinterdependenceisnecessaryifthesubsystemsofthedesignaretocollaborate.Thus,someformsofdependencymustbedesirable,andotherformsmustbeundesirable.Thispaper
3、proposesadesignpatterninwhichallthedependenciesareofthedesirableform.Finally,thispaperdescribesasetofmetricsthatmeasuretheconformanceofadesigntothedesirablepattern.IntroductionWhatisitaboutOOthatmakesdesignsmorerobust,moremaintainable,andmorereusable?Thisisapoignantquestions
4、incetherehavebeenmanyrecentexampleswhereapplicationsdesignedwithso-calledOOmethodshaveturnedoutnottofulfillthoseclaims.Arethesequalitiesofrobustness,maintainabilityandreusabilityintrinsictoOOD?Ifso,whydon’tallapplicationsdesignedwithOODhavethem?Ifnot,thenwhatothercharacteris
5、ticsdoesaobject-orienteddesignrequireinordertohavethesedesirablequalities?Thispaperpresentsthecasethatsimplyusingobjectstomodelanapplicationisinsufficienttogainrobust,maintainableandreusabledesigns.Thatthereareotherattributesofadesignthatarerequired.Thattheseattributesarebas
6、eduponapatternofinterdependenciesbetweenthesubsystemsofthedesignthatsupportcommunicationswithinthedesign,isolatereusableelementsfromnon-reusableelements,andblockthepropagationofchangeduetomaintenance.Moreover,thispaperpresentsasetofmetricsthatcanbeeasilyappliedtoadesign,andt
7、hatmeasurestheconformanceofthatdesigntothedesiredpatternofdependencies.Thesemetricsare“DesignQuality”metrics.Theyprovideinformationtothedesignersregardingtheabilityoftheirdesigntosurvivechange,ortobereused.DependencyOODesignQualityMetricsPage2Whatisitthatmakesadesignrigid,fr
8、agileanddifficulttoreuse.Itistheinterdependenceofthesubsystemswithinthatdes