软件工程英文教学课件:Ch9 Architectural Design

上传人:hs****ma 文档编号:569743625 上传时间:2024-07-30 格式:PPT 页数:63 大小:3.62MB
返回 下载 相关 举报
软件工程英文教学课件:Ch9 Architectural Design_第1页
第1页 / 共63页
软件工程英文教学课件:Ch9 Architectural Design_第2页
第2页 / 共63页
软件工程英文教学课件:Ch9 Architectural Design_第3页
第3页 / 共63页
软件工程英文教学课件:Ch9 Architectural Design_第4页
第4页 / 共63页
软件工程英文教学课件:Ch9 Architectural Design_第5页
第5页 / 共63页
点击查看更多>>
资源描述

《软件工程英文教学课件:Ch9 Architectural Design》由会员分享,可在线阅读,更多相关《软件工程英文教学课件:Ch9 Architectural Design(63页珍藏版)》请在金锄头文库上搜索。

1、1Chapter 9nArchitectural DesignSoftware Engineering: A Practitioners Approach, 7/e by Roger S. Pressman2What Is Architecture?nThe software architecture of a program or system is the structure of the system, which comprise software components, the external visible properties of those components, and

2、the relationships among them.3Why Architecture?The architecture is not the operational software. Rather, it is a The architecture is not the operational software. Rather, it is a representation that enables a software engineer to: representation that enables a software engineer to: (1) (1) analyze t

3、he effectiveness of the design in meeting its in meeting its requirements, requirements, (分析是否满足需求)(2) (2) reduce the risks associated with the construction of the associated with the construction of the softwaresoftware. .(降低软件实施风险)(3) (3) representations of software architecture are an of software

4、 architecture are an enabler for communication between all between all stakeholders stakeholders interested in the interested in the development of a computer-based systemdevelopment of a computer-based system. .(便于各方开展交流)(4) the architecture (4) the architecture highlights early design decisions th

5、at will that will have an impact on all software engineeringhave an impact on all software engineering. . (强调早期决策)4Architectural DescriptionsnThe IEEE Computer Society has proposed IEEE-Std-1471-2000, Recommended Practice for Architectural Description of Software-Intensive System, IEE00nto establish

6、 a conceptual framework and vocabulary for use during the design of software architecture, nto provide detailed guidelines for representing an architectural descriptionnThe IEEE Standard defines an architectural description (AD) as a “a collection of products to document an architecture.” 5Architect

7、ural Styles(架构分类)nData-centered architecturesnData flow architecturesnCall and return architecturesnObject-oriented architecturesnLayered architectures6Data-Centered Architecture7Data Flow Architecture8Call and Return Architecture9Layered Architecture10Architectural Descriptions-Examplen分层技术架构(河南油田知

8、识管理系统)11Architectural Descriptions-Examplen平台功能架构12Architectural DesignnThe software must be placed into context(环境)nthe design should define the external entities (other systems, devices, people) that the software interacts with and the nature of the interactionnA set of architectural archetypes(原型

9、) should be identifiednAn archetype is an abstraction (similar to a class) that represents one element of system behaviornThe designer specifies the structure of the system by defining and refining(精炼) software components that implement each archetype13Architectural Context Diagram左面-参与者;右面-同级系统;上面-

10、上级系统;下面-下级系统。14Define Archetype原型(Archetype):描述核心抽象类及关系。控制器:启动或撤销各种监控器工作的设备的抽象(如防盗报警主机、烟雾报警主机)节点类:所有信息输入、输出设备的抽象探测器:所有信息采集设备的抽象(如摄像头、红外探测器、燃气谈车器、烟感探测器)指示器:所有报警设备的抽象(如喇叭、闪灯、电话)15Component Structure在设计过程中逐步抽象,增加构件。例如在SafeHome系统中增加“外部通讯管理”、“面板处理”、“探测器管理”、“报警处理”构件(图中阴影框)。16Refined Component Structure17A

