软件体系结构体系结构评审专家讲座_第1页
软件体系结构体系结构评审专家讲座_第2页
软件体系结构体系结构评审专家讲座_第3页
软件体系结构体系结构评审专家讲座_第4页
软件体系结构体系结构评审专家讲座_第5页
已阅读5页,还剩44页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

软件体系结构

体系结构评审

ArchitecturalReviews孙志岗sun@4/24/20231©sun@软件体系结构体系结构评审专家讲座第1页ArchitecturalReviewsArchitecturalreviewsareakeystepinarchitecture-baseddevelopment.Theyincludeamethod(suchasSAAMorATAM),butthefullpracticeincludesmorethanthat.

体系结构评审是开发过程中一个主要步骤。有专门评审方法(SAAM、ATAM),但在实践中并不但仅是这些Wewilldiscusscost/benefitsofarchitecturalreviewsdifferentarchitecturalreviewtechniquespreconditionsforanarchitecturalreviewarchitecturalreviewactivitiesoutputsfromanarchitecturalreview4/24/20232©sun@软件体系结构体系结构评审专家讲座第2页CostsofArchitecturalReviewsTherearethreedifferenttypesofcostsofholdingregulararchitecturalreviews.directstaffcosts

直接员工开销organizationaloverhead

组织管理开销indirectstaffcosts

间接员工开销4/24/20233©sun@软件体系结构体系结构评审专家讲座第3页ExamplesofDirectStaffCostsAT&T300full-scalereviewsdoneonprojectsof700staff-daysorlonger

全方面评审了300个项目,每个项目标开发时间都是700人日以上averagecostperreview:70staffdays

每次评审平均开销:70人日RationalSoftware30reviewsdoneonprojectswithatleast500KSLOCeach

评审了30个项目,每个项目最少500KSLOCaveragecostperreview:$50,000

评审平均花费:$50,0004/24/20234©sun@软件体系结构体系结构评审专家讲座第4页ExamplesofDirectStaffCostsSAAMevaluations12reviewsdoneonprojectsrangingfrom100KSLOCto1,000KSLOC

12次评审,项目规模从100KSLOC到1,000KSLOCaveragecostperreview:14to20staff-days

平均花费:14到20人日ATAMevaluations12reviewsdoneonprojectsrangingfrom250KSLOCto2,500KSLOC

12次评审,项目规模从250KSLOC到2,500KSLOCaveragecostperreview:40to70staffdays

平均花费:40到70人日4/24/20235©sun@软件体系结构体系结构评审专家讲座第5页ExampleofOrganizationalOverheadCostsofestablishingacorporatereviewunit

建立评审组开销managementoverheadcommunicationexpensesstaffingtheunit

给评审组配置人手relocatingpersonneltoacentrallocationtraining4/24/20236©sun@软件体系结构体系结构评审专家讲座第6页ExampleofIndirectStaffCostsUsingseniordesignersforevaluationsinsteadofdesigning

让高级设计人员参加评审而不是设计lossofproductivity(duetoreassignmentofsuperiordesigners)

生产力下降(高级设计师被委派新任务)timespenttrainingstaffinreviewtechniques

培训员工评审技术时间消耗4/24/20237©sun@软件体系结构体系结构评审专家讲座第7页BenefitsofArchitecturalReviewsFivedifferenttypesofbenefitsresultfromholdingarchitecturalreviews.financialforcespreparationforreview

为评审做准备也是一个推进力earlydetectionofproblems

尽早地发觉问题validationofrequirements

确认需求improvedarchitectures

提升体系结构质量4/24/20238©sun@软件体系结构体系结构评审专家讲座第8页FinancialBenefitsofReviewsAT&Testimatedthateachreviewedprojectsaves10%oftotalcostasaresultofthereview.Thus,a70-staff-dayreviewofprojectsof700staff-dayspaysforitself.

AT&T估算,每个被评审项目节约10%成本Consultantswhoperformarchitectureevaluationsreport80%repeatbusiness.

参加评审顾问汇报了80%重复项目4/24/20239©sun@软件体系结构体系结构评审专家讲座第9页ForcesPreparationforReviewDocumentation/specificationsmustbeprovided,hencetheymustexistorbecreated.

文档和说明书必须存在Somereviewsusestandardquestions,andthearchitectcanprepareaheadtoensurethatthearchitecturescoreswell.

