欢迎来到天天文库
浏览记录
ID:37547967
大小:313.50 KB
页数:80页
时间:2019-05-12
《软件工程(美国加州大学)》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、ICS52IntroductiontoSoftwareEngineeringLectureNotesforSpringQuarter,2004AndrévanderHoekLecture5-1Copyright©2004,AndrévanderHoekDuplicationofcoursematerialforanycommercialpurposewithoutthewrittenpermissionofthelecturerisprohibited.©2004,UniversityofCalifornia,IrvineTod
2、ay’sLectureUSESrelationIS-COMPOSED-OFrelationCOMPRISESdiagramUSESdiagramInDesign,WeCanDoAnything…ProvidedInterfaceBigComponentRequiredInterfaceProvidedInterfaceTinyComponentRequiredInterfaceProvidedInterfaceBComponentRequiredInterfaceProvidedInterfaceMr.ComponentRequi
3、redInterfaceProvidedInterfaceAComponentRequiredInterfaceProvidedInterfaceYetComponentRequiredInterfaceProvidedInterfaceSomeComponentRequiredInterfaceProvidedInterfaceOneComponentRequiredInterfaceProvidedInterfaceMrs.ComponentRequiredInterface…EvenwhenRestrictedbyStyle
4、Whathappenedhere?ProvidedInterfaceLayer4RequiredInterfaceProvidedInterfaceLayer3RequiredInterfaceProvidedInterfaceLayer2RequiredInterfaceProvidedInterfaceLayer1RequiredInterfaceFan-inandFan-outHighfan-inLowfan-outLowfan-inHighfan-outUSUALLYGOOD!USUALLYBAD!ProvidedInte
5、rfaceComponentRequiredInterfaceProvidedInterfaceComponentRequiredInterfaceUSESRelationDefinitionLevel0:thosemodulesthatdonotuseanyothermodulesLeveli:thosemodulesthatuseatleastonemoduleatleveli–1andusenomodulesatleveliorgreaterUseDetermineflexibilityDeterminereuseDeter
6、mineincrementaltestabilityExampleLevel2Level1Level0Level0ProvidedInterfaceBigComponentRequiredInterfaceProvidedInterfaceAComponentRequiredInterfaceProvidedInterfaceTinyComponentRequiredInterfaceProvidedInterfaceYetComponentRequiredInterfaceObservationsTheUSESrelationd
7、oesnotnecessarilyformahierarchyAnacyclicdirectedgraphisgoodCyclesgenerallyarebadIndicationofhighcouplingIndicationofbrokenseparationofconcernsRulesofthumb:allowatouseb……ifitmakesasimpler…ifbisnotonlyusedbyabutalsobyothercomponentsObservationsSomeinvocationsarenotUSESC
8、onsideratransferofcontrolConsideraschedulerinsideaprogramSomeUSESdonotinvolveinvocationsConsiderinterrupthandlersConsiderglo
此文档下载收益归作者所有