版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、Ch 4 Software Architecture DescriptionsSoftware System Design and Architecture描述软件体系结构Main ContentsModeling and Documenting Software Architecture“Architectural Blueprints The “4+1” View Model of Software Architecture”UML描述示例What do We Model?Basic architectural elementsComponentsConnectorsInterfacesC
2、onfigurationsRationale reasoning behind decisions?4Model Methods of Software ArchitecturesBox-LineFormal LanguagesUMLModel Methods of Software Architecturescurrent practice for documenting software architectures is commonly informal and in many cases based in box-and-line notations.Major disadvantag
3、es of Box-LineAmbiguity in the descriptions. Lack of support for detecting inconsistencies.Inability to establish traceability between design and code.Architectural details incompleteness (most of the times reverse engineering is needed to detect them).Formal LanguageArchitecture Description Languag
4、esThe positivesADLs represent a formal way of representing architectureADLs are intended to be both human and machine readableADLs support describing a system at a higher level than previously possibleADLs permit analysis of architectures completeness, consistency, ambiguity, and performanceThe nega
5、tivesThere is not universal agreement on what ADLs should represent, particularly as regards the behavior of the architectureMost ADL work today has been undertaken with academic rather than commercial goals in mindMost ADLs tend to be very vertically optimized toward a particular kind of analysisAD
6、LsEarly architecture description languagesDarwinRapideWrightDomain- and style-specific languagesKoalaWeavesAADLExtensible architecture description languagesAcmeADMLxADLWright Example10Component DataStore Port getValues (behavior specification) Port storeValues (behavior specification) Computation (b
7、ehavior specification)Component Calculation Port getValues (behavior specification) Port storeValues (behavior specification) Port calculate (behavior specification) Computation (behavior specification) Component UserInterface Port getValues (behavior specification) Port calculate (behavior specific
8、ation) Computation (behavior specification)Connector Call Role Caller = Role Callee = Glue = Wright Example11Component DataStore Port getValues (behavior specification) Port storeValues (behavior specification) Computation (behavior specification)Component Calculation Port getValues (behavior specif
9、ication) Port storeValues (behavior specification) Port calculate (behavior specification) Computation (behavior specification) Component UserInterface Port getValues (behavior specification) Port calculate (behavior specification) Computation (behavior specification)Connector Call Role Caller = Rol
10、e Callee = Glue = Configuration LunarLander Instances DS : DataStore C : Calculation UI : UserInterface CtoUIgetValues, CtoUIstoreValues, UItoC, UItoDS : Call Attachments C.getValues as CtoUIgetValues.Caller DS.getValues as CtoUIgetValues.Callee C.storeValues as CtoUIstoreValues.Caller DS.storeValue
11、s as CtoUIstoreValues.Callee UI.calculate as UItoC.Caller C.calulate as UItoC.Callee UI.getValues as UItoDS.Caller DS.getValues as UItoDS.CalleeEnd LunarLander.Acme Example12/Global TypesProperty Type returnsValueType = bool;Connector Type CallType = Roles callerRole; calleeRole; ; Property returnsV
12、alue : returnsValueType; ;System LunarLander = /Components Component DataStore = Ports getValues; storeValues; ; Component Calculation = Ports calculate; getValues; storeValues; ; Component UserInterface = Ports getValues; calculate; ; / Connectors Connector UserInterfaceToCalculation : CallType Rol
13、es callerRole; calleeRole; ; Property returnsValue : returnsValueType = true; Connector UserInterfaceToDataStore : CallType Roles callerRole; calleeRole; ; Property returnsValue : returnsValueType = true; Acme Example13/Global TypesProperty Type returnsValueType = bool;Connector Type CallType = Role
14、s callerRole; calleeRole; ; Property returnsValue : returnsValueType; ;System LunarLander = /Components Component DataStore = Ports getValues; storeValues; ; Component Calculation = Ports calculate; getValues; storeValues; ; Component UserInterface = Ports getValues; calculate; ; / Connectors Connec
15、tor UserInterfaceToCalculation : CallType Roles callerRole; calleeRole; ; Property returnsValue : returnsValueType = true; Connector UserInterfaceToDataStore : CallType Roles callerRole; calleeRole; ; Property returnsValue : returnsValueType = true; Connector CalculationToDataStoreS : CallType Roles
16、 callerRole; calleeRole; ; Property returnsValue : returnsValueType = false; Connector CalculationToDataStoreG : CallType Roles callerRole; calleeRole; ; Property returnsValue : returnsValueType = true; Attachments UserInterface.getValues to UserInterfaceToDataStore.callerRole; UserInterfaceToDataSt
17、ore.calleeRole to DataStore.getValues; UserInterface.getValues to UserInterfaceToDataStore.callerRole; UserInterfaceToDataStore.calleeRole to DataStore.getValues; UserInterface.calculate to UserInterfaceToCalculation.callerRole; UserInterfaceToCalculation.calleeRole to Calculation.calculate; Calcula
18、tion.storeValues to CalculationToDataStoreS.callerRole; CalculationToDataStoreS.calleeRole to DataStore.storeValues; Calculation.getValues to CalculationToDataStoreG.callerRole; CalculationToDataStoreG.calleeRole to DataStore.getValues; ; For More InformationACME: /acmeRapide: /rapide/Wright: /afs/c
19、s/project/able/www/wright/index.htmlAesop: /afs/cs/project/able/www/aesop/aesop_home.htmlUnicon: /afs/cs/project/vit/www/unicon/index.htmlC2 SADL: /pub/arch/SSEP: /projects/ssepp ADML: /projects/ssepp/admlUML the Unified Modeling LanguageThe most popular ADL in practice together with “4+1”Advantages
20、Support for a diverse array of viewpoints focused on many common software engineering concernsUbiquity improves comprehensibilityExtensive documentation and tool support from many vendorsDisadvantagesNeeds customization through profiles to reduce ambiguity15Main ContentsModeling and Documenting Soft
21、ware Architecture“Architectural Blueprints The “4+1” View Model of Software Architecture”UML描述示例Multi-Viewpoint Model of IEEE Adapted from “IEEE Recommended Practice for Architectural Description of Software Intensive Systems”. IEEE (2000)Multi-Viewpoint Model of IEEE IEEE 1471 Core Conceptsstakehol
22、derAn individual, team, or organization (or classes thereof) with interests in, or concerns relative to, a systemConcerns Interests which pertain to the systems development, its operation or any other aspects that are critical or otherwise important to one or more stakeholdersView A representation o
23、f a whole system from the perspective of a related set of concernsViewpointA specification of the conventions for constructing and using a viewA pattern or template from which to develop individual views by establishing the purposes and audience for a view and the techniques for its creation and ana
24、lysisArchitecture (informational)the fundamental organization of a system, embodied in its components, their relationships to each other and the environment, and the principles governing its design and evolutionAbout KruchtenPhilippe KruchtenOver 16 years of experience as the leader of RUP developme
25、nt team in Rational corp. (now owned by IBM)Valuable experiences in industry (Telecom, Air traffic control system) which he used them for confirmation of his model194+1 View Model of Architecture20Logical viewPhysical ViewProcess ViewDevelopment viewEnd userSystem EngineerIntegratorProgrammers& soft
26、ware managersScenariosLogical View (Object-oriented Decomposition)The system is decomposed into a set of key abstractions, taken (mostly) from the problem domain, in the form of objects or object classesComponent, connector, configuration betterViewer: End-userconsiders: Functional requirements- Wha
27、t the system should provide in terms of services to its users. This decomposition is not only for the sake of functional analysis, but also serves to identify common mechanisms and design elements across the various parts of the system21Logical view Example22逻辑视图部件类型可以用以构造型component扩展了的类来描述可以拥有端口连接件
28、类型可以用以构造型 connector 扩展了的类来描述用类的端口来描述角色用构造型Property扩展属性来描述特征component类中的Property属性用来描述部件的特征connector类中的Property属性用来描述连接件的特征逻辑视图用对象图描述配置为部件类型建立行为状态图,描述部件类型的详细功能规格;为连接件类型建立行为状态图,描述连接件类型的交互机制;为端口/角色建立协议状态机,描述部件端口和连接件角色的交互协议;为配置和复合类型建立顺序图,描述配置和复合类型所包含的功能规格。Development View (Subsystem decomposition) Basis
29、 of a line of productThe development architecture of the system is represented by module and subsystem diagrams, showing the export and import relationships.Viewer: Programmers and Software Managersconsiders: software module organization (Hierarchy of layers, software management, reuse, constraints
30、of tools)Style: layered style25Development View Example开发视图UML的构件图(Component Diagram)可以用来描述软件体系结构实现模块的组织;以UML提供的构造型subsystem,可以描述实现模块的子系统组织和分层组织Process View (The process decomposition)viewer: Integratorsconsiders: Non - functional requirements (concurrency, performance, scalability)style: Several st
31、yles would fit in this view (Garlan and Shaw s Architecture styles)28Process view (cont.)Uses multiple levels of abstractions, a logical network of processes at the highest level A process is a grouping of tasks that form an executable unit:The software is partitioned into a set of independent tasks
32、 Major Tasks: Arch. relevant tasksMinor Tasks: Helper tasks. (Buffering)29Process View example30进程视图UML定义的主动类(Active Class)可以用来描述进程利用UML的顺序图,可以更详细地描述进程之间的通信机制给出 逻辑视图/开发视图 与进程视图的映射表Physical View (Mapping the software to the Hardware)Topology, Communication)The various elements identified networks, pr
33、ocesses, tasks, and objectsneed to be mapped onto the various nodes. We expect that several different physical configurations will be usedViewer: System EngineersConsiders: Non-functional req. regarding to underlying hardware (availability, reliability (fault-tolerance), performance (throughput), an
34、d scalability)32Physical view example (cont.)33部署视图用UML部署视图描述体现进程的部署体现开发构件的部署Scenarios (Putting it all together)The elements in the four views are shown to work together seamlessly by the use of a small set of important scenariosViewer: All users of other views and Evaluators.Considers: System consi
35、stency, validityHelp Architect during the architecture design Help illustrate and validate the document35Scenario example36The controller of Joes phone detects and validate the transition from on-hook to off-hook and sends a message to wake up the corresponding terminal object.The terminal allocates
36、 some resources, and tells the controller to emit some dial-tone.The controller receives digits and transmits them to the terminal.The terminal uses the numbering plan to analyze the digit flow.When a valid sequence of digits has been entered, the terminal opens a conversationCorrespondence between
37、views Views are interconnected. Start with Logical view (Req. Doc) and Move to Development or Process view and then finally go to Physical view. 374+1 View Model of Architecture38Logical viewPhysical ViewProcess ViewDevelopment viewEnd userSystem EngineerIntegratorProgrammers& software managersScena
38、riosFrom Logical to developmentThey are very close, but the larger the project, the greater the distanceA class (Component) is usually implemented as a module, Large classes(Component) are decomposed into multiple packagesPackage design principles needed!Grouping to subsystems based on:team organiza
39、tion, expected magnitude of code (typically 5K to 20K SLOC per subsystem), degree of expected reuse and commonality, and strict layering principles (visibility issues), release policy and configuration management.39From logical to Process viewTwo strategy to analyse level of concurrency: Inside-out:
40、 starting from Logical structuredefine agent tasksObjects executed on that same agent; several classes that need to be executed in mutual exclusionOutside-in: starting from physical structureidentify external stimuli (requests) to the system, define client and servers processes; define the right set
41、 of servers, and allocate objects to the client and servers agents; 40From development/process to physicalPackages( Processes) are mapped onto the available physical hardware, in various configurations for testing or deploymentThe Iterative processNot all software arch. Need all views.A scenario-dri
42、ven approach to develop the systemDocumentation:Software architecture documentSoftware design guidelines42RemarksMethodology successfully used in the industryAir Traffic ControlTelecomComprehensive: All other views are reducible to one of the 4 views 43Main ContentsModeling and Documenting Software Architecture“Architectural Blueprints The “4+1” View Model of Software Architecture”UML描述示例有一个软件开发企业想在其局域网内建立一个资源管理系统,现状如下:公司每天都要做大量的代码处理工作:简单的语言互转(例如将Java转换为C+,或者反之),各种语言程序的自动集成与测试,对不同语言进行切片等程序分析,进行编码的转换(Un
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2024年标准消防中介服务协议模板版B版
- 2024-2030年中国孕妇营养保健品行业营销模式及发展竞争力分析报告
- 2024-2030年中国大型购物中心行业管理经营模式及投资规划分析报告
- 2024-2030年中国单宁酸行业产销需求与投资效益预测报告
- 2024年版押金协议附加条款一
- 湄洲湾职业技术学院《轻化工程AUTOCAD》2023-2024学年第一学期期末试卷
- 眉山职业技术学院《商业银行模拟实训》2023-2024学年第一学期期末试卷
- 茅台学院《知识产权法导论》2023-2024学年第一学期期末试卷
- 2024年版租赁合同租金调整机制分析
- 茅台学院《黑白摄影》2023-2024学年第一学期期末试卷
- 2023年某公司新建标准厂房工程技术标
- 2024年面向社会公开招聘警务辅助人员报名信息表
- 实变函数知到智慧树章节测试课后答案2024年秋华南理工大学
- 劳动教育(绍兴文理学院)知到智慧树章节答案
- 《液压与气压传动案例教程》课件项目4
- 《信息技术基础》课件《模块四:信息检索》任务2
- 供应链管理基础知识单选题100道及答案解析
- 同理心课件教学课件
- 2024中国类风湿关节炎诊疗指南
- 静疗小组第一季度理论试卷(2024年)复习测试卷附答案
- 文化活动突发舆情应急预案
评论
0/150
提交评论