软件系统设计-16-架构文档

article/2025/10/7 18:09:22

1. 文件架构 Document Architecture

1.1. 为什么要记录软件架构? Why to document software architecture?

  1. 这是记录软件架构的几个很好的理由,例如:There are several good reasons for documenting software architecture such as:
    1. 交流和社交化架构设计决策 Communicating and socialising architecture design decisions
    2. 帮助理解和评估架构设计决策 Helping understand and assess architecture designdecisions
    3. 刷新设计师对某些决策的记忆 Refreshing designers’ memories about certain decisions
    4. 培训架构设计人员 Training people in designing architecture
    5. 支持地理位置分散的团队 Supporting geographically ditributed teams
  2. 体系结构文档用于以下活动:Architecture documentation is used for several activities:
    1. 架构设计分析 Architecture design analysis.
    2. 工作分解和分配 Work breakdown and assignment.
    3. 部署后维护 Post-deployment maintenance.
  3. 软件体系结构文档提供了维护和修改决策的框架 Software architecture documentation provides a framework for maintenance and modification decisions.

1.2. 记录架构的挑战 Challenges in documenting architecture

  1. 没有普遍接受的记录软件架构的标准或方法。No universally accepted standard or method of documenting software architecture.
  2. 记录大型系统的架构可能是一项耗时且重要的任务。 Documenting architecture of large-scale system can be time consuming and non-trivial task.
  3. 对用于记录架构的视图的数量和性质没有达成共识 - 资源密集型活动。No consensus on the number and nature ofviews used to document architecture - resource intensive activity.
  4. 迫在眉睫的最后期限和不断发展的架构性质不利于架构文档的流通。Looming deadlines and evolving nature of architecture are detrimental to the currency of architecture documentation.
  5. 缺乏全面的符号和工具。Absence of a comprehensive notation and tooling.

1.3. What to document?

  1. 许多值得记录的事情,例如:Many things worth of documenting such as:
    1. 组件接口依赖项 Component interfaces and dependencies
    2. 子系统约束 Subsystems constraints
    3. 测试场景 Test scenarios
    4. 围绕设计决策的上下文信息 Contextual information surrounding design decisions
  2. 有几个因素会影响对记录内容的决定 Several factors affect the decision of what to document:
    1. 被记录的架构的复杂性 Complexity of the architecture being documented
    2. 应用程序的寿命 Longevity of an application
    3. 基于涉众对文档的预期使用 Based on the expected use of documentation by stakeholders

1.4. (7) Rules for Architecture Documentation

  1. 读者的角度撰写文档 Write documentation from the reader’s point of view
  2. 避免没有意义的重复 Avoid unnecessary repetition.
  3. 避免模糊性 Avoid ambiguity.
  4. 使用标准的文档组织方式 Use a standard organization.
  5. 记录理由 Record rationale.
  6. 保持文档最新但不要太最新 Keep documentation current but not too current
  7. 审查文件是否适合用途 Review documentation for fitness of purpose

2. 视图和视图之外的部分 View and Beyond

2.1. Views 视图

2.1.1. Styles and Views 样式和视图

2.1.1.1. Three Categories of Styles

  1. 它是如何构建为一组实现单元的?How it is structured as a set of implementation units? Module styles
  2. 它是如何构建为一组具有运行时行为和交互的元素的?How it is structured as a set of elements that have runtime behavior and interactions? Component-connector(C&C) styles
  3. 它与环境中的非软件结构有何关系?How it relates to non-software structures in its environment? Allocation style

2.1.1.2. 架构风格 和 架构模式 Styles Vs. Patterns

  1. 架构风格是元素和关系类型的特殊化,以及关于如何使用它们的一组约束 An architecture style is a"specialization of element and relation types, together with a set of constraints on how they can be used" (Bass, Clements, and Kazman 2003)
  2. 架构模式表达了软件系统的基本结构组织模式 An architecture pattern"expresses a fundamental structural organization schema for software systems"(Buschmann et al. 1996)
  3. 架构模式的一个重要部分是关注问题和上下文,以及如何在该上下文中解决问题。An essential part of an architecture pattern is its focus on the problem and context as well as how to solve the problem in that context.
  4. 架构风格侧重于架构方法,对特定风格何时有用或无用提供更轻量级的指导。An architecture style focuses on the architecture approach, with more lightweight guidance on when a particular style may or may not be useful.
  5. 架构模式:{问题,上下文} --> 架构方法Architecture pattern: {problem, context} --> architecture approach
  6. 架构风格:架构方式 Architecture style: architecture approach
  7. 风格描述通常不包括详细的问题/上下文信息; 架构模式可以。A style description does not generally include detailed problem/context information; architecture patterns do.
  8. 微服务知识定义了element,和element通过什么方式进行交互。

2.1.2. Architectura Views

  1. 视图是一组系统元素和它们之间关系的表示——不是所有的系统元素,而是特定类型的那些元素 A view is a representation of a set of system elements and relations among them - not all system elements, but those of a particular type.
  2. 视图让我们将系统的实体划分为有趣且易于管理的系统表示 Views let us divide the system’s entity into interesting and manageable representations of the system.
  3. 不同的视图支持不同的目标和用户,突出不同的系统元素和关系 Different views support different goals and users, and highlight different system elements and relations
  4. 不同的视图在不同程度上暴露了不同的质量属性。 Different views expose different quality attributes to different degrees.

2.1.3. Structural Views 结构关系视图

2.1.3.1. Module Views 模块视图

  1. 模块是提供一组连贯职责的实现单元 A module is an implementation unit that provides a coherent set of responsibility.
  2. 没有至少一个模块视图,任何软件架构的文档都不可能是完整的 It is unlikely that the documentation of any software architecture can be complete without at least one module view.
  3. 视图示例
    1. 分解视图 Decomposition view
    2. 使用视图 Uses view
    3. 泛化视图 Generalization view
    4. 分层视图 Layered view
    5. 领域视图 Aspects View
    6. 数据模型视图 Data model view
  4. Summary of Module Views

2.1.3.2. Component-Connector Views

  1. 组件和连接器视图显示具有某些运行时存在的元素,例如进程、对象、客户端、服务器和数据存储(称为“组件”)。 Component-and-connector views show elements that have some runtime presence, e.g, processes, objects, clients, servers, and data stores (being termed 'components).
  2. 附件指示哪些连接器连接到哪些组件 Attachments indicate which connectors are attached to which components.
  3. 通过将连接器的端点连接到组件的端口来显示附件。 Attachment is shown by connecting the endpoints of the connector to the ports of components.
  4. 视图示例
    1. 管道和过滤器视图 Pipe-and-filter view
    2. 客户端-服务器视图 Client-server view
    3. 点对点视图 Peer-to-peer view
    4. 面向服务的架构 (SOA) 视图 Service-oriented architecture (SOA) view
    5. 发布订阅视图 Publish-subscribe view
    6. 共享数据视图Shared-data view
    7. 多层视图 Multi-tier view
  5. Summary of C&C Views

2.1.3.3. 分配视图 Allocation Views

  1. 分配视图描述了软件单元到软件开发或执行环境元素的映射 Allocation views describe the mapping of software units to elements of an environment in which the software is developed or in which it executes.
  2. 分配视图的通常目标是将软件元素所需的属性与环境元素提供的属性进行比较,以确定分配是否成功 The usual goal of an allocation view is to compare the properties required by the software element with the properties provided by the environmental elements to determine whether the allocation will be successful or not.
  3. 分配视图可以描绘静态或动态视图 Allocation views can depict static or dynamic views
  4. 视图实例
    1. 部署视图 Deployment view
    2. 安装视图 Install view
    3. 工作分配视图 Work assignment view
    4. 其他分配视图 Other allocation views
  5. Summary of Allocation Views


2.1.4. 质量视图 Quality Views

  1. 安全视图 Security view
  2. 性能视图 Performance view
  3. 可靠性视图 Reliability view
  4. 沟通视图 Communication View
  5. 异常(错误处理)视图Exception view (error-handling) view

2.1.5. 文档视图 Documenting Views

2.1.5.1. 使用3步选择视图 3-Step for Choosing Views

  1. 步骤 1:构建涉众/视图表 Step-1: Build a stakeholder/view table
  2. 步骤 2:合并视图 Step-2: Combine views
    1. 2.1 识别上表中的边缘视图 2.1 Identify marginal views in the above table
    2. 2.2 通过关联一个视图中的元素和另一个视图中的元素,将每个边缘视图与另一个具有更强选区的视图相结合 2.2 Combine each marginal views with another view with stronger constituency by associating between elements in one view and elements in the other
  3. 步骤 3:确定优先级和阶段 Step-3: Prioritize and stage
    1. 分解视图 decomposition view
    2. 80/20原则 80/20 principle
    3. 按顺序完成所有视图?complete all views in sequence?

2.1.5.2. 利益相关者和文件 Stakeholder and Documentation

2.1.5.3. 利益相关者视图表 Stackholder-View Table

  • 上图中每一个格子是指涉众对某一个部分的细节了解程度。

2.1.6. 组合视图 Combining Views

  1. 各种 C&C 视图 Various C&C view
  2. 带有 SOA 或通信进程视图的部署视图 Deployment view with either SOA or communicating- process Views
  3. 分解视图和任何工作分配、实施、使用或分层视图 Decomposition view and any of work assignment, implementation, uses, or layered views

  • 使用一张视图说明整个系统的部署信息

  • 描述了component之间的关系

2.1.7. View Template

  1. 第1部分:主要介绍 Section-1: The Primary Presentation
    1. 显示视图的元素和关系 shows the elements and relations of the view
    2. 通常带有一个键的图形 often graphical with a key
  2. 第2部分:元素目录 Section-2: The Element Catalog
    1. 详细介绍了第1节中描述的元素。details the elements depicted in Sect.1
    2. 元素及其属性 Elements and their properties
    3. 关系及其属性 Relations and their properties
    4. 元素接口和行为 Element interfaces and behavior
  3. 第3部分:上下文图 Section-3: Context Diagram
    1. 系统或其部分如何与其环境相关 how the system or its portion relates to its envlronment
  4. 第4部分:可变性 指南 Section-4: Variability Guide
    1. 如何在此视图中练习架构的任何变化点 how to exercise any variation points of the architecture in this view
  5. 第 5 节:基本原理 Section-5: Rationale
    1. 为什么设计反映在视图中 why the design reflected in the view
    2. 提供了一个令人信服的论据,证明它是合理的。 provides a convincing argument that it is sound .

2.1.8. 上下文图 Context Diagram

2.2. 超越(超越观点的信息)Beyond(Information Beyond Views)

2.2.1. 超越视图的文档 Documentation Beyond Views

2.2.2. 文件控制信息 Document Control information

  1. 第1部分:文档路线图说明文档中的信息以及在哪里可以找到它 Section-1: Documentation Roadmap tells what in formation is in the documentation and where to find it
    1. 范围和总结 Scope and summary
    2. 文档的组织方式 How the documentation is organized
      1. 简短的概要 short synopsis
      2. 带注释的目录 annotated table of contents
    3. 查看概览 View overview
    4. 利益相关者如何使用文档 How stakeholders can use the documentation

2.2.3. Mapping between Views

2.2.4. Documentation Package


http://chatgpt.dhexx.cn/article/w94CKplk.shtml

相关文章

课程设计【操作系统】:【文件管理系统设计】(包含完整代码)

文章目录 课程设计题目1. 设计内容1.1 基本命令设计1.2 基本数据结构设计 1.3 基本命令的程序流程图 1) 用户注册:register2) 用户登录:login3) 创建文件:create(文件名)4) 创建文件夹:mkdir(文…

微服务系统设计(04)——接口文档管理设计

摘要 整个系统是多个应用一起构建,由于服务不会单独存在,服务开发团队必然与其他服务团队进行服务调用,暴露出对外接口势在必行。早期做开发的时候,大家习惯于以 word 或 excel 的形式,但弊端显而易见,一旦…

系统设计与实现

6.搭建大规模可扩展系统(一)_哔哩哔哩_bilibili 短网址系统设计_哔哩哔哩_bilibili 一.短url设计 后端面试之系统设计-短网址(Short URL)服务怎么设计?_码农在新加坡的博客-CSDN博客_短网址服务 系统设计(五) Desi…

文件系统的设计与实现(操作系统课程设计)

转发请注明:http://blog.csdn.net/tianqingdezhuanlan/article/details/51344739 源码下载地址:http://download.csdn.net/download/u013255737/9513460 一、设计目的、意义 1.通过模拟文件系统的实现,深入理解操作系统中文件系统的理论知识,…

消息通知系统设计文档

一、功能概述 1.不同的系统的消息,管理后台,小程序(B/C),微信公众号,短信,邮件等 2.不同业务的消息,充值,提现到账,系统更新,公告等 3.消息的明细&#xff0c…

图书管理系统设计文档汇总

1.编写目的: 现阶段大学生对于课外的书籍阅读越来越看重,有更多的意愿去了解本专业之外的内容以及拓展本专业外的技能。建立一个图书管理借阅数据库方便大家的学习。 2.数据库命名规则: 利用“_”作为连接符,将名词连接在一起&…

学生信息管理系统详细设计文档

第一章引言 1.1编写目的 本文档给出了“学生信息管理系统”的详细设计。针对高校学生群体数量较大,为方便高校学生信息管理,我们设计了一个较为高效的学生信息管理系统。编写该文档目的:便于用户,开发人员之间进行理解和交流&am…

[计算机通信网络]以太网的帧格式详解

目录 一、前言 二、以太网的帧格式 Preamble(前导码): SFD(帧开始定界符): Destination Address,Source Address: Type/Len(类型/长度): Da…

单片机与计算机之间通讯 程序,如何实现计算机与单片机之间的通信

描述 本文是关于计算机与单片机的通信实验的应用。主要包括实验原理阐述、硬件电路图、源程序等 目录: 1、单片机串口通信的应用 2、PC控制单片机IO口输出 3、单片机控制实训指导及综合应用实例 4、单片机给计算机发送数据: [实验任务&#x…

853-两台计算机之间是如何通信的?

1. 五层协议参考模型 所谓通信协议就是通信双方都必须要遵守的通信规则。如果没有网络通信协议,计算机的数据将无法发送到网络上,更无法到达对方计算机,即使能够到达,对方也未必能读懂。有了通信协议,网络通信才能够发…

设备VMnet0 上的网桥当前未运行。此虚拟机无法与主机或网格中的其他计算机通信

关闭虚拟机后(下面要恢复默认设置前需要关机),打开 编辑菜单》虚拟网络编辑器 打开后恢复默认设置或修改VMnet0为“自动桥接”,直到与步骤2结果一样,点确定关闭设置窗口。 开机前先“虚拟机设置》网格适配器》设置状态…

网络工程属于计算机还是通信,通信工程属于计算机大类吗 哪个大类

通信工程专业属于电子信息类,属于计算机(大类)类。通信工程不算是计算机的相关专业,通信工程(也作电信工程,旧称远距离通信工程、弱电工程)是电子工程的一个重要分支,电子信息类子专业,同时也是其中一个基础学科。 通信工程相近专…

计算机网络通信技术的重要性,分析计算机网络通信技术的特点及应用效果

摘要:随着计算机网络技术的快速发展,在很多领域中都可以实现该技术的合理利用。本文针对计算机网络通信技术的特点进行分析,并且结合实际情况,提出该技术的未来发展前景,为计算机网络通信技术的应用效果提供有效保障。…

2018计算机通信网络,2018年1-12月我国计算机、通信和其他电子设备制造业企业数量共计16656个...

中国报告网提示: 参考观研天下发布《2019年中国电子设备市场分析报告-市场深度分析与未来商机预测》 &nb 2018年1-12月我国计算机、通信和其他电子设备制造业企业数量共计16656个,累计同比增长5.69%;其中,1-12月我国计算机、通…

【计算机通信网络复习】第1章-计算机网络概论

计算机网络概论 1.1 计算机网络的形成与发展(了解) 1.1.1 计算机网络发展阶段的划分 第一阶段:计算机网络的形成与发展 (1)时间:20世纪50年代。 (2)特点:1. 数据通信技…

【计算机网络】网络通信基础

文章目录 网络通信基础网络通信基本概念信息的传递过程数据通信网络基本概念网络设备交换机(Switch)路由器(Router)防火墙(Firewall)无线设备 局域网、城域网、广域网网络拓扑 网络通信基础 计算机网络 计…

计算机网络数据通信论文,浅谈计算机网络与数据通信的发展

浅谈计算机网络与数据通信的发展 随着计算机网络技术与多媒体通信技术的广泛运用,数据通信是行业发展的必然趋势,下面是小编搜集整理的一篇探究计算机网络与数据通信发展的论文范文,欢迎阅读查看。 摘 要:数据通信是通信技术和计算机技术相结合而产生的一种新的通信方式,未…

通信网与计算机网络的区别,计算机网络和计算机通信网络之间的本质区别是什么?...

原标题:计算机网络和计算机通信网络之间的本质区别是什么? 1、用途不同 计算机网络在网络操作系统,网络管理软件及网络通信协议的管理和协调下,实现资源共享和信息传递。计算机通信在计算机与计算机之间或计算机与终端设备之间进行…

计算机通信与网络(一)

一、计算机通信与网络基础 1.计算机通信与网络的发展 四个阶段: 其中第二阶段产生了分组交换网,分组交换网是以网络为中心,主机都处在网络的外围。 第三阶段形成了基于TCP/IP的因特网。TCP(Transmission Control Protocol&…

我国计算机通信技术现状及未来的发展趋势,概述计算机通信技术的发展趋势

概述计算机通信技术的发展趋势 随着世界信息化科技的快速发展,我国的计算机网络通信需求随着人们生活的丰富多彩而不断扩增,以下是小编搜集整理的一篇探究计算机网络通信新技术的论文范文,供大家阅读参考。 摘 要:随着我国科技信息的快速发展,计算机网络通信方面也随着其需…