軟體型態管理. Problems 多人同時更新軟體...

40
軟軟軟軟

Transcript of 軟體型態管理. Problems 多人同時更新軟體...

Page 1: 軟體型態管理. Problems 多人同時更新軟體 多人共用一程式碼,部分程式已更新,但有人不知道 使用版本不一致 發現程式錯誤原因但無法有效通知相關人員.

軟體型態管理

Page 2: 軟體型態管理. Problems 多人同時更新軟體 多人共用一程式碼,部分程式已更新,但有人不知道 使用版本不一致 發現程式錯誤原因但無法有效通知相關人員.

Problems

多人同時更新軟體 多人共用一程式碼,部分程式已更新,但有人不知道 使用版本不一致 發現程式錯誤原因但無法有效通知相關人員

Page 3: 軟體型態管理. Problems 多人同時更新軟體 多人共用一程式碼,部分程式已更新,但有人不知道 使用版本不一致 發現程式錯誤原因但無法有效通知相關人員.

CONFIGURATION MANAGEMENT

Today we talk about Software Configuration Management (SCM for short):- What?- Why?- How?

Page 4: 軟體型態管理. Problems 多人同時更新軟體 多人共用一程式碼,部分程式已更新,但有人不知道 使用版本不一致 發現程式錯誤原因但無法有效通知相關人員.

Introduction

Do you agree? Make a plan and stick with it – never waffle Requirements must be frozen – how else will we know

what to code

Page 5: 軟體型態管理. Problems 多人同時更新軟體 多人共用一程式碼,部分程式已更新,但有人不知道 使用版本不一致 發現程式錯誤原因但無法有效通知相關人員.

Plans are living documents

Plans will be in a continual state of change as project knowledge increases.

Requirements are never frozen.

We need some method of managing the change.

Page 6: 軟體型態管理. Problems 多人同時更新軟體 多人共用一程式碼,部分程式已更新,但有人不知道 使用版本不一致 發現程式錯誤原因但無法有效通知相關人員.

What is configuration?

所謂「型態」是對一個產品實體與功能特徵的描述,實體特徵如 : 產品形狀、大小、重量、使用材料等;功能特徵 : 可靠度、安全性、精確度等。

型態管理是產品在其生命週期中,依據其需求、設計與作業資訊,建立與維持產品表現、功能與實體屬性具一致性的管理程序。

Configuration management Configuration management covers the lifecycle of covers the lifecycle of software developmentsoftware development

Page 7: 軟體型態管理. Problems 多人同時更新軟體 多人共用一程式碼,部分程式已更新,但有人不知道 使用版本不一致 發現程式錯誤原因但無法有效通知相關人員.

WHAT IS SCM? A set of activities designed to control change

by identifying the work products that are likely to change,establishing relationships among them, defining mechanisms for managing different versions of these work products, controlling the changes imposed, and auditing and reporting on the changes made (Roger Pressman)

Page 8: 軟體型態管理. Problems 多人同時更新軟體 多人共用一程式碼,部分程式已更新,但有人不知道 使用版本不一致 發現程式錯誤原因但無法有效通知相關人員.

WHY SCM?

Multiple people are working on changing software More than one version of the software needs to

be supported: Different releases Different installations with different functionalities Development versions

Software needs to run on different operating systems and different hardware

Page 9: 軟體型態管理. Problems 多人同時更新軟體 多人共用一程式碼,部分程式已更新,但有人不知道 使用版本不一致 發現程式錯誤原因但無法有效通知相關人員.

SCM & CMM

SCM is an SEI CMM level 2 KPA Goals:

Software configuration management activities are planned.

Selected software work products are identified, controlled and available.

Changes to identified software work products are controlled

Affected groups and individuals are informed of the status and content of software baselines

Page 10: 軟體型態管理. Problems 多人同時更新軟體 多人共用一程式碼,部分程式已更新,但有人不知道 使用版本不一致 發現程式錯誤原因但無法有效通知相關人員.

SCM Activities CM data management Version management

- Release versions- Development versions

Concurrent development management Change management

Page 11: 軟體型態管理. Problems 多人同時更新軟體 多人共用一程式碼,部分程式已更新,但有人不知道 使用版本不一致 發現程式錯誤原因但無法有效通知相關人員.

Baselines Baseline: A specification or a product, which is

formally reviewed and agreed on, and which can only be changed through formal change procedures

Before an item becomes a baseline, changes can be made quickly and informally.