11、DLnArchitectural description language (ADL) provides a semantics and syntax for describing a software architecturenProvide the designer with the ability to: ndecompose architectural componentsncompose individual components into larger architectural blocks and nrepresent interfaces (connection mechan

12、isms) between components. nExample: UniCon, UML18An Architectural Design Method“four bedrooms, three baths,”customer requirementsarchitectural design19An Architectural Design Method20Partitioning the Architecturen“horizontal” and “vertical” partitioning are required21Why Partitioned Architecture?nre

13、sults in software that is easier to testnleads to software that is easier to maintainnresults in propagation(传播) of fewer side effectsnresults in software that is easier to extend22Vertical Partitioning垂直划分ndefine separate branches of the module hierarchy for each major functionnuse control modules

14、to coordinate communication between functionsfunction 1function 1function 3function 3function 2function 223Horizontal Partitioning水平划分ndesign so that decision making and work are stratified(分层)ndecision making modules should reside at the top of the architectureworkersdecision-makers24An Architectur

15、al Design Method表示层业务逻辑层数据存储层客户管理模块表示层业务逻辑层数据存储层订单管理模块表示层业务逻辑层数据存储层库存管理模块1、垂直方向功能分解块2、水平方向服务分层层25Structured Designnobjective: to derive a program architecturenapproach: na DFD is mapped into a program architecturenthe PSPEC and STD are used to indicate the content of each modulennotation: structure

16、chart26Deriving Program ArchitectureProgramProgramArchitectureArchitecture27General Mapping Approachisolate incoming and outgoing flow isolate incoming and outgoing flow boundaries; for transform/transaction flows, isolate boundaries; for transform/transaction flows, isolate the transform/transactio

17、n centerthe transform/transaction centerworking from the boundary outward, mapworking from the boundary outward, mapDFD transform/transforms into corresponding modulesDFD transform/transforms into corresponding modulesadd control modules as requiredadd control modules as requiredrefine the resultant

18、 program structurerefine the resultant program structureusing effective modularity conceptsusing effective modularity concepts28Flow CharacteristicsTransform flow(变换中心变换中心)TransactionFlow(事务中心事务中心)This edition of SEPA does not cover transaction mapping. For a detailed discussion see the SEPA website

19、29General Mapping ApproachnIsolate the transform/transform center by specifying incoming and outgoing flow boundariesnPerform first-level factoring.”nThe program architecture derived using this mapping results in a top-down distribution of control. nFactoring leads to a program structure in which to

20、p-level components perform decision-making and low-level components perform most input, computation, and output work. nMiddle-level components perform some control and do moderate amounts of work.nPerform second-level factoring.30First Level Factoring(变换中心)main programcontrollerinputcontrollerproces

21、singcontrolleroutputcontroller31Factoring32Transform Mapping33Second Level MappingFirst Level Factoring-事务中心Transactionflow主模块主模块输入模块输入模块控制模块控制模块变换变换3 3变换变换2 2变换变换1 135Factoring监控传感器36First Level Factoring37Second Level Mapping38Refining the Architectural Design2024/7/3039结构图结构图SCSC知识小结知识小结pSCSC的组成符

22、号的组成符号矩形矩形:表示模块:表示模块带箭头的连线带箭头的连线:表示模块间的调用关系:表示模块间的调用关系pSCSC允许的允许的6 6种模块种模块 ( (下图未画源模块和漏模块下图未画源模块和漏模块) ):传入、传出、加工、控制、源、漏:传入、传出、加工、控制、源、漏2024/7/3040结构图的结构图的6 6种模块种模块传入模块:从下属模块取得数据,经过某些处理,再传入模块:从下属模块取得数据,经过某些处理,再将其传送给上级模块。将其传送给上级模块。传出模块:从上级模块获得数据,进行某些处理,再传出模块:从上级模块获得数据,进行某些处理,再将其传送给下属模块。将其传送给下属模块。源模块:不

23、调用其他模块的传入模块,用于始端;源模块:不调用其他模块的传入模块,用于始端; 漏模块:不调用其他模块的传出模块,用于传出部分漏模块:不调用其他模块的传出模块,用于传出部分的末端;的末端; 变换模块变换模块( (即加工模块即加工模块):):它从上级模块取得数据,进它从上级模块取得数据,进行特定处理,再传送回上级模块。行特定处理,再传送回上级模块。控制模块:对所有下属模块进行协调和管理。在系统的输入输出部分或数据加工部分可以找到这样的模块。2024/7/3041结构图的三种调用表示 n简单调用简单调用选择调用和选择调用和循环调用循环调用2024/7/3042从DFD到SC映射的3个步骤 1.鉴别