评审有一些标准问题。体系结构师能够事先准备,确保这个体系结构可能得高分Reviewsmakethecriteriaforevaluationexplicitbyprioritizingrequirementsorqualitygoals.

经过排定需求和质量目标次序,评审使评定标准变得清楚4/24/202310©sun@软件体系结构体系结构评审专家讲座第10页EarlyDetectionofProblemsTheproblemsthatcanbefoundbyanarchitecturallevelinspectioninclude

在体系结构层进行检验能够发觉问题unreasonablerequirementsperformanceproblemsproblemsassociatedwithpotentialfuturemodifications

与未来修改相关问题Theearlierinthelifecyclethatproblemsarefound,theeasieritistofixthem.4/24/202311©sun@软件体系结构体系结构评审专家讲座第11页ValidationofRequirementsReviewsputstakeholdersinthesameroomwitheachother,oftenforthefirsttime.

评审使各种角色坐在同一个房间内。通常,这是第一次uncoversconflictsandtradeoffs

解开冲突和寻找折中providesaforumfornegotiatedresolutionofproblems

提供了一个论坛,来磋商问题处理方法Itoftenresultsinthegenerationofnewrequirementsortheclarificationofexistingrequirements.

结果通常会是产生新需求和净化已经有需求4/24/202312©sun@软件体系结构体系结构评审专家讲座第12页ImprovedArchitecturesDevelopmentorganizationsanticipatetypesofquestionsraisedatreviewsand

开发者预期在评审时会被发觉问题,然后designarchitectureswithquestionsinmind

在设计时,问题会时刻围绕脑海preparedocumentationofthetypeneededatreview

准备评审时需要文档giveexplicitconsiderationtoqualitiestobereviewed

对将被评审质量原因进行更深入考虑4/24/202313©sun@软件体系结构体系结构评审专家讲座第13页ReviewTechniquesThereareavarietyoftechniquesforperformingarchitecturalreviews;eachhasadifferentcostandprovidesdifferentinformation.

有很各种评审技术。每种需要不一样开销,提供不一样信息Thesetechniquesfallintooneoftwocategories.questioningtechniques:appliedtoevaluateanyaspectofanarchitectureforanygivenreason

提问技术:用来评价体系结构任何方面measuringtechniques:appliedtoanswerquestionsaboutaspecificquality

度量技术:回答关于某项质量问题4/24/202314©sun@软件体系结构体系结构评审专家讲座第14页QuestioningTechniquesScenario-basedtechniquesdescribesaspecificinteractionbetweenstakeholdersandasystem

描述角色与系统交互过程example:SAAM,ATAM(partially)Questionnaire-basedtechniques(基于问卷技术)Somequestionsapplytoallarchitectures(especiallythoseinasingledomain).

有些问题被用于全部体系结构,尤其是在单一领域内Somequestionsaskaboutdetailsofaspecificarchitecture.

有些问题问询一个特定结构细节Someaskaboutthedevelopmentprocess.“Isthereasinglearchitect?”“Howdoyouensureconformance?”

“你们怎样确保一致性?”4/24/202315©sun@软件体系结构体系结构评审专家讲座第15页QuestioningTechniquesQuestionnairesarereused;theyreflectmorematurityorexperiencewithinadomain.

问卷能够重用;它们表达了在一个领域内成熟度和经验是否丰富Scenariosmustbedevelopedanewforeachsystem.

场景必须为每个系统重新开发4/24/202316©sun@软件体系结构体系结构评审专家讲座第16页MeasuringTechniquesMetrics:quantitativeinterpretationsofobservablemeasures

量度:可测质量定量说明complexitymetricsidentifyareaswheremodificationsmaybedifficult

复杂度测量指明在哪个区域修改会很困难performancemetricssuggestareaswherebottlenecksmayoccur

性能测量提醒瓶颈会在哪里发生Reviewstendtofocusonresultsofmetrics

度量结果assumptionsunderlyingtheinterpretationofthemetrics(e.g.,assumedeventdistribution)

对度量解释中潜在假定4/24/202317©sun@软件体系结构体系结构评审专家讲座第17页MeasuringTechniquesSimulations,prototypes,experiments:domainspecificmodelsofanarchitectureorperformancemodel

仿真、原型、试验:建立体系模型或者性能模型areexpensivetocreateoftenexistaspartofdevelopmentanywayMayanswerissuesraisedbyquestioningtechnique

能够回答提问技术提出问题“Whatevidencedoyouhavethatperformanceisadequate?”

“你凭什么说能够到达这个性能?”4/24/202318©sun@软件体系结构体系结构评审专家讲座第18页PropertiesofReviewTechniques评审技术通用性细节等级阶段被评审对象提问技术问卷通用粗糙早期设计和过程场景特定系统中等中期设计度量技术度量通用或者特定领域好中期设计仿真原型试验特定领域不定早期设计4/24/202319©sun@软件体系结构体系结构评审专家讲座第19页ReviewProcessAnarchitecturalreviewhasthreemajorelements.preconditions:thesetofnecessaryassetsandconditionsthatmustbeinplacebeforeareviewcanbeperformedsuccessfully

前提:评审成功进行之前,必要资源和条件必须到位activitiesofthereviewitself

活动:评审本身outputs:thereportofreviewresults

输出:评审结果汇报4/24/202320©sun@软件体系结构体系结构评审专家讲座第20页ReviewPreconditionsUnderstandthecontextofthereview

了解评审上下文Assembletherightpeople

集合正确人Setorganizationalexpectationsandsupport

期望和支持Prepareforreview

为评审做准备Obtainrepresentationofthearchitecture

取得体系结构文档4/24/202321©sun@软件体系结构体系结构评审专家讲座第21页Preconditions:ContextPlannedreviewpartofnormaldevelopmentactivity

正常开发活动一部分non-adversarial(非敌对性)scheduledwellinadvance(事先安排好日程)builtintoproject’sscheduleandbudget

包含在项目日程和预算之内Unplannedusuallyoccurswhenprojectisintrouble

通常在项目出现问题时采取oftendevolvesintofinger-pointing

造成相互责备canbepainfulforprojectalreadystruggling

对于已经苦苦挣扎了很久项目而言,有些痛苦4/24/202322©sun@软件体系结构体系结构评审专家讲座第22页Preconditions:ContextTimingofthereviewearly“architecturediscoveryreview”isdoneafterrequirementsareset,butbeforethearchitectureisfirm

需求分析之后,体系结构还没有确定之前进行isusedtounderstandimplicationsofrequirementsonarchitecture

用来了解需求在体系结构方面隐含内容checksforrequirementsfeasibility(检验需求可行性)prioritizesarchitecturalgoals(为质量目标排序)fullarchitecturalreviewisdonewhenarchitecturaldocumentationisavailable

体系结构文档可用时进行isusedtoevaluatequalitiesofproposedarchitecture

评价被评体系结构质量4/24/202323©sun@软件体系结构体系结构评审专家讲座第23页Preconditions:PeopleRepresentativesofproject(项目代表)architectdesignersofmajormodulesstakeholders’representativesReviewteammembers(ideally,aseparateunit)

评审团组员(理想情况下是一个独立组织)atleastonedomainexpertincluded

最少有一个领域教授someonetohandlelogistics(e.g.,meetingrooms,supplies)

后勤人员(会议室、茶水、食品)librariantoorganizedocumentation

文档管理员“apprenticereviewer”forgrowth

成长中评审员学徒4/24/202324©sun@软件体系结构体系结构评审专家讲座第24页Preconditions:ReviewTeamThereviewteammustbeassembledsothatmembersareperceivedasimpartial,objective,andrespected

组员要公正、客观和被尊重membersdevotetheirfull-timeefforttothereview

组员全心加入评审membersarefluentinarchitectureandarchitecturalissues

组员要训练有素而且口才好itislocatedclosetoartifactsbeingexamined

有足够权限检验被评审材料4/24/202325©sun@软件体系结构体系结构评审专家讲座第25页Preconditions:ReviewTeamTheteammusthaveaccesstoapplicabledomainknowledge(perhapsviaconsultantstotheteam)

适当领域知识designdocuments

设计文档reviewcriteria

评审标准supportstaff

支持人员4/24/202326©sun@软件体系结构体系结构评审专家讲座第26页Preconditions:Organizational

ExpectationsAcontractbetweenthereviewteamandthesponsorofthereviewmustbeestablished.Whowillbetoldwhatuponcompletion?

结束后,哪些内容能够被告诉哪些人Whatwill(not)bethereviewcriteria?

什么是(不是)评审标准?What/whowillbemadeavailabletoteam?

哪些人和物是评审团能够使用?Whatfollow-upisexpected?

希望评审结果怎样?Howlongwillthereviewtake?

要评审多久?4/24/202327©sun@软件体系结构体系结构评审专家讲座第27页Preconditions:Organizational

ExpectationsOrganizationalcultureandsupportmustbeconsidered.Arereviewspartofthestandardprojectlifecycle?

评审是项目标基本生命周期一部分吗?Isservingonareviewteamconsideredgoodforone’scareer?

为评审团服务是份好差事吗?Willtheorganizationallowitssuperiordesignerstimeofffromtheirprojectstoserveonreviewteams?

企业允许它高级设计师把他项目放在一边来参加评审吗?Isthereastandingrevieworganization(eventhoughmembersmayrotateonandoff)?

有常设评审组织吗(即便组员常进进出出)?4/24/202328©sun@软件体系结构体系结构评审专家讲座第28页Preconditions:Read-AheadMaterialForprojectbeingreviewedquestionnairesscenarios(Thesearecreatedaspartofthereview,buttimeshouldbeallowedforprojectmemberstodigesttheinformation.)ForreviewteamdescriptionofarchitecturerationaleforarchitectureIdeally,materialwilladdressthereviewquestions.(Passingthistestbecausethequestionswereknowninadvanceisnotcheating,butgoodengineering!)

理想情况,材料要能说明评审时问题4/24/202329©sun@软件体系结构体系结构评审专家讲座第29页Preconditions:RankedQuality

andBehavioralRequirementsPlantoexaminethreetofivequalityandbehavioralrequirements.

计划检验3到5个质量和行为需求Aparticularrepresentationmedium(language)forthearchitectureisnotnecessary.Aslongastheinformationcanbeextracted(usingprojectmembersasnecessary),theformoftherepresentationisnotimportant.

一个专门体系结构表述媒体(语言)当前并不是必须。由项目组员来讲解信息,表述形式并不主要4/24/202330©sun@软件体系结构体系结构评审专家讲座第30页ReviewActivitiesEvaluate“Run”thescenariosandaskthequestions,oranswertheitemsinthechecklist.

按场景执行,并问询相关问题;或者回答问卷里问题Performtheexperiments.(演示试验)Executetheprototypesorsimulations.

运行原型或仿真程序Recordcriticalissueshighlightedinthereview

评审中发觉严重问题commentsofprojectmembersontheseissues

项目组员对这些问题说明4/24/202331©sun@软件体系结构体系结构评审专家讲座第31页ReviewActivitiesRanktheissuesproject-threatening(生死攸关)majorminorEachissueraisedshouldbeaddressedintermsofchangingthearchitecturerelaxingtherequirements4/24/202332©sun@软件体系结构体系结构评审专家讲座第32页ReviewActivitiesWarningsignsarchitectureforcedtomatchorganization

组织模式影响体系结构top-levelcomponentsnumberover25

顶层组件数超出25个onerequirementdrivesentiredesign

一项需求决定整个设计architecturedependsonalternativesintheoperatingsystem

体系受操作系统选择影响4/24/202333©sun@软件体系结构体系结构评审专家讲座第33页ReviewActivitiesWarningsignschoiceofsoftwarecomponentsisdictatedbyhardwarepersonnel

由硬件人员选择软件组件redundancynotneededforreliability

面对可靠性时,不考虑冗余伎俩designisexceptiondriven

零碎小事件影响设计noidentifiablearchitect

没有确定架构师4/24/202334©sun@软件体系结构体系结构评审专家讲座第34页OutputfromReviewSetofrankedissuessupportingdatacontainedinformalreportfeedbacktoprojectEnhancedsystemdocumentation

增强系统文档Setofscenariosforfutureuse

未来会用到场景集Identificationofpotentiallyreusablecomponents

认定潜在可重用组件Estimationofcostsandbenefits

估算成本和收益4/24/202335©sun@软件体系结构体系结构评审专家讲座第35页SAAM:SoftwareArchitectureAnalysisMethod

一个简单基于场景评审技术4/24/202336©sun@软件体系结构体系结构评审专家讲座第36页QualitiesAreTooVagueforAnalysisIsthefollowingsystemmodifiable?

这个系统含有适应性吗?Backgroundcoloroftheuserinterfaceischangedmerelybymodifyingaresourcefile.

经过修改资源文件,能够改变界面背景色Dozensofcomponentsmustbechangedtoaccommodateanewdatafileformat.

必须修改许多组件才能适应新文件格式Areasonableansweris

一个合理答案:yeswithrespecttochangingbackgroundcolor

有,从改变背景色角度来看nowithrespecttochangingfileformat

没有,从改变文件格式角度来看4/24/202337©sun@软件体系结构体系结构评审专家讲座第37页QualitiesAreTooVagueforAnalysisQualitiesonlyhavemeaningwithinacontext.

质量原因只在一定上下文里才有意义SAAMspecifiescontextthroughscenarios.

SAAM经过场景指定上下文4/24/202338©sun@软件体系结构体系结构评审专家讲座第38页ScenariosAscenarioisabriefdescriptionofastakeholder’sinteractionwithasystem.

场景就是一个角色与系统交互过程简单描述Whencreatingscenarios,itisimportanttoconsiderallstakeholders.

建立场景时候,一定要考虑到全部角色Customer、User、Developer、Maintainer、Attacker……ThescenariosthatareofmostinterestinaSAAMevaluationarechangescenarios.

SAAM最关心是改变场景4/24/202339©sun@软件体系结构体系结构评审专家讲座第39页StepsofaSAAMEvaluationIdentifyandassemblestakeholders

确认和召集角色Developandprioritizescenarios

制订场景,并排好优先级Describecandidatearchitecture(s)

描述候选体系结构Classifyscenariosasdirectorindirect

把场景分类为直接场景和间接场景Performscenarioevaluation

进行场景评定Revealscenariointeractions

展现场景间相互影响Generateoverallevaluation

整体评定4/24/202340©sun@软件体系结构体系结构评审专家讲座第40页Step1:IdentifyandAssembleStakeholdersStakeholderInterestCustomerScheduleandbudget;usefulnessofsystem;meetingcustomers’(ormarket’s)expectationsEndUserFunctionality,usabilityDeveloperClarityandcompletenessofarchitecture;highcohesionandlimitedcouplingofparts;clearinteractionmechanismsMaintainerMaintainability;abilitytolocateplacesofchange4/24/202341©sun@软件体系结构体系结构评审专家讲座第41页Step1:IdentifyandAssembleStakeholdersStakeholderInterestSystemAdministratorEaseinfindingsourcesofoperationalproblemsNetworkAdministratorNetworkperformance,predictabilityIntergratorClarityandcompletenessofarchitecture;highcohesionandlimitedcouplingofparts;clearinteractionmechanisms4/24/202342©sun@软件体系结构体系结构评审专家讲座第42页Step1:IdentifyandAssemble

StakeholdersStakeholderInterestTesterIntegrated,consistenterrorhandling;limitedcomponentcoupling;highcomponentcohesion;conceptualintegrityApplicationBuilderArchitecturalclarity,completeness;interactionmechanisms;simpletailoringmechanismsRepresentativeofthedomainInteroperability4/24/202343©sun@软件体系结构体系结构评审专家讲座第43页Step2:StakeholdersDevelopand

PrioritizeScenariosScenariosshouldbetypicalofthekindsofevolutionthatthesystemmustsupport:

场景应该是系统必须支持各种演化经典:functionalitydevelopmentactivitieschangeactivitiesScenariosshouldrepresenttasksrelevanttoallstakeholders.

全部角色都应该能在场景中表达出来Ruleofthumb:10-15prioritizedscenarios

应该有10-15个优先场景4/24/202344©sun@软件体系结构体系结构评审专家讲座第44页Step3:DescribeCandidate

ArchitecturesItisfrequentlynecessarytoelicitappropriatearchitecturaldescriptions.

通常,对体系结构进行适当描述是非常主要Structureschosentodescribethearchitecturewilldependonthetypeofqualitiestobeevaluated.

以我们需要质量为依据,选择用来描述体系结构结构4/24/202345©sun@软件体系结构体系结构评审专家讲座第45页Step4:ClassifyScenariosTherearetwoclassesofscenarios.Directscenariosarethosethatcanbeexecu

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论