Baseline is a kind of a milestone in software development

Baseline typically creates new versions in SCIs.

Page 12: 軟體型態管理. Problems 多人同時更新軟體 多人共用一程式碼,部分程式已更新,但有人不知道 使用版本不一致 發現程式錯誤原因但無法有效通知相關人員.

Typical BaselinesPhase Baseline

Feasibility study

Requirements defn. Functional baseline

SRS, Interface spec. Allocated baseline

Detailed design Design baseline

Source and Object code

User manuals

Test documents Product baseline

Installation Operational baseline

Page 13: 軟體型態管理. Problems 多人同時更新軟體 多人共用一程式碼,部分程式已更新,但有人不知道 使用版本不一致 發現程式錯誤原因但無法有效通知相關人員.

Basic Requirements for an SCM System

Identification: 將產品分解至可單獨獲得或管制的項目,以利管制工作的進行。

Control: 透過系統化的程序,管制各型態項目的工程變更。

Auditing: 對型態項目做全盤審核,並確認最終產品滿足原定義之需求。

Status accounting: 有效管理型態項目所必須擁有的產品資訊,並持續記錄型態項目之現況。

Page 14: 軟體型態管理. Problems 多人同時更新軟體 多人共用一程式碼,部分程式已更新,但有人不知道 使用版本不一致 發現程式錯誤原因但無法有效通知相關人員.

Identification

Each software part is labeled so that it can be identified. Furthermore, there will be different versions of the software

Page 15: 軟體型態管理. Problems 多人同時更新軟體 多人共用一程式碼,部分程式已更新,但有人不知道 使用版本不一致 發現程式錯誤原因但無法有效通知相關人員.

SCM Items Design documents Code files Test data Test drivers Manuals System configuration data etc. A meaningful combination of above, meant to be

treated as a single entity Also hardware items can be considered CM Items

Page 16: 軟體型態管理. Problems 多人同時更新軟體 多人共用一程式碼,部分程式已更新,但有人不知道 使用版本不一致 發現程式錯誤原因但無法有效通知相關人員.

Basic SCI information

Item identity Baseline to which it belongs Relationships to other items Version Variant

Page 17: 軟體型態管理. Problems 多人同時更新軟體 多人共用一程式碼,部分程式已更新,但有人不知道 使用版本不一致 發現程式錯誤原因但無法有效通知相關人員.

SCM Terminology

VersionA SW CI having a defined set of functional capabilities.

Revisionschanges to a version to correct only errors in design logic but does not affect documented functional capabilities since none of the requirements have changed.

Variantsa variation of a version developed to run on different types of HW, or to provide slightly different facilities for different users.

Page 18: 軟體型態管理. Problems 多人同時更新軟體 多人共用一程式碼,部分程式已更新,但有人不知道 使用版本不一致 發現程式錯誤原因但無法有效通知相關人員.

Examples

1.1 1.2 1.3 1.4

successive versions

branching versions (variants)

1.1 1.2 1.3 1.4

1.3.1.1 1.3.1.2

Page 19: 軟體型態管理. Problems 多人同時更新軟體 多人共用一程式碼,部分程式已更新,但有人不知道 使用版本不一致 發現程式錯誤原因但無法有效通知相關人員.

Managing SCM Items There may easily be thousands of SCM items A naming scheme should be introduced to identify

these The hierarchical arrangement of software project

items should be supported Should all CM items be managed When to start management for an item?

If you start too early, you get bureaucracy.-> 官僚 If you start too late, you get chaos.

Page 20: 軟體型態管理. Problems 多人同時更新軟體 多人共用一程式碼,部分程式已更新,但有人不知道 使用版本不一致 發現程式錯誤原因但無法有效通知相關人員.

Control

Proposed changes to a SCI are reviewed and, if approved, incorporated into the software configuration.

Page 21: 軟體型態管理. Problems 多人同時更新軟體 多人共用一程式碼,部分程式已更新,但有人不知道 使用版本不一致 發現程式錯誤原因但無法有效通知相關人員.

Version control / 1 Procedures and tools to manage different versions of

configuration objects Versions may not always be created in sequential

order, e.g. you create 1.0 -> 1.1 -> 1.2 -> 2.0 and then you need to create 1.3 for some customers who can not run 2.0 but need some changes or improvements.

Page 22: 軟體型態管理. Problems 多人同時更新軟體 多人共用一程式碼,部分程式已更新,但有人不知道 使用版本不一致 發現程式錯誤原因但無法有效通知相關人員.

