软件工程英文教学课件:Ch9 Architectural Design_第1页
软件工程英文教学课件:Ch9 Architectural Design_第2页
软件工程英文教学课件:Ch9 Architectural Design_第3页
软件工程英文教学课件:Ch9 Architectural Design_第4页
软件工程英文教学课件:Ch9 Architectural Design_第5页
已阅读5页,还剩58页未读 继续免费阅读

下载本文档

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

文档简介

1、1Chapter 9Architectural DesignSoftware Engineering: A Practitioners Approach, 7/e by Roger S. Pressman2What Is Architecture?The 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 th

2、e relationships among them.3Why Architecture?The architecture is not the operational software. Rather, it is a representation that enables a software engineer to: (1) analyze the effectiveness of the design in meeting its requirements, (分析是否满足需求)(2) reduce the risks associated with the construction

3、of the software.(降低软件实施风险)(3) representations of software architecture are an enabler for communication between all stakeholders interested in the development of a computer-based system.(便于各方开展交流)(4) the architecture highlights early design decisions that will have an impact on all software engineer

4、ing. (强调早期决策)4Architectural DescriptionsThe IEEE Computer Society has proposed IEEE-Std-1471-2000, Recommended Practice for Architectural Description of Software-Intensive System, IEE00to establish a conceptual framework and vocabulary for use during the design of software architecture, to provide d

5、etailed guidelines for representing an architectural descriptionThe IEEE Standard defines an architectural description (AD) as a “a collection of products to document an architecture.” 5Architectural Styles(架构分类)Data-centered architecturesData flow architecturesCall and return architecturesObject-or

6、iented architecturesLayered architectures6Data-Centered Architecture7Data Flow Architecture8Call and Return Architecture9Layered Architecture10Architectural Descriptions-Example分层技术架构(河南油田知识管理系统)11Architectural Descriptions-Example平台功能架构12Architectural DesignThe software must be placed into context(

7、环境)the design should define the external entities (other systems, devices, people) that the software interacts with and the nature of the interactionA set of architectural archetypes(原型) should be identifiedAn archetype is an abstraction (similar to a class) that represents one element of system beh

8、aviorThe designer specifies the structure of the system by defining and refining(精炼) software components that implement each archetype13Architectural Context Diagram左面-参与者;右面-同级系统;上面-上级系统;下面-下级系统。14Define Archetype原型(Archetype):描述核心抽象类及关系。控制器:启动或撤销各种监控器工作的设备的抽象(如防盗报警主机、烟雾报警主机)节点类:所有信息输入、输出设备的抽象探测器:所

9、有信息采集设备的抽象(如摄像头、红外探测器、燃气谈车器、烟感探测器)指示器:所有报警设备的抽象(如喇叭、闪灯、电话)15Component Structure在设计过程中逐步抽象,增加构件。例如在SafeHome系统中增加“外部通讯管理”、“面板处理”、“探测器管理”、“报警处理”构件(图中阴影框)。16Refined Component Structure17ADLArchitectural description language (ADL) provides a semantics and syntax for describing a software architectureProv

10、ide the designer with the ability to: decompose architectural componentscompose individual components into larger architectural blocks and represent interfaces (connection mechanisms) between components. Example: UniCon, UML18An Architectural Design Method“four bedrooms, three baths,”customer requir

11、ementsarchitectural design19An Architectural Design Method20Partitioning the Architecture“horizontal” and “vertical” partitioning are required21Why Partitioned Architecture?results in software that is easier to testleads to software that is easier to maintainresults in propagation(传播) of fewer side

12、effectsresults in software that is easier to extend22Vertical Partitioning垂直划分define separate branches of the module hierarchy for each major functionuse control modules to coordinate communication between functionsfunction 1function 3function 223Horizontal Partitioning水平划分design so that decision ma

13、king and work are stratified(分层)decision making modules should reside at the top of the architectureworkersdecision-makers24An Architectural Design Method表示层业务逻辑层数据存储层客户管理模块表示层业务逻辑层数据存储层订单管理模块表示层业务逻辑层数据存储层库存管理模块1、垂直方向功能分解块2、水平方向服务分层层25Structured Designobjective: to derive a program architectureappro

