1 software configuration management (scm) and software reuse presented by: edmund leng (ht052446j)...

24
1 Software Configuration Management (SCM) and Software Reuse Presented By: Edmund Leng (HT052446J) Choo Zhi Min (HT052430X)

Upload: marian-kelley

Post on 03-Jan-2016

223 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1 Software Configuration Management (SCM) and Software Reuse Presented By: Edmund Leng (HT052446J) Choo Zhi Min (HT052430X)

1

Software Configuration

Management (SCM) and Software Reuse

Presented By:

Edmund Leng (HT052446J)

Choo Zhi Min (HT052430X)

Page 2: 1 Software Configuration Management (SCM) and Software Reuse Presented By: Edmund Leng (HT052446J) Choo Zhi Min (HT052430X)

2

Agenda

What is Software Configuration Management (SCM)?

What is the relationship between SCM and Software Reuse?

How has Software Reuse complicates the configuration management process?

Can SCM promotes Software Reuse?

Page 3: 1 Software Configuration Management (SCM) and Software Reuse Presented By: Edmund Leng (HT052446J) Choo Zhi Min (HT052430X)

3

Software Configuration Management Software Configuration Management:

the discipline of identifying the configuration of a system at distinct points in time for the purpose of systematically controlling changes to the configuration and maintaining the integrity and traceability of the configuration throughout the system life cycle

Source: IEEE, SWEBOK (Ber97)

Page 4: 1 Software Configuration Management (SCM) and Software Reuse Presented By: Edmund Leng (HT052446J) Choo Zhi Min (HT052430X)

4

Goals of SCM The goals of SCM are generally:

Configuration identification - What code are we working with? Configuration control - Controlling the release of a product and

its changes. Status accounting - Recording and reporting the status of

components. Review - Ensuring completeness and consistency among

components. Build management - Managing the process and tools used for

builds. Process management - Ensuring adherence to the

organization's development process. Environment management - Managing the software and

hardware that host our system. Teamwork - Facilitate team interactions related to the process. Defect tracking - Making sure every defect has traceability back

to the source

Page 5: 1 Software Configuration Management (SCM) and Software Reuse Presented By: Edmund Leng (HT052446J) Choo Zhi Min (HT052430X)

5

SCM Essentially, SCM helps several developers who

are working on the same code base to collaborate, minimizing the risk of them stumbling over each other

Items that are placed under configuration control: Requirement Specification Project Plan Design Specifications Test Plan and Test Cases Source Codes User Documentations Data Dictionaries Quality Plan

Page 6: 1 Software Configuration Management (SCM) and Software Reuse Presented By: Edmund Leng (HT052446J) Choo Zhi Min (HT052430X)

6

Version Control in Action

Page 7: 1 Software Configuration Management (SCM) and Software Reuse Presented By: Edmund Leng (HT052446J) Choo Zhi Min (HT052430X)

7

Version Control in Action

Page 8: 1 Software Configuration Management (SCM) and Software Reuse Presented By: Edmund Leng (HT052446J) Choo Zhi Min (HT052430X)

8

Version Control

Version Control is the most essential part of the SCM With Version Control, software developers are able to

work simultaneously on updates Implicit in this control was the ability to return to any

earlier state of the design It is extremely common for multiple versions of the

same software to be deployed in different sites At the simplest level, developers could simply retain

multiple copies of the different versions of the program, and number them appropriately

Page 9: 1 Software Configuration Management (SCM) and Software Reuse Presented By: Edmund Leng (HT052446J) Choo Zhi Min (HT052430X)

9

History Model

Changeset: A specific collection of changes with a unique name

Different version control tools manage changes in the repository differently

Subversion manages versioned trees as first order objects (the repository is an array of trees) and the changesets are things that are derived (by comparing adjacent trees

Arch or Bitkeeper are designed to manage changesets as first order objects (the repository is a bag of patches), and trees are derived by composing sets of patches together

Page 10: 1 Software Configuration Management (SCM) and Software Reuse Presented By: Edmund Leng (HT052446J) Choo Zhi Min (HT052430X)

10

Branching and Merging

Branching, tagging, and merging are concepts common to almost all version control systems

A branch is a line of development that exists independently of another line

Branching allows you to work on a complex changes without interfering with the stability of the trunk, feature branch or release branch

Merging enables you to compare the differences between 2 branches and apply the differences to your working copy

Page 11: 1 Software Configuration Management (SCM) and Software Reuse Presented By: Edmund Leng (HT052446J) Choo Zhi Min (HT052430X)

11

Software Reuse

Benefits of Software Reuse: Abstracts the user away from the inherent

complexities of software Provides better quality software by reusing a

component that are tested and verified Shorter time-to-market

Because of the benefits that Software Reuse brings, reuse is not ad hoc or by chance but integrated into the SDLC=> SCM can be used to support Software Reuse

Page 12: 1 Software Configuration Management (SCM) and Software Reuse Presented By: Edmund Leng (HT052446J) Choo Zhi Min (HT052430X)

12

Problem in Software Reuse? 2 philosophies exist on how to manage the idea of

software reuse: Provide the software, along with any required dependencies in

one monolithic package. Used by most Microsoft Windows application

Provide smaller single purpose package that requires the dependent packages are already installed. Used by most developers of Linux and UNIX packages today

The 2nd approach is more conducive for the reuse of code but pose its own set of problems: Dependency Management Example: A basic Mozilla application consists of 495 files

scattered through 10 different directories. When upgrading, a user must replace all these files. To operate, Mozilla requires 50 other executables and libraries (many of which, in turn, require still other libraries)

Page 13: 1 Software Configuration Management (SCM) and Software Reuse Presented By: Edmund Leng (HT052446J) Choo Zhi Min (HT052430X)

13

Build Management Manual management of the software

dependencies is not possible Automated environment for builds are a common

feature of software development Build Automation not only manage software

dependencies, but also automate activities like packaging binary code, running tests and deployment

A number build automation software are available: GNU Automake Apache Ant Apache Maven MSBuild Ruby Rake

Page 14: 1 Software Configuration Management (SCM) and Software Reuse Presented By: Edmund Leng (HT052446J) Choo Zhi Min (HT052430X)

14

Continuous Integration

Material will be from http://www.infoq.com/articles/agile-version-control and http://martinfowler.com/articles/continuousIntegration.html

Page 15: 1 Software Configuration Management (SCM) and Software Reuse Presented By: Edmund Leng (HT052446J) Choo Zhi Min (HT052430X)

15

Subversion (SVN) introduction (1)

A free/open-source version control system. Version 1 released in 2004. Now in version 1.4x.

Manages files and directories, and the changes made to them, over time.

Recover older versions of your data, or examine the history of how your data changed.

“time machine” Can be used to manage any collection of files. Flexible enough to be used as software configuration

management (SCM) systems.

Page 16: 1 Software Configuration Management (SCM) and Software Reuse Presented By: Edmund Leng (HT052446J) Choo Zhi Min (HT052430X)

16

Subversion (SVN) introduction (2)

We will look at:RevisionChangesetsExternals DefinitionsHow do Changesets and Externals Definitions

help in reuse?

Page 17: 1 Software Configuration Management (SCM) and Software Reuse Presented By: Edmund Leng (HT052446J) Choo Zhi Min (HT052430X)

17

Revision (1)

Commit treats changes to any number of files and directories as a single atomic transaction.

You can create, delete, rename, and copy files and directories; then commit a complete set of changes as an atomic transaction.

This creates a new state of the filesystem tree, called a revision.

Revision is a unique natural number, incremented by 1 for each commit.

Page 18: 1 Software Configuration Management (SCM) and Software Reuse Presented By: Edmund Leng (HT052446J) Choo Zhi Min (HT052430X)

18

Revision (2) Revision numbers apply to entire trees, not individual

files. Revision N represents the state of the repository

filesystem after the Nth commit.

Page 19: 1 Software Configuration Management (SCM) and Software Reuse Presented By: Edmund Leng (HT052446J) Choo Zhi Min (HT052430X)

19

Changesets

In SVN, a changeset is a collection of changes with a unique name -- textual edits to file contents, modifications to tree structure, or tweaks to metadata.

So, revision N as not just a tree, but a changeset as well. Read the commit history (svn log -r 9238) to read

about the exact changeset that fixed the bug Run svn diff to the patch itself. Run svn merge to merge specific changesets from one

branch to another .  See the previous figure on revision

Page 20: 1 Software Configuration Management (SCM) and Software Reuse Presented By: Edmund Leng (HT052446J) Choo Zhi Min (HT052430X)

20

Externals definitions (1) If we want different subdirectories in a checkout to come

from different locations in a repository

Page 21: 1 Software Configuration Management (SCM) and Software Reuse Presented By: Edmund Leng (HT052446J) Choo Zhi Min (HT052430X)

21

Externals definitions (2)

An externals definition is a mapping of a local directory to the URL—and ideally a particular revision—of a versioned directory.

Declare externals definitions in groups using the svn:externals property. Example:

third-party/sounds         http://sounds.red-bean.com/repos third-party/skins          http://skins.red-bean.com/repositories/skinproj

third-party/skins/toolkit -r21 http://svn.red-bean.com/repos/skin-maker

svn update and commit command will take effect directly on the target external directories.

Page 22: 1 Software Configuration Management (SCM) and Software Reuse Presented By: Edmund Leng (HT052446J) Choo Zhi Min (HT052430X)

22

Applying externals definitions - an example from Plone Plone (www.plone.org) is a ready-to-run content

management system that is built on the Zope application server, written in Python.

Group a release in a “bundle” folder. Each bundle folder is nothing but a empty folder with externals definitions that point to components to assemble the release. Example: http://dev.plone.org/plone/browser/bundles/3.1 http://dev.plone.org/plone/browser/bundles/2.5 Components: PloneLanguageTool and kupu

Page 23: 1 Software Configuration Management (SCM) and Software Reuse Presented By: Edmund Leng (HT052446J) Choo Zhi Min (HT052430X)

23

Applying changesets – a proposal for FRS To achieve feature extraction and reuse. For FRS date, user, pay, BR: branch each

feature except BR. Branch BR from pay and merge as pay-BR at revision N. So BR can be extracted at changeset N.

Draw scm patternthird-party/sounds         http://sounds.red-bean.com/repos third-party/skins          http://skins.red-bean.com/repositories/skinprojthird-party/skins/toolkit -r21 http://svn.red-bean.com/repos/skin-maker

Page 24: 1 Software Configuration Management (SCM) and Software Reuse Presented By: Edmund Leng (HT052446J) Choo Zhi Min (HT052430X)

24

Thank you

Q&A