2011年秋季工程硕士课程软件体系结构与软件中间件技术 主讲:沃天宇 新主楼A座208教室 1 第三讲:软件体系结构风格 2011年9月24日下午13:00-16:00 课件下载地址 ./courses/arch2011 内容提要 软件体系结构风格概述 典型体系结构风格 异构结构风格 小结 回顾:设计阶段的软件体系结构 体系结构设计经验的总结和复用 实现所谓高层次的重用:软件体系结构风格 风格:描述某一类系统组织方式的惯用模式 提供共识性的术语空间(例如:管道,客户/服务器结构) 记录和重用设计决策 寻找经典的风格;描述风格;在SA设计中应用风格 需求分析 设计 编码/实现 部署 维护 测试 6 体系结构风格:定义(1) An architecture style characterizes a family of systems that are related by shared structural and semantic properties. [Monroe et al. 1997] 体系结构风格描述具有共享结构和语义属性的软件系统族 Architecture style provide an abstraction for the interactions of ponents in architecture. [Shaw, 1990] 体系结构风格提供一种对体系结构中构件交互的抽象 7 体系结构风格:定义(2) (Architectural style is) an abstraction of element types and formal aspects from various specific architectures.[Perry and Wolf,1992] 体系结构风格是元素类型的抽象 An architecture style encapsulates important decisions about the architectural elements and emphasizes important constrains on the elements and their relationships. 体系结构风格封装了关于体系结构元素的重要决策,强调对元素及其关系的约束 8 体系结构风格:定义(3) Software pattern (style): pattern of interactions among ponents. [Garlan et al, 1993, 1994, 1997] 体系结构模式(风格):具有特定类型的组件间的交互 Determines the vocabulary ponents and connectors that can be used in instance of that style 确定构件和连接件的词汇表(vocabulary) Together with a set of constraints on how they can bined 一组指导构件和连接件如何连接的约束(constrains) 9 体系结构风格: 总结 体系结构风格(Architectural Style) 是反复出现的组织模式和习惯用法,是对一系列体系结构设计的抽象 描述某一特定应用领域中系统组织方式的惯用模式 它通过词汇表和一组约束定义一个系统家族 词汇表包含构件和连接件的类型 约束指出如何将这些构件和连接件组合起来 10 什么是软件体系结构风格 优势: 促进设计重用 能带来大量的代码重用 采用例行结构,易于理解 使用标准的风格,有利于系统的互操作性 采用某种体系结构风格,可以重用相应的体系结构分析等技术