24、DFD的结构特征,确定它是变换中心还是事务中心。2.按照SD的规则把DFD转换为初始的SC图。3.按优化指导原则改进初始SC,获得最终SC。2024/7/3043变换映射步骤1:划分变换边界区分输入流、输出流和变换中心部分。不同设计人员可能选择不同的流边界,导致不同的结构图。2024/7/3044变换映射步骤2:建立初始SCn设计顶层和第一层模块。第一层模块与主模块之间传送的数据应与数据流图相对应。 2024/7/3045变换映射步骤3:分解结构图l输入模块:向它的上级模块提供数据,因而它必须有两个下属模块:一个接收数据;另一个把这些数据变换成它的上级模块所需的数据。l输输出出模模块块:从从调

25、调用用它它的的上上级级模模块块接接收收数数据据,用用以以输输出出,因因而而也也应应当当有有两两个个下下属属模模块块:一一个个将将上上级级模模块块提提供供的的数数据据变变换换成成输输出出的的形形式式;另另一一个个将将它们输出。它们输出。l中中心心变变换换模模块块:其其下下层层模模块块没没有有通通用用的的设设计计方方法法,一一般般应应参参照照数数据据流流图图的的中中心心变变换换部部分分和和功功能能分解的原则来考虑如何对中心变换模块进行分解。分解的原则来考虑如何对中心变换模块进行分解。 2024/7/3046变换映射图例2024/7/3047变换映射图例2024/7/3048事务映射步骤1: 确定事

26、务中心n在在DFDDFD上划分上划分3 3个部分个部分 ( (事务中心、接受部分、发送部分事务中心、接受部分、发送部分) ) 2024/7/3049事务映射步骤2:画出结构图框架n事务流映射到包含一个输入分支和一个分类事务处理分支结构(包含调度模块和所控制下属模块。2024/7/3050事务映射步骤3:分解动作分支n分解和细化事务结构和每条操作路径的结构。每条操作路径的数据流图有它自己的信息流特征,可以是变换流也可以是事务流。与每条操作路径相关的子结构可以依照前面介绍的设计步骤进行设计。2024/7/3051结构化设计优化原则 由变换得到的初始结构图需要进一步细化和改进。优化原则如下:规则1:

27、 高模块独立性的原则: 通过模块分割、合并和修改调用关系,提高内聚、降低耦合、简化接口。2024/7/3052原则2:高扇入/低扇出的原则n扇入:调用一个给定模块的模块个数。n扇出:一个模块直接调用的模块个数。 扇入高则上级模块多,能增加模块的利用率;扇出低意味着需要控制和协调下属模块少,可减少模块调用和控制的复杂程度。2024/7/3053原则3:深而窄结构的原则2024/7/3054原则4:瓮型结构原则 好的软件系统具有两头小、中间大的结构。 2024/7/3055SD实例:教材购销系统 销售子系统DFD2024/7/3056教材购销系统例子(续)采购子系统的DFD2024/7/3057教

28、材购销系统例子(续)1、鉴别DFD的类型n图5.27的2个加工(1.1和1.6)是传入,2个(1.3和1.7)是传出,该图整体上属于事务型结构,但它的两个分支都具有变换型图结构。n5.28也是具有两个动作分支的事务型结构。2024/7/3058教材购销系统例子(续)2、画出结构图的框架(只画到事务层)2024/7/3059教材购销系统例子(续)3、分解动作分支,补充动作层和细节层2024/7/3060教材购销系统例子(续)2024/7/3061教材购销系统例子(续)4、改进结构图,获得最终结构图:n改进系统的上层框架(合并了两个事务层)2024/7/3062教材购销系统例子(续)n改进“获得购/售书单”分支(细化有效性审查)2024/7/3063教材购销系统例子(续)n合并子图

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 高等教育 > 研究生课件

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号