soft3280-SlidesWeek05-SWEngIntro

advertisement
Software Engineering
Part1 - Introduction
2007/2008
SOFT3280
Slide 1
Software Engineering – Part 1
•
•
•
•
•
State what is meant by the term software engineering?
Describe the software process or lifecycle
Explain the importance of Software Development
List the attributes of well designed software
Describe the following Software Development process
models:
–
–
–
–
–
Waterfall
Evolutionary or iterative development
Prototyping
Extreme programming
Spiral
2007/2008
SOFT3280
Slide 2
Problems with Software
• Developing software for large-scale systems is much more difficult
than development for smaller projects:
– Complexity
the more complex a task the more likely errors will be introduced.
Modularisation of a large, complex task into smaller sub-tasks can
reduce the overall complexity
– Size:
as the size of a project increases, the number of individuals involved
increases leading to increased communicational complexity and thus
higher probability of errors occurring. This requires a clear medium of
communication that is reliable and complete.
– Timescales:
Quality of software versus cost of lateness
– Cost:
software is now the predominant factor in computer system cost, far
exceeding hardware cost.
– Management:
Good project planning vital to development of quality software on time.
2007/2008
SOFT3280
Slide 3
Case Study from Sommerville
Therac-25
• Linear accelerators create high- energy beams that can
destroy tumors with minimal impact on the surrounding
healthy tissue
• Therac 25 was the first linear accelerator with dosage
controlled solely by software (as opposed to hardware)
2007/2008
SOFT3280
Ref: sommerville
Slide 4
1983: Pre-release Safety Analysis
• Programming errors have been reduced by extensive
testing on a hardware simulator and under field conditions
on teletherapy units. Any residual software errors are not
included in the analysis.
• Program software does not degrade due to wear, fatigue,
or reproduction process.
• Computer execution errors are caused by faulty hardware
components and by "soft" (random) errors induced by
alpha particles and electromagnetic noise.
2007/2008
SOFT3280
Ref: sommerville
Slide 5
and then …
• 1983: First Therac 25 installed
• 1985-1987: Six massive-overdose accidents due to
“software error” are reported. Overdoses caused severe
burns and death.
• 1987: Recalled for extensive design changes, including
hardware to safeguard against software errors in dosage.
2007/2008
SOFT3280
Ref: sommerville
Slide 6
US Federal Aviation Administration
• 1981: FAA announced plans to modernize air-traffic control.
• 1985: IBM awarded contract. System estimate to have 1.5 million
lines of code, cost $2.5 billion, and be deployed by 1991.
• 1987: Revised cost $4.3 billion, deployment slipped to 1995.
• 1994: FAA decided that the project would never be completed, and
cancelled it. Net loss $1.5 billion
• Main issue causing project delay and cost growth was the lack of
coordination between the FAA and air traffic controllers and service
technicians during the early stages of development - led to design
that could significantly impact the controllers’ ability to control aircraft.
2007/2008
SOFT3280
Ref: sommerville
Slide 7
Stats on software projects
•
•
•
•
31.1% are cancelled before they are finished
52.7% overrun their cost estimates by at least 189%
33.3% overrun their time estimates by 100%-200%
94% of all projects do a “restart”
J. Johnson, “Creating Chaos,” American Programmer, July 1995
2007/2008
SOFT3280
Ref: sommerville
Slide 8
So why do projects fail
•
•
•
•
•
Unrealistic Schedules
Inappropriate Staffing
Changing Requirements During Development
Poor-Quality Work
Believing in Magic
2007/2008
SOFT3280
Ref: sommerville
Slide 9
What is Software Engineering?
“Software engineering is concerned with
theories, methods and tools for the
systematic production and maintenance of
software products that are developed and
maintained on time and within cost
estimates.”
2007/2008
SOFT3280
Ref: sommerville
Slide 10
Software Engineering
• A systematic approach to the development of medium to large-scale
software systems, usually involving teams of programmers.
– Good software development techniques required to minimise
programming errors and localise the scope of errors.
– The development of the documentation necessary to install, use, develop
and maintain the programs is crucial;
– Cost-effective software development
• A technological and a managerial discipline.
• Aims to reduce cost of software development by
–
–
–
–
–
Placing greater emphasis on systematic development
Finding out the user’s requirements
Specifying the system requirements in some formal/semi-formal way
Producing prototypes
Trying to ensure error free code
2007/2008
SOFT3280
Slide 11
Software Cost!
• Bear in mind that ;
– it is 100 times more expensive to redesign a problem
after delivery of the product than to identify the user’s
requirements correctly at the start of the design,
– maintenance costs are typically twice the
development,
– about 15% of development costs are in coding –
software is more than CODE.
– and it is obvious that effort spent in a systematic
approach (i.e. engineering) from the start of a project
will not be wasted.
2007/2008
SOFT3280
Slide 12
Aim of software engineering
The aim is to develop software which is:
• RELIABLE
– Software should perform as expected by the user. This is particularly
important in safety or life-critical areas such as Avionics, chemical plant,
medical systems.
• MAINTAINABLE
– Software should be written so that changes can be made without undue
cost.
• EFFICIENT
– Software should not make wasteful use of system resources.
• USABLE
– Software should have an appropriate user interface. For example, ease
of use, ease of learning, presentation, attractive.
• SECURE
– This includes confidentiality and access rights.
2007/2008
SOFT3280
Slide 13
What is a Software Process/Software LifeCycle?
• A set of activities whose goal is the development or
evolution of software.
• Generic activities in all software processes are:
–
–
–
–
–
Requirement specification/analysis
Design
Implementation
Testing
Evolution
2007/2008
SOFT3280
Slide 14
Life Cycle Model
• Several different activities may be carried out in each life
cycle phase.
• Entry and exit criteria defined for every phase.
• A phase can start only if its phase-entry criteria have
been satisfied.
• A phase is considered to be complete only when all its
exit criteria are satisfied.
2007/2008
SOFT3280
Slide 15
Software Development Lifecycle Models
• There are a number of models for software
development lifecycle, for example:
– Build and fix model
– Classic Waterfall Model
– Incremental model
– Spiral model
– Rapid prototyping
– Extreme Programming
2007/2008
SOFT3280
Slide 16
Build and fix model
• “trial and error”
approach
• adequate for simple
software programs
• unacceptable for
large and
complex systems
Build 1st
version
Modify until
customer is
satisfied
Use
2007/2008
SOFT3280
Slide 17
Waterfall Model
Requirement
Analysis
User Requirement
Documentation
Specification
Software Specification
Documentation
Quality
Assurance
Design
Design Documentation
Implementation
Programs
Maintenance
Revised Programs
2007/2008
SOFT3280
Slide 18
Waterfall Model
• Advantages:
– Organised approach, provides robust separation of phases
– Reflects common engineering practice
• Disadvantages:
– Doesn’t cope well with changes required by the client
– Development teams might wait for each other
– A working version of the product is available only late
• Applicability:
– When requirements are well known and few changes are likely to
be needed
– Can be used also for parts of larger software systems
2007/2008
SOFT3280
Slide 19
Process Iteration
• System requirements ALWAYS
evolve in the course of a
project so process iteration
where earlier stages are
reworked is always part of the
process for large systems.
• Iteration can be applied to any
of the generic process models.
2007/2008
SOFT3280
Slide 20
Iterative Development
• Waterfall model breaks down a project based on activities:
– requirement analysis, design, coding and testing.
• Iterative development breaks down a project by subsets of
functionality.
• Overall lifecycle composed of several iterations
– each iteration a self-contained mini-project composed of activities such
as requirement analysis, design, coding and testing.
• Iteration Release
– At the end of each iteration
– a stable integrated and tested system with a subset of the final
functionality completed.
– provide a baseline for the developer
– usually not released to the customer until the final iteration.
2007/2008
SOFT3280
Slide 21
Iterative Development Approaches
Evolutionary
Incremental
Spiral
2007/2008
SOFT3280
Slide 22
Evolutionary development
• Main characteristics:
– The phases of the software construction are interleaved
– Feedback from the user is used throughout the entire process
– The software product is refined through many versions
Concurrent
activities
Specification
Outline
description
Development
Validation
2007/2008
SOFT3280
Initial
version
Intermediate
versions
Final
version
Slide 23
Evolutionary development
• Exploratory development
– Objective is to work with customers and to evolve a final system
from an initial outline specification. Should start with wellunderstood requirements and add new features as proposed by
the customer.
• Throw-away prototyping
– Objective is to understand the system requirements. Should start
with poorly understood requirements to clarify what is really
needed.
2007/2008
SOFT3280
Slide 24
Evolutionary development
• Advantages:
– Deals constantly with changes
– Provides quickly an initial version of the system
– Customer input throughout development yields system closer to their
(immediate) needs
• Problems
– Lack of process visibility, not well-supported by documentation;
– System’s structure can be corrupted by continuous change;
– Special skills (e.g. in languages for rapid prototyping) may be required.
• Applicability
– For small or medium-size interactive systems;
– For parts of large systems (e.g. the user interface);
– For short-lifetime systems.
2007/2008
SOFT3280
Slide 25
Incremental delivery
•
•
•
Rather than deliver the system as a single delivery, the development and
delivery is broken down into increments with each increment delivering part
of the required functionality.
User requirements are prioritised and the highest priority requirements are
included in early increments.
Once the development of an increment is started, the requirements are
frozen though requirements for later increments can continue to evolve.
Define Outline
requirements
Develop System
Increment
Assign Requirements
to Increments
Validate
Increment
Design System
Architecture
Integrate
Increment
Validate
System
Final
System
System incomplete
2007/2008
SOFT3280
Slide 26
Incremental delivery advantages
• Customer value can be delivered with each increment so
system functionality is available earlier;
– e.g. ATM 1)withdraw cash 2)lodge cash 3)show balance 4)print
statement 5)change PIN number 6)Top-up mobile phone
• Early increments act as a prototype to help elicit
requirements for later increments.
• Lower risk of overall project failure.
• The highest priority system services tend to receive the
most testing.
2007/2008
SOFT3280
Slide 27
Spiral development
•
Determine
objectives
Risk
Analysis
Customer
review
•
•
•
Plan next
phase
Engineering/
Development
•
•
2007/2008
SOFT3280
Combines features of the rapid
prototyping and waterfall models.
Process is represented as a spiral
rather than as a sequence of activities
with backtracking.
The project starts at the centre of the
spiral and builds progressively more
complete version of the software as the
spiral expands outwards.
Each loop in the spiral represents a
phase in the process and is split into 4
sectors.
No fixed phases such as specification
or design - loops in the spiral are
chosen depending on what is required.
Risks are explicitly assessed and
resolved throughout the process
leading to a risk based development
model.
Slide 28
Spiral model of the software process
Risk
Analysis
Determine objectives
alternatives and
constraints
Evaluate alternatives ,
identify , resolve risks
Risk
Analysis
Operational
Prototype
Risk
Analysis
Prototype
3
Prototype
2
Risk
Analysis
Prototype 1
Requirements plan Concept
Life-cycle plan
of
SW
operationrequirements Product
design
REVIEW
Development plan
Requirement
validation
Detailed
design
Code
Unit test
Plan next phase
Integration
and test plan
Design validation
and verification
Integration
test
Acceptance
Delvelop, verify
test
next-level product
Service
2007/2008
SOFT3280
Slide 29
Spiral model sectors
• Objective setting
– Specific objectives for the phase are identified.
• Risk assessment and reduction
– Risks are assessed and activities put in place to reduce the key
risks.
• Development and validation
– A development model for the system is chosen which can be any
of the generic models.
• Planning
– The project is reviewed and the next phase of the spiral is
planned.
2007/2008
SOFT3280
Slide 30
Spiral model features
• Advantages:
– Risk reduction mechanisms are in place
– Supports iteration and reflects real-world practices
– Systematic approach
• Disadvantages:
– Requires expertise in risk evaluation and reduction
– Complex, relatively difficult to follow strictly
– Applicable only to large systems
• Applicability:
– Typically used for large, expensive projects.
2007/2008
SOFT3280
Slide 31
Prototyping
• Construction of prototypes is standard practice in engineering.
• Requirements can be validated by prototyping, thus reducing risk.
• Prototypes are used during feasibility studies and are often
constructed from reusable parts.
• Typically used for 4GL development projects.
2007/2008
SOFT3280
Slide 32
Extreme Programming
• This is a so called “agile method” developed in the 1990’s for smaller
systems which have to be developed quickly
• allow the development team to concentrate on the software rather
than on the design and documentation
• Agile methods rely on an iterative approach as in the Incremental
Model but with the end user involved very closely with the developers
throughout the development process – the user is a member of the
development team.
• The user is continually monitoring output, providing feedback and
modifying his requirements specification as required.
• The customer is involved to extreme levels in frequent iterative
development - hence the title.
• It is approached through the use of scenarios- “what will happen if?”.
2007/2008
SOFT3280
Slide 33
Download