-
- 1.1. Software Processes
- 1.1.1. Requirement specification 需求规范
- 1.1.2. Analysis 分析(开发第一步)
- 1.1.3. Design 设计(开发第二步)
- 1.1.4. Implementation 实现(开发第三步)
- 1.1.5. Testing 测试(验证第一步)
- 1.1.6. Deployment 部署(验证第二步)
- 1.1.7. Evolution 演进(维护)
- 1.2. Software process models - Genetic & Classic 通用经典开发过程模型
- 1.3. Modern Software Processes - Agile 现代软件过程 - 敏捷开发
- 1.1. Software Processes
1. Day 2 - Software Processes
1.1. Software Processes
软件开发的过程是需求规范 - 开发(分析、设计、实现) - 验证(测试、部署) - 演进(维护)。
Definition定义: A software process is a set of structured activities that leads to the production of the software. 软件流程是导致软件生产的一组结构化活动。
软件开发的过程是需求规范 - 开发(分析、设计、实现) - 验证(测试、部署) - 演进(维护)。
- Requirement specification 需求规范
- Development 开发
- Analysis 分析
- Design 设计
- Implementation 实现
- Validation (Testing/Deployment) 验证(测试、部署)
- Evolution (Maintenance) 演进(维护)
1.1.1. Requirement specification 需求规范
- 定义:Defining what the system should do 定义系统应该做什么
- 目标: A complete description of the problem and of the constraints imposed by/on the environment. 对问题和限制的完整描述。
- 内容:
- Functions of the system 系统功能
- Future extensions 未来拓展
- Amount of documentation required 需求文件数量
- Response time and performance 响应时间和性能
- Acceptance criteria 验收标准
- 结果: Requirements specification 需求规范(一份文档)
1.1.2. Analysis 分析(开发第一步)
- 目标: analyse requirements to create a conceptual model of the software system. 分析需求以创建软件系统的概念模型。
- 内容:
- Data modelling 数据建模,分析并组织数据结构
- Functional modelling and information/control flow 功能建模,信息、控制流
- Behavioural modelling and state 行为建模
- User interface modelling 用户界面建模
- 结果Result: A set of Analysis Models 一组分析模型(概念模型)
1.1.3. Design 设计(开发第二步)
- 目标: An implementable model of the software system. 形成软件系统的可实现模型。(包含构建系统所需的足够信息)
- 内容:
- Architecture is defined. 定义了架构
- System is decomposed to components within the architecture. 分解系统为架构内组件
- Design decisions dramatically impact system quality. 设计阶段的决策极大影响了系统质量
- 结果: Detailed Design Documentation 详细的设计文档
1.1.4. Implementation 实现(开发第三步)
- 目标: implementation of all design elements. 所有设计元素的实现
- 内容:
- Starts from the component specifications developed during design. 从设计阶段确定的组件开始
- Interfaces defined in the design should be respected by the implementation of the component. 设计接口与实现组件要一一对应。
- Code should be well documented and easy to read, flexible, correct, reliable AND fully tested. 代码应该书写规范,易于阅读,灵活正确可靠,经过全面测试
- 结果: Working and executable version of the software. 软件的工作版本与可执行版本
1.1.5. Testing 测试(验证第一步)
- 定义:检查是否符合客户要求
- 内容:
- Unit testing 单元测试
- Functional testing 功能测试
- Integration testing 集成测试
- System testing 系统测试
- Acceptance testing 验收测试
- Testing and implementation should run in parallel. 测试与实现应该同时进行!
- 结果: Fully tested software 完全测试过的软件
1.1.6. Deployment 部署(验证第二步)
- 内容:
- Implement a strategy to avoid outages 实现策略防止中断
- Package software ready to install on a computer system/device or deploy to servers 打包软件,准备安装或部署
- Actually installing/deploying the software. 实际安装或部署
- Live testing in real environment. 真实环境的实时测试
- Documentation and manuals. 文件与手册
- Training. 训练
- 结果: Working software in real environment 真实环境的可用软件
1.1.7. Evolution 演进(维护)
- 目的:keeping the system operational after delivery to the customer; changing the system in response to changing customer needs. 交付后保持系统运行,根据需求改变来改变系统
- 要求:
- Corrective可纠正: identification and removal of faults.识别并消除故障
- Adaptive自适应: modifications needed to achieve interoperability with other systems and platforms. 实现其他系统和平台的互操作
- Perfective可改进: incorporation of new features, improved performance and other modifications. 引入新功能,改进性能
- Preventive预防性: modifications to mitigate possible degradation of usability, maintainability, etc. 为减轻可用性和可维护性下降所做的修改
1.2. Software process models - Genetic & Classic 通用经典开发过程模型
- 采用开发模型的原因
- 根据系统不同,开发活动可以顺序sequence、交错interleaved或同步concurrently进行。
- Must be modelled in order to be managed. 必须建立管理模型,方便管理。
- 软件开发过程模型的定义:
- A simplified representation of a software process 软件开发过程的简化表示
- An abstract representation. 一种抽象表示
1.2.1. The waterfall model 瀑布式模型
- 定义
- Cascade级联 from one phase to another: Sequential approach. 级联,顺序
- In principle, one phase has to be complete before moving onto the next phase. 完成上一阶段,才能进入下一阶段
- Separate and distinct phases. 阶段分离且不同
- 优点
- Easy to monitor the progress (After a small number of iterations, freeze parts of the development and continue with later phases) 便于监控进度,少量迭代即可结束上一步、执行下一步
- Documentation is well produced at each stage. 每个阶段文档质量高
- Structured approach. 方法结构化
- Specialised teams can be used at each stage of the lifecycle. 每个阶段都可以雇佣专业团队
- 缺点
- Inflexible (difficulty of accommodating change after the process is underway) 不灵活,流程开始后很难改变
- Time consuming 费时
- Real projects rarely follow the sequential flow. 真正项目很少完全遵守流程
- A working version of the system will not be available until late in the project time-span. 工作版本要到项目后期才可用
- Minimises impact of global understanding over the lifecycle of a project. 降低了在项目生命周期内的整体理解
- Not realistic. 不现实
- 适合的项目 - 适合关键性critical任务(发射火箭等)
- 十分了解需求,需求更改很少的项目(基本没有商业项目符合)
- Adaptation or enhancement of existing system. 对存在的系统调整或升级时
- In high risk, safety critical systems e.g. air traffic control, quality is key. 高风险,安全最为关键的项目(飞机,航天,核能,通信)
1.2.2. Evolutionary development 进化开发
- 定义:
- Activities are interleaved. 活动交错进行
- Rapid feedback 迅速反馈
- Refining through many versions , evolves over time 随版本精炼,随时间进化
- Core requirements are well understood but not the detailed extension. 只满足核心功能,但没有详细拓展
- 优点
- Effective 高效
- Concurrency, several members of the team may be working on different increments or releases 同时进行,团队成员各自负责不同部分
- Can meet the immediate needs 即时满足需求
- Specification can be developed incrementally 规范逐步制定
- Users feedback 根据用户反馈
- Planned feature, new feature 统筹计划的功能与新功能
- Effective 高效
- 缺点
- Lack of process visibility, Lack of deliverable documents to measure progress. 流程进度不可见,缺乏衡量进度的文件
- Systems are often poorly structured 系统结构差(不停改变Continual change,工作太快Rush work)
- Special skills may be required 可能需要特殊技能(需要能快速原型设计的语言languages for rapid prototyping)
- 适合的项目 - 社交软件,即时通讯,手机app
- small or medium-size interactive systems 中小规模交互系统
- parts of large systems, e.g. the user interface 大系统的用户界面
- For short-lifetime systems 短周期系统
- Project with multiple features and therefore releases. 有多个功能与发布版本的系统
1.2.3. RUP (The Rational Unified Process) 合理统一过程
- 定义:四个阶段 初始Inception - 细化Elaboration - 建造Construction - 过渡Transition
- 工作量按照峰值先后:
- Business Modeling
- Requirements
- Analysis
- Design
- Implementation
- Test
- Deployment
- 四阶段过程
- Inception 初始的结束标志
- ends with commitment to go ahead, business case for the project and its feasibility and feature scope identified. 结束标志:继续工程的承诺,项目的商业合同,确定可行性和功能的范围
- Elaboration 细化的结束标志
- Basic architecture of the system in place. 确定了基本架构
- A plan for construction agreed. 制定了施工计划
- All significant risks identified. 识别所有重大风险
- Major risks understood enough not to be too worried. 对重大风险有足够了解
- Construction (iterative) 建造的结束标志
- beta-release of the system. 系统的测试版
- Transition 过渡的结束标志
- the process of introducing the system to its users. 向用户介绍系统
- Inception 初始的结束标志
- RUP的优缺点
- 优点
- Generic process 通用过程
- Separation of phases and workflows 分离阶段与工作流(动态、有目标)
- 缺点
- Overhead 费用高,需要文件和图表Documents & Diagrams
- 优点
1.3. Modern Software Processes - Agile 现代软件过程 - 敏捷开发
- Scrum
- Crystal Clear, Extreme Programming
- Adaptive Software Development, Feature Driven Development
- Dynamic Systems Development Method (DSDM )
- Kanban
- Lean
These are now collectively referred to as Agile Software Development
每两周进行一次循环:计划-需求分析-设计-构造-测试