14、ach: a DFD is mapped into a program architecturethe PSPEC and STD are used to indicate the content of each modulenotation: structure chart26Deriving Program ArchitectureProgramArchitecture27General Mapping Approachisolate incoming and outgoing flow boundaries; for transform/transaction flows, isolat

15、e the transform/transaction centerworking from the boundary outward, mapDFD transform/transforms into corresponding modulesadd control modules as requiredrefine the resultant program structureusing effective modularity concepts28Flow CharacteristicsTransform flow(变换中心)TransactionFlow(事务中心)This editi

16、on of SEPA does not cover transaction mapping. For a detailed discussion see the SEPA website29General Mapping ApproachIsolate the transform/transform center by specifying incoming and outgoing flow boundariesPerform first-level factoring.”The program architecture derived using this mapping results

17、in a top-down distribution of control. Factoring leads to a program structure in which top-level components perform decision-making and low-level components perform most input, computation, and output work. Middle-level components perform some control and do moderate amounts of work.Perform second-l

18、evel factoring.30First Level Factoring(变换中心)main programcontrollerinputcontrollerprocessingcontrolleroutputcontroller31Factoring32Transform Mapping33Second Level MappingFirst Level Factoring-事务中心Transactionflow主模块输入模块控制模块变换3变换2变换135Factoring监控传感器36First Level Factoring37Second Level Mapping38Refinin

19、g the Architectural Design2022/7/1839结构图SC知识小结SC的组成符号矩形:表示模块带箭头的连线:表示模块间的调用关系SC允许的6种模块 (下图未画源模块和漏模块):传入、传出、加工、控制、源、漏2022/7/1840结构图的6种模块传入模块:从下属模块取得数据,经过某些处理,再将其传送给上级模块。传出模块:从上级模块获得数据,进行某些处理,再将其传送给下属模块。源模块:不调用其他模块的传入模块,用于始端; 漏模块:不调用其他模块的传出模块,用于传出部分的末端; 变换模块(即加工模块):它从上级模块取得数据,进行特定处理,再传送回上级模块。控制模块:对所有下

20、属模块进行协调和管理。在系统的输入输出部分或数据加工部分可以找到这样的模块。2022/7/1841结构图的三种调用表示 简单调用选择调用和循环调用2022/7/1842从DFD到SC映射的3个步骤 鉴别DFD的结构特征,确定它是变换中心还是事务中心。按照SD的规则把DFD转换为初始的SC图。按优化指导原则改进初始SC,获得最终SC。2022/7/1843变换映射步骤1:划分变换边界区分输入流、输出流和变换中心部分。不同设计人员可能选择不同的流边界,导致不同的结构图。2022/7/1844变换映射步骤2:建立初始SC设计顶层和第一层模块。第一层模块与主模块之间传送的数据应与数据流图相对应。 20

21、22/7/1845变换映射步骤3:分解结构图输入模块:向它的上级模块提供数据,因而它必须有两个下属模块:一个接收数据;另一个把这些数据变换成它的上级模块所需的数据。输出模块:从调用它的上级模块接收数据,用以输出,因而也应当有两个下属模块:一个将上级模块提供的数据变换成输出的形式;另一个将它们输出。中心变换模块:其下层模块没有通用的设计方法,一般应参照数据流图的中心变换部分和功能分解的原则来考虑如何对中心变换模块进行分解。 2022/7/1846变换映射图例2022/7/1847变换映射图例2022/7/1848事务映射步骤1: 确定事务中心在DFD上划分3个部分 (事务中心、接受部分、发送部分) 2022/7/1849事务映射步骤2:画出结构图框架事务流映射到包含一个输入分支和一个分类事务处理分支结构(包含调度模块和所控制下属模块。2022/7/1850事务映射步骤3:分解动作分支分解和细化事务结构和每条操作路径的结构。每条操作路径的数据流图有它自己的信息流特征,可以是变换流也可以是事务流。与每条操

温馨提示

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

评论

0/150

提交评论