Lecture 02 SW Lifecycle
Lecture 02 SW Lifecycle
Lecture 02 SW Lifecycle
Lecture 2
Software Lifecycle Models
Reading:
Ian Summerville, Software Engineering (Chapter 2) Must
Read
Lecture outline
• Software process
• The software lifecycle
– evaluating models
• Lifecycle models
– code-and-fix
– waterfall
– spiral
– evolutionary prototyping
– staged delivery
– design-to-schedule
2
• A software process is a set of related activities that
leads to the production of a software product.
• There are many different software processes but all
must include four activities that are fundamental to
software engineering:
1. Software specification: The functionality of the
software and constraints on its operation must be
defined.
2. Software design and implementation: The
software to meet the specification must be produced.
3. Software validation: The software must be
validated to ensure that it does what the customer
wants.
4. Software evolution: The software must evolve to 3
Verification: are we building the product right?
Validation: are we building the right product?
4
software engineering
objectives
1. optimality
2. scalability.
5
Software process xics
• Functionality: the degree of performance of the
software against its intended purpose.
Required functions are:
suitability
Accuracy
Interoperability
Compliance
Security
6
• Reliability:
A set of attributes that bears on the capability of
software to maintain its level of performance under the
given condition for a stated period of time.
Required functions are
recoverability
Fault tolerance
maturity
7
• Efficiency:
It refers to the ability of the software to use system
resources in the most effective and efficient manner.
• The software should make effective use of storage
space and executive command as per desired timing
requirements.
Required functions are:
efficiency In time
In resource
8
• Usability: to the extent to which the software can be
used with ease.
• The amount of effort or time required to learn how to
use the software.
Required functions are:
Understandability
Learnability
Operability
9
• Maintainability:
It refers to the ease with which the modifications can
be made in a software system to extend its
functionality, improve its performance, or correct
errors.
• Required functions are:
Testability
Stability
Changeability
10
• Portability:
A set of attributes that bears on the ability of software
to be transferred from one environment to another,
without or minimum changes.
Required functions are:
Adaptability
Install ability
Replace ability
11
Big questions
• What is a software lifecycle model? When and why
should we use such models?
12
The "Software Lifecycle"
• software lifecycle: The entire process of creating a
software product from an initial concept until the last
user stops using it.
– often divided into "phases":
• Requirements – what does the customer want
• Design – Describe how a solution that meets the
requirements
• Implementation – Convert the design (description) into code
• Testing – Make sure the code meets the requirements
• Maintenance – Fix problems while operating
• other possibilities: Risk Assessment, Prototyping
– … many more
14
Life without software
process
• Advantages:
– nothing to learn or plan!
– work on whatever is interesting, ignore
the rest.
• Disadvantages:
– may ignore some important tasks (testing, design)
– not clear when to start or stop doing each task
– scales poorly to multiple people
– hard to review or evaluate one's work
– code may not match user's needs (no requirements!)
– code was not planned for modification, not flexible
15
Software process models
• Drawbacks?
– No way to asses progress, quality, or risks
– Unlikely to accommodate changes without a major design
Examine
– Unclear delivery features (scope),
timing, and support
18
Waterfall
• The first published model of the software development
process
• derived from more general engineering processes
• Perform each phase in order
19
1. Requirements analysis and definition
• The system’s services, constraints, and goals are
established by consultation with system users.
• They are then defined in detail and serve as a system
specification.
2. System and software design
• The systems design process allocates the requirements
to either hardware or software systems by establishing
an overall system architecture.
20
3. Implementation and unit testing
• During this stage, the software design is realized as a
set of programs or program units.
• Unit testing involves verifying that each unit meets its
specification.
4. Integration and system testing
• The individual program units or programs are
integrated and tested as a complete system to
ensure that the software requirements have been
met. 21
5. Operation and maintenance
• involves correcting errors which were not discovered in
earlier
stages of the life cycle.
In waterfall
• The following phase should not start until the previous
phase has finished.
• In practice, these stages overlap and feed information
to each other.
• During design, problems with requirements are
identified. During coding, design problems are found
and so on. 22
Waterfall model
advantages
• Suitable for projects that are very well understood but
complex
– Tackles all planning upfront
– The ideal of no midstream changes equates to an efficient
software development process
23
Drawbacks of waterfall
req. change
requirements
verify
design
verify
implement
test
operations
• drawbacks?
retirement
– assumes requirements will be clear and well-understood
• requires a lot of planning up front (not always easy)
– rigid, linear; not adaptable to change in the product
• costly to go back to a previous phase
– nothing to show until almost done
24
Spiral
Barry Boehm, USC
• steps taken at each loop:
– determine objectives
and constraints
– identify risks
– evaluate options to
resolve risks
– develop and verify
deliverables
• benefits?
– provides early indication of unforeseen problems
– always addresses the biggest risk first
– accommodates changes, growth
– eliminates errors and unattractive choices early
25
Drawbacks of spiral
Barry Boehm, USC
• steps taken at each loop:
– determine objectives
and constraints
– identify risks
– evaluate options to
resolve risks
– develop and verify
deliverables
• drawbacks?
– relies on developers to have risk-assessment expertise
– perhaps over-focuses on risk and "putting out fires"; other
features may go ignored because they are not "risky"
enough
– complex; how do you actually follow this?
26
–
comparison
27
Evolutionary prototyping
• Develop a skeleton system and evolve it for delivery
Refine
Design and
Initial concept prototype until Complete and
implement
acceptable release
initial
prototype prototype
28
Evolutionary prototyping
for each build:
requirements arch. design operations
detailed design,
implement,
verify verify test, deliver
retirement
• benefits?
– produces steady signs of progress, builds customer
confidence
– useful when requirements are not well known or change
rapidly
– customer involvement ("What do you think of this
version?") 29
Drawbacks of
evolutionary
for each build:
requirements arch. design operations
detailed design,
implement,
verify verify test, deliver
retirement
• drawbacks?
– assumes user's initial spec will be flexible
– Problems with planning
• unclear how much iteration/time will be needed to finish
• feature creep
– fails for separate pieces that must then be integrated
– temporary fixes become permanent constraints
30
Staged delivery
waterfall-like beginnings, then
Requirements develop in short stages
plan, design, execute, test, release
– can ship at any time at the end of
any cycle
Design
33
Embracing or fighting
timelines
• Fit-to-schedule
– “We will ship on a certain date and cut until it fits”
– useful when you absolutely need to ship by a certain date
– similar to the staged delivery model
• but less flexible because of the fixed shipping date
– requires careful prioritization of features and risks to
address
– not recommended
• Fit-to-features/quality
– “We’ll ship the product when it is ready”
– Trade predictable schedules for quality control
34
Why are there so many
models?
• The choice of a model depends on the project
circumstances and requirements.
35
What’s the best model?
• Consider
– The task at hand
– Risk management
– Quality / cost control
– Predictability
– Visibility of progress
– Customer involvement and feedback
38
Software process metrics
Software Measurement Size-Oriented Metrics(PL
dependent)
• Errors per KLOC (thousand lines of code).
• Defects per KLOC.
• per LOC.
• Page of documentation per KLOC.
In addition, other interesting metrics can be
computed
• Errors per person-month.
• LOC per person-month.
• per page of documentation.
39
Function oriented metrics(programming language
independent)
• Does the system require reliable backup and recovery?
• number of user inputs
• number of user outputs
• Measures of errors uncovered before release
• Defects delivered to and reported by end users
40