Version control / 2

With big software, you may e.g have 4.0 as the official current version. You work on 5.0 to release it as the next official version, but you have already started to create 6.0, as it takes so long to get it ready.

Page 23: 軟體型態管理. Problems 多人同時更新軟體 多人共用一程式碼,部分程式已更新,但有人不知道 使用版本不一致 發現程式錯誤原因但無法有效通知相關人員.

如何確保文件的版本一致 ? 也許你可以指派一位專人負責管理文件的進出,這個人姑且就叫他

Manager 好了, Manager 待在一間小小的辦公室裡,負責文件庫的維護和文件的進出。當小組成員 Eric 要修改文件時,就拿磁片到這個窗口請 Manager 複製一份給他, Manager 在複製的同時會記下來:這份文件正由 Eric 修改;而 Eric 則會把磁片拿到他自己的機器上,把檔案複製到他的工作目錄( working folder),然後進行修改。等到 Eric 修改完畢,再從工作目錄中把檔案複製到磁片上交給 Manager,最後文件就被更新到文件庫中(這動作叫做 check in),至此整個文件的修改與更新的程序就完成了。如果在 Eric 修改期間, Vivid 也拿著磁片向 Manager 要求修改同一份文件,這時 Manager 會告訴 Vivid:這份文件目前已經由 Eric 領出( check out),且還在修改當中,你得等他改完才行。

Page 24: 軟體型態管理. Problems 多人同時更新軟體 多人共用一程式碼,部分程式已更新,但有人不知道 使用版本不一致 發現程式錯誤原因但無法有效通知相關人員.

Change Control

專案開始進行

建立或更新基準線

驗證基準線 授權更改 進行更改 驗證更改結果

核准更改

基準線

需求 /設計 /使用

變更

Page 25: 軟體型態管理. Problems 多人同時更新軟體 多人共用一程式碼,部分程式已更新,但有人不知道 使用版本不一致 發現程式錯誤原因但無法有效通知相關人員.

Change Control / 11. Need for change is recognised

2. Someone (like a user) makes a change request

3. Developer evaluates

4. Change report is generated

5. Change control authority decides- Change is denied -> User is informed- Change is accepted -> go to next slide :)

Page 26: 軟體型態管理. Problems 多人同時更新軟體 多人共用一程式碼,部分程式已更新,但有人不知道 使用版本不一致 發現程式錯誤原因但無法有效通知相關人員.

Change Control / 26. Change request is queued for action and engineering

change order (technical descr) is made

7. Assign individuals to make changes to configuration objects

8. ”Check out” configuration items from project repository

9. Make the change

10. Review (audit) the change

11. ”Check in” the changed configuration items

Page 27: 軟體型態管理. Problems 多人同時更新軟體 多人共用一程式碼,部分程式已更新,但有人不知道 使用版本不一致 發現程式錯誤原因但無法有效通知相關人員.

Change Control / 312. Establish a baseline for testing the change

13. Perform quality assurance (QA) and testing activities

14. ”Promote” changes for inclusion in next release

15. Rebuild appropriate version of software

16. Review (audit) the change to all configuration items

17. Include changes in new version

18. Distribute the new version

Page 28: 軟體型態管理. Problems 多人同時更新軟體 多人共用一程式碼,部分程式已更新,但有人不知道 使用版本不一致 發現程式錯誤原因但無法有效通知相關人員.

Techniques for storing Versions

Forward Delta files Reverse Delta files

Note : The set of differences between two versions is called a delta.

Page 29: 軟體型態管理. Problems 多人同時更新軟體 多人共用一程式碼,部分程式已更新,但有人不知道 使用版本不一致 發現程式錯誤原因但無法有效通知相關人員.

Forward Delta Files

foward delta files

+ firstversion

Vnversion

Vnversion

User

Vn+1version

Vn+1version

Vnversion

CM System

changes

Page 30: 軟體型態管理. Problems 多人同時更新軟體 多人共用一程式碼,部分程式已更新,但有人不知道 使用版本不一致 發現程式錯誤原因但無法有效通知相關人員.

Reverse Delta Files

reverse delta files

+Vn+1

new recentversion

Vn+1version

User

Vnversion

Vnversion

CM System

changes

recent version

Page 31: 軟體型態管理. Problems 多人同時更新軟體 多人共用一程式碼,部分程式已更新,但有人不知道 使用版本不一致 發現程式錯誤原因但無法有效通知相關人員.

Configuration Audit

A configuration audit establishes that product integrity has been maintained and that changes have taken place in an orderly and controlled manner.

Audit of the SW product Audit of SCM activities

Page 32: 軟體型態管理. Problems 多人同時更新軟體 多人共用一程式碼,部分程式已更新,但有人不知道 使用版本不一致 發現程式錯誤原因但無法有效通知相關人員.

Physical Configuration Audit

consists of determining that all items identified as being part of the configuration are present in the Product baseline

it must also establish that the correct version and revision of each part are included in the product baseline and that they correspond to information contained in the baseline’s configuration status report.

Page 33: 軟體型態管理. Problems 多人同時更新軟體 多人共用一程式碼,部分程式已更新,但有人不知道 使用版本不一致 發現程式錯誤原因但無法有效通知相關人員.

Functional Configuration Audit

it verifies that each CI in the product has been tested to determine that it satisfies the functions defined in the specifications or contract(s) for which it was developed.

Page 34: 軟體型態管理. Problems 多人同時更新軟體 多人共用一程式碼,部分程式已更新,但有人不知道 使用版本不一致 發現程式錯誤原因但無法有效通知相關人員.

SCM Audit / 1

The following questions should be answered

1. Has the change specified in the ECO been made? Have any additional modifications been incorporated?

2. Has formal technical review been conducted to assess technical correctness?

3. Has the software process been followed and SE standards been applied?

4. Has the change been appropriately recorded in the SCIs?

Page 35: 軟體型態管理. Problems 多人同時更新軟體 多人共用一程式碼,部分程式已更新,但有人不知道 使用版本不一致 發現程式錯誤原因但無法有效通知相關人員.

SCM Audit / 2

More questions to be answered:

5. Have Software Configuration Management procedures for the change been followed?

6. Have all related SCIs been properly updated?

Page 36: 軟體型態管理. Problems 多人同時更新軟體 多人共用一程式碼,部分程式已更新,但有人不知道 使用版本不一致 發現程式錯誤原因但無法有效通知相關人員.

Status Accounting

Reports and documentation produced by the status accounting function

They are the auditable entries The accounting provides the historic information

to determine both what happened and when on the software project

Page 37: 軟體型態管理. Problems 多人同時更新軟體 多人共用一程式碼,部分程式已更新,但有人不知道 使用版本不一致 發現程式錯誤原因但無法有效通知相關人員.

SCM Tools

PC based PVCS MS Visual SourceSafe

允許多人同時取出( check out)同一個檔案進行修改,並且在將檔案送回( check in)資料庫時,自動進行合併( merge), 但只有文字檔( text files)才能夠多重 checkouts

UNIX SCCS (Source Code Control System) RCS (Revision Control System) CVS (http://www.nongnu.org/cvs/)

Page 38: 軟體型態管理. Problems 多人同時更新軟體 多人共用一程式碼,部分程式已更新,但有人不知道 使用版本不一致 發現程式錯誤原因但無法有效通知相關人員.

Software Configuration Management Plan

IEEE 828 Software Configuration Management Plan IEEE 1042 Software Configuration Management ISO10007 是國際標準組織針對 ISO90001 所提出之一個子條款,內容主要規範企業對其產品制訂標準之型態管理程序,以利產品在其生命週期中之資料管理。

Page 39: 軟體型態管理. Problems 多人同時更新軟體 多人共用一程式碼,部分程式已更新,但有人不知道 使用版本不一致 發現程式錯誤原因但無法有效通知相關人員.

Software Configuration Management Plan

The SCM Plan is prepared in Project Initiation phase. It documents

- what SCM activities are to be done

- how they are to be done - who is responsible for doing specific activities

- when they are to happen

- what resources are required

Page 40: 軟體型態管理. Problems 多人同時更新軟體 多人共用一程式碼,部分程式已更新,但有人不知道 使用版本不一致 發現程式錯誤原因但無法有效通知相關人員.

IEEE Standard 828 for SCM PlanIntroduction: Describes the Plan’s purpose, scope of application, key terms, and referencesSCM management: (Who?) Identifies the responsibilities and authorities for accomplishing the planned activitiesSCM activities: (What?) Identifies all activities to be performed in applying to the projectSCM schedules: (When?) Identifies the required coordination of SCM activities with the other activities in the projectSCM resources: (How?) Identifies tools and physical and human resources required for execution of the PlanSCM plan maintenance: Identifies how the Plan will be kept current while in effect