软件构造第二章复习总结
首先介绍软件配置管理SCM与版本控制系统VCS ,之后再介绍软件构造的阶段划分、各阶段的构造活动,Git/GitHub 。
软件配置管理SCM的任务是追踪与控制软件中的变化, SCM实际任务是版本控制和建立基线。
Software Configuration Item (SCI): the fundamental structural unit of SCM.
软件配置项是软件配置管理的基本单位,任何需要管理 的要素都是软件配置项(源代码、数据、文档、软硬件、环境等)
基线 是在某时间点上,通过评审和认可后的版本,作为后续变化的基点
Software versioning is the process of assigning either unique version names or unique version numbers to unique states of computer software.
给软件的某个状态唯一的标识
软件的版本控制是一个过程他会把独特的版本名字或独特的版本数字给电脑软件的独特的状态。
Within a given version number category (major, minor), these numbers are generally assigned in increasing order and correspond to new developments in the software
在给予一个版本数字种类之后,这些数字通常会以增长的顺序增加并且符合软件的新的发展。
At a fine-grained level, revision control is often used for keeping track of incrementally different versions of electronic information, whether or not this information is computer software
以一个细致的等级,修正控制通常用来跟踪一个持续增长的不同版本的电子的信息,无论这个信息是否是电子软件。
版本控制系统的三种模式
Repository: a local or remote store of the versions in our project
我们工程中一个本地的或远程的存储
Working copy: a local, editable copy of our project that we can work on
一个本地的可编辑的副本、
File: a single file in our project
我们工程的一个简单的文件
Version or revision: a record of the contents of our project at a point in time
某一时间点我们工程的记录
Change or diff: the difference between two versions
两个版本的不同
Head: the current version
现存版本
接下来我们看一下 Git/GitHub,它是版本控制系统工具的一个例子
git的操作示意图
A Git repository has three parts:
.git directory (a repository storing all version control data)
git的目录,它是一个仓库来存储所有的版本控制数据。
Working directory (local file system)
工作目录,是本地的文件系统
Staging area (in memory)
是内存中的展现区域
Each file belongs to one of the following three states
每个文件都属于以下三种区域的一个。
Modified (the file in working directory is different from the one in git repository, but is not in staging area)
在工作目录的文件不同于git仓库的文件,但不在展现区域
Staged (the file is modified and has been added into the staging area)
文件被修改并且进入了展现区域
Committed (the file keeps same in working directory and git directory)
在工作区域和git仓库的文件保持不变
Git的所有操作都是在一个图数据 库上进行 从另一台机器/服务器复制git项目意味着复制 整个对象图。
对象图如下
不重复保存各版本 中没有发生变化的文件 每个文 件的每个版本只保存一次,多个提交可共享副本
.分支是在版本控制下对对象的复制,以便修 改可以沿两个分支平行进行。
CMDB (Configuration Management Database) 配置管理数据库,对配置项进行一系列的管理
接下来讲软件构造的阶段划分、各阶段的构造活动
General process of software construction: Design Programming /refactoring Debugging Testing Build Release
一般的过程:设计,编程,调试,测试,构造,释放
Programming / refactoring 编程重构
– Review and static code analysis检查和静态代码分析
– Debugging (dumping and logging) and Testing调试和测试
– Dynamic code analysis /profiling动态代码分析
Narrow-sense process of software construction (Build): Validate Compile Link Test Package Install Deploy
狭义的过程:编译,链接,测试,打包,安装,部署
Build system: components and process 构建系统组成和程序
– Build variants and build language 构建变量和语言
– Build tools: Make, Ant, Maven, Gradle, Eclipse 构建工具
建 模语言是一种人工语言,用于表达信息、知识或系统,以一套一致的 规则定义来可视化、推理、验证和交流系统的设计。
重构是在不改变代码外部行为的前提下,改善其内部结 构。
The packagingand testingof software written in interpreted languages such as Perl and Python. 打包和测试解释型语言
以上就是第二章的内容,主要讲述了软件配置管理SCM和版本控制系统VCS,以及git的使用,以上三点是需要重点记忆的,软件的构造过程理解即可。