为了正常的体验网站,请在浏览器设置里面开启Javascript功能!

软件工程-实践者的研究方法(8)精编版

2020-09-20 64页 ppt 2MB 21阅读

用户头像 个人认证

MR杨

暂无简介

举报
软件工程-实践者的研究方法(8)精编版Chapter9ArchitecturalDesignSoftwareEngineering:APractitioner’sApproach,7/ebyRogerS.PressmanWhyArchitecture?Thearchitectureisnottheoperationalsoftware.Rather,itisarepresentationthatenablesasoftwareengineerto:(1)analyzetheeffectivenessofthedesigninmeetingitsstat...
软件工程-实践者的研究方法(8)精编版
Chapter9ArchitecturalDesignSoftwareEngineering:APractitioner’sApproach,7/ebyRogerS.PressmanWhyArchitecture?Thearchitectureisnottheoperationalsoftware.Rather,itisarepresentationthatenablesasoftwareengineerto:(1)analyzetheeffectivenessofthedesigninmeetingitsstatedrequirements,(2)reducetherisksassociatedwiththeconstructionofthesoftware.(3)representationsofsoftwarearchitectureareanenablerforcommunicationbetweenallparties(stakeholders)interestedinthedevelopmentofacomputer-basedsystem.(4)thearchitecturehighlightsearlydesigndecisionsthatwillhaveanimpactonallsoftwareengineering.WhatIsArchitecture?Thesoftwarearchitectureofaprogramorsystemisthestructureofthesystem,whichcomprisesoftwarecomponents,theexternalvisiblepropertiesofthosecomponents,andtherelationshipsamongthem.ArchitecturalDescriptionsTheIEEEComputerSocietyhasproposedIEEE-Std-1471-2000,RecommendedPracticeforArchitecturalDescriptionofSoftware-IntensiveSystem,[IEE00]toestablishaconceptualframeworkandvocabularyforuseduringthedesignofsoftwarearchitecture,toprovidedetailedguidelinesforrepresentinganarchitecturaldescriptionTheIEEEStandarddefinesanarchitecturaldescription(AD)asa“acollectionofproductstodocumentanarchitecture.”ArchitecturalStylesData-centeredarchitecturesDataflowarchitecturesCallandreturnarchitecturesObject-orientedarchitecturesLayeredarchitecturesData-CenteredArchitectureDataFlowArchitectureCallandReturnArchitectureLayeredArchitectureArchitecturalDescriptions-Example分层技术架构ArchitecturalDescriptions-Example平台功能架构ArchitecturalDesignThesoftwaremustbeplacedintocontext(环境)thedesignshoulddefinetheexternalentities(othersystems,devices,people)thatthesoftwareinteractswithandthenatureoftheinteractionAsetofarchitecturalarchetypes(原型)shouldbeidentifiedAnarchetypeisanabstraction(similartoaclass)thatrepresentsoneelementofsystembehaviorThedesignerspecifiesthestructureofthesystembydefiningandrefining(精炼)softwarecomponentsthatimplementeacharchetypeArchitecturalContextDefineArchetypeComponentStructureRefinedComponentStructureADLArchitecturaldescriptionlanguage(ADL)providesasemanticsandsyntaxfordescribingasoftwarearchitectureProvidethedesignerwiththeabilityto:decomposearchitecturalcomponentscomposeindividualcomponentsintolargerarchitecturalblocksandrepresentinterfaces(connectionmechanisms)betweencomponents.AnArchitecturalDesignMethod表示层业务逻辑层数据存储层客户管理模块表示层业务逻辑层数据存储层订单管理模块表示层业务逻辑层数据存储层库存管理模块1、垂直方向——功能分解——块2、水平方向——服务分层——层AnArchitecturalDesignMethodAnArchitecturalDesignMethod“fourbedrooms,threebaths,…”customerrequirementsarchitecturaldesignDerivingProgramArchitectureProgramArchitecturePartitioningtheArchitecture“horizontal”and“vertical”partitioningarerequiredVertical(垂直)Partitioningdefineseparatebranchesofthemodulehierarchyforeachmajorfunctionusecontrolmodulestocoordinatecommunicationbetweenfunctionsfunction1function3function2Horizontal(水平)Partitioningdesignsothatdecisionmakingandworkarestratified(分层)decisionmakingmodulesshouldresideatthetopofthearchitectureworkersdecision-makersWhyPartitionedArchitecture?resultsinsoftwarethatiseasiertotestleadstosoftwarethatiseasiertomaintainresultsinpropagation(传播)offewersideeffectsresultsinsoftwarethatiseasiertoextendStructuredDesignobjective:toderiveaprogramarchitectureapproach:aDFDismappedintoaprogramarchitecturethePSPECandSTDareusedtoindicatethecontentofeachmodulenotation:structurechartFlowCharacteristicsTransformflow(变换中心)TransactionFlow(事务中心)ThiseditionofSEPAdoesnotcovertransactionmapping.ForadetaileddiscussionseetheSEPAwebsiteGeneralMappingApproachisolateincomingandoutgoingflowboundaries;fortransform/transactionflows,isolatethetransform/transactioncenterworkingfromtheboundaryoutward,mapDFDtransform/transformsintocorrespondingmodulesaddcontrolmodulesasrequiredrefinetheresultantprogramstructureusingeffectivemodularityconceptsGeneralMappingApproachIsolatethetransform/transformcenterbyspecifyingincomingandoutgoingflowboundariesPerform"first-levelfactoring.”Theprogramarchitecturederivedusingthismappingresultsinatop-downdistributionofcontrol.Factoringleadstoaprogramstructureinwhichtop-levelcomponentsperformdecision-makingandlow-levelcomponentsperformmostinput,computation,andoutputwork.Middle-levelcomponentsperformsomecontrolanddomoderateamountsofwork.Perform"second-levelfactoring."FirstLevelFactoring(变换中心)mainprogramcontrollerinputcontrollerprocessingcontrolleroutputcontrollerFactoringTransformMappingSecondLevelMappingFirstLevelFactoring-事务中心Transactionflow主模块输入模块控制模块Factoring监控传感器FirstLevelFactoringSecondLevelMappingRefiningtheArchitecturalDesign结构图SC知识小结SC的组成符号矩形:表示模块带箭头的连线:表示模块间的调用关系SC允许的6种模块(下图未画源模块和漏模块):传入、传出、加工、控制、源、漏结构图的6种模块传入模块:从下属模块取得数据,经过某些处理,再将其传送给上级模块。传出模块:从上级模块获得数据,进行某些处理,再将其传送给下属模块。源模块:不调用其他模块的传入模块,用于始端;漏模块:不调用其他模块的传出模块,用于传出部分的末端;变换模块(即加工模块):它从上级模块取得数据,进行特定处理,再传送回上级模块。控制模块:对所有下属模块进行协调和管理。在系统的输入/输出部分或数据加工部分可以找到这样的模块。结构图的三种调用表示简单调用选择调用和循环调用从DFD到SC映射的3个步骤鉴别DFD的结构特征,确定它是变换中心还是事务中心。按照SD的规则把DFD转换为初始的SC图。按优化指导原则改进初始SC,获得最终SC。变换映射步骤1:划分变换边界区分输入流、输出流和变换中心部分。不同设计人员可能选择不同的流边界,导致不同的结构图。变换映射步骤2:建立初始SC设计顶层和第一层模块。第一层模块与主模块之间传送的数据应与数据流图相对应。变换映射步骤3:分解结构图输入模块:向它的上级模块提供数据,因而它必须有两个下属模块:一个接收数据;另一个把这些数据变换成它的上级模块所需的数据。输出模块:从调用它的上级模块接收数据,用以输出,因而也应当有两个下属模块:一个将上级模块提供的数据变换成输出的形式;另一个将它们输出。中心变换模块:其下层模块没有通用的设计方法,一般应参照数据流图的中心变换部分和功能分解的原则来考虑如何对中心变换模块进行分解。变换映射图例变换映射图例事务映射步骤1:确定事务中心在DFD上划分3个部分(事务中心、接受部分、发送部分)事务映射步骤2:画出结构图框架事务流映射到包含一个输入分支和一个分类事务处理分支结构(包含调度模块和所控制下属模块。事务映射步骤3:分解动作分支分解和细化事务结构和每条操作路径的结构。每条操作路径的数据流图有它自己的信息流特征,可以是变换流也可以是事务流。与每条操作路径相关的子结构可以依照前面介绍的设计步骤进行设计。结构化设计优化原则由变换得到的初始结构图需要进一步细化和改进。优化原则如下:规则1:高模块独立性的原则:通过模块分割、合并和修改调用关系,提高内聚、降低耦合、简化接口。原则2:高扇入/低扇出的原则扇入:调用一个给定模块的模块个数。扇出:一个模块直接调用的模块个数。扇入高则上级模块多,能增加模块的利用率;扇出低意味着需要控制和协调下属模块少,可减少模块调用和控制的复杂程度。原则3:深而窄结构的原则原则4:瓮型结构原则好的软件系统具有两头小、中间大的结构。SD实例:教材购销系统销售子系统DFD教材购销系统例子(续)采购子系统的DFD教材购销系统例子(续)1、鉴别DFD的类型图5.27的2个加工(1.1和1.6)是传入,2个(1.3和1.7)是传出,该图整体上属于事务型结构,但它的两个分支都具有变换型图结构。5.28也是具有两个动作分支的事务型结构。教材购销系统例子(续)2、画出结构图的框架(只画到事务层)教材购销系统例子(续)3、分解动作分支,补充动作层和细节层教材购销系统例子(续)教材购销系统例子(续)4、改进结构图,获得最终结构图:改进系统的上层框架(合并了两个事务层)教材购销系统例子(续)改进“获得购/售书单”分支(细化有效性审查)教材购销系统例子(续)合并子图1、有时候读书是一种巧妙地避开思考的方法。2、阅读一切好书如同和过去最杰出的人谈话。3、越是没有本领的就越加自命不凡。4、越是无能的人,越喜欢挑剔别人的错儿。5、知人者智,自知者明。胜人者有力,自胜者强。6、意志坚强的人能把世界放在手中像泥块一样任意揉捏。7、最具挑战性的挑战莫过于提升自我。。8、业余生活要有意义,不要越轨。9、一个人即使已登上顶峰,也仍要自强不息。10、你要做多大的事情,就该承受多大的压力。11、自己要先看得起自己,别人才会看得起你。12、这一秒不放弃,下一秒就会有希望。13、无论才能知识多么卓著,如果缺乏热情,则无异纸上画饼充饥,无补于事。14、我只是自己不放过自己而已,现在我不会再逼自己眷恋了。谢谢大家
/
本文档为【软件工程-实践者的研究方法(8)精编版】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。 本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。 网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
热门搜索

历史搜索

    清空历史搜索