您的位置:首页 > 其它

软件构造第一章复习总结

2019-06-14 14:51 239 查看

第一章的总结
Multi-dimensional software views

第一章第一部分主要讲解了多维度软件视图,我们要了解这三个维度,build-time,run-time,moment,period,code-level,component-level分别对应着什么,分别了解其中包含的内容。
首先是build-time:
它是软件构建的核心过程和环节
Code-level view: source code 源代码
functions, classes, methods, interfaces

Component-level view: architecture 结构
files, directories, packages, libraries

Moment view:特定时刻
Period view:伴随时间改变

Build-time, moment, and code-level view:在逻辑上代码是如何通过基本程序块组织的
包括以下四点:
Source code, AST(抽象语法树), Interface-ClassAttributeMethod (Class Diagram)
Lexical-oriented source code(面向词法)
Syntax-oriented program structure: e.g., Abstract Syntax Tree (AST)(面向语法)

Semantics-oriented program structure: e.g., Class Diagram (面向语义)

Build-time, period, and code-level view:
Code churn: Lines added, modified or deleted to a file from one version to another
代码变化,包括对一个文件的行数增加,修改,删除或者从一个版本到另一个版本。

Build-time, moment, and component-level view:
Package, Source File, Static linking, Library, Test Case (Component Diagram)
源代码被组织构成目录,文件被封装成包、组件和子系统,可复用模块形成类库
▪ In Unified Modeling Language (UML), a component diagram depicts how components are wired together to form larger components or software systems.
在统一建模语言中,一个部件表描述了成分怎么被链接在一起去形成更大的组份或软件系统。

把库整合进入程序的两种方法:
Static linking 静态链接
在构建程序的过程中,将类库文件复制到可执行文件中,称为可执行文件的一部分。
Dynamic linking 动态链接
不将目标文件复制到可执行程序中,而是会标注用到的类库,在运行时,加载用到的库到内存中,然后同主程序链接,部署时需要将用到的类库同程序一起部署。
Build-time, period, and component-level view
Configuration Item, Version
配置项目,版本
Software Configuration Item (SCI)
软件配置项目,简称sci

接下来是Runtime Views
运行视角:
Code-level view: source code
Component-level view: architecture
Moment view:特定时间点
Period view:持续时间

Run-time, moment, and code-level view
Code Snapshot, Memory dump
代码快照,内存转储
Snapshot diagram: 快照表,刻画内存中某时刻变量的状态

Memory dump
a file on hard disk containing a copy of the contents of a process’s memory, produced when a process is aborted by certain kinds of internal error or signal
一个硬盘上的文件包括一个程序内存内容的复制品,当一个程序因为某种内部错误或者信号而异常退出时制造。
Run-time, period and code-level view:
Execution trace执行追踪
Procedure Call Graph, Message Graph (Sequence Diagram)
程序访问图,信息图,也叫顺序表

统一建模语言的顺序表

Execution tracing
实行追踪Tracing involves a specialized use of logging to record information about a program’s execution.
追踪包含对日志的专门使用去记录关于程序执行的信息。
Run-time, moment, and component-level view:
Package, Library, Dynamic linking, Configuration, Database, Middleware, Network, Hardware (Deployment Diagram)
包,库,动态链接,设置,数据库,中间设备,网络,硬件,部署表
统一建模语言的部署表:

Run-time, period, and component-level view
Event log
Event logging provides system administrators with information useful for diagnostics and auditing. 事件日志 给系统管理员提供信息用来诊断和审计。
以上就是软件构造的多维视图。
接下来了解软件构造的阶段划分、各阶段的构造活动
1.从无到生成代码
Code – Programming / Coding (Chapter 3 ADT/OOP) – Review, static analysis/checking (Chapter 4 Understandability 编程编码,之后检查,再静态分析。
2. 从代码到代码组成
Code  Component – Design (Chapter 3 ADT/OOP; Chapter 5 Reusability; Chapter 6 Maintainability) – Build: compile, static link, package, install, clean (Chapter 2 Construction process) 对代码进行设计,编译,静态链接,打包,安装,清除。
3. Build-time  Run-time – Install / deploy (Course in the 3rd year) – Debug, unit/integration testing (Chapter 7 Robustness 从构建到运行,实行安装,部署,调试,单元测试。
4. Moment  Period – Refactoring (Chapter 9 Refactoring) – Version control (Chapter 2 SCM) – Loading, dynamic linking, interpreting, execution (dumping, profiling, logging) (Chapter 8 Performance)从时刻到过程,进行重构,版本控制,装载,动态链接,解释,执行。

接下来看第一章的第三部分:内部/外部的质量指标
Quality properties of software systems – External vs. internal quality factors – Important external quality factors – Tradeoff between quality factors
软件系统的质量特性,内部和外部因素,重要的外部质量因素,两种质量因素的权衡
Five key quality objectives of software construction – Easy to understand: elegant and beautiful code / understandability – Ready for change: maintainability and adaptability – Cheap for develop: design for/with reuse: reusability – Safe from bugs: robustness – Efficient to run: performance
五个关键的质量对象的软件构造:易于理解,易于改变,易于发展,可复用性,健壮性。





第一章主要讲了三部分:软件构造的多维度视图 ▪ 软件构造的阶段划分、各阶段的构造活动 ▪ 内部/外部的质量指标,重点了解多维度视图里的内容,质量指标,以后的章节会详细解说。

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: