Software Engineering
Lecture 2: Software Life Cycles
Stefan Hallerstede
Århus School of Engineering
25 August 2011
1
Contents
Naive Software Development Code & Fix
Towards A Software Process
Software Process Models Traditional Process Models Alternative Process Models Agile Process Models
Agile Development Methods – Two Examples
Concluding Remarks
2
Contents
Naive Software Development Code & Fix
Towards A Software Process
Software Process Models Traditional Process Models Alternative Process Models Agile Process Models
Agile Development Methods – Two Examples
Concluding Remarks
3
Developing Software
Question:
How to develop software?
4
Contents
Naive Software Development Code & Fix
Towards A Software Process
Software Process Models Traditional Process Models Alternative Process Models Agile Process Models
Agile Development Methods – Two Examples
Concluding Remarks
5
Developing Software
Code & Fix
?
SOFTWARE
6
Developing Software
Code & Fix
?
SOFTWARE
code
6
Developing Software
Code & Fix
?
SOFTWARE
code fix
6
Developing Software
Code & Fix
?
code fix
SOFTWARE
6
Developing Software
Code & Fix
?
code fix
SOFTWARE
6
Contents
Naive Software Development Code & Fix
Towards A Software Process
Software Process Models Traditional Process Models Alternative Process Models Agile Process Models
Agile Development Methods – Two Examples
Concluding Remarks
7
Software Process From The Internet (Source: xkcd)
8
What Do We Expect Of A Software Process?
I What is theaimof having one?
I What is agoodsoftware process?
I What isgoodsoftware?
Correctness Reliability Efficiency Integrity Usability Maintainability Testability Flexibility Portability Reusability Interoperability
9
What Do We Expect Of A Software Process?
I What is theaimof having one?
I What is agoodsoftware process?
I What isgoodsoftware?
Correctness Reliability Efficiency Integrity Usability Maintainability Testability Flexibility Portability Reusability Interoperability
9
Contents
Naive Software Development Code & Fix
Towards A Software Process
Software Process Models Traditional Process Models Alternative Process Models Agile Process Models
Agile Development Methods – Two Examples
Concluding Remarks
10
Contents
Naive Software Development Code & Fix
Towards A Software Process
Software Process Models Traditional Process Models Alternative Process Models Agile Process Models
Agile Development Methods – Two Examples
Concluding Remarks
11
The Waterfall Model
Sequential1
1Winston W. Royce (1970) Managing the Development of Large Software Systems. IEEE WESCON
12
The Waterfall Model
Sequential1
Royce notes that this process often cannot be followedin practice.
1Winston W. Royce (1970) Managing the Development of Large Software Systems. IEEE WESCON
12
The Waterfall Model
Iterative1
Instead it is common to iterate between development phases.
1Winston W. Royce (1970) Managing the Development of Large Software Systems. IEEE WESCON
12
The Waterfall Model
V-Model2
2Barry W. Boehm (1988) A Spiral Model of Software Development and Enhancement. Computer 21(5), IEEE
13
The Waterfall Model
V-Model2
Coding Analysis
Acceptance testing
Unit testing Detailed design
Architectural design Requirements
Integration testing System testing
2Barry W. Boehm (1988) A Spiral Model of Software Development and Enhancement. Computer 21(5), IEEE
13
The Waterfall Model
V-Model2
Coding Analysis
Acceptance testing
Unit testing Detailed design
Architectural design Requirements
Integration testing System testing
The V-Model emphasises the need fortesting matching the development phases.
2Barry W. Boehm (1988) A Spiral Model of Software Development and Enhancement. Computer 21(5), IEEE
13
Iterative Development
The Spiral Model3
3Barry W. Boehm (1988) A Spiral Model of Software Development and Enhancement. Computer 21(5), IEEE 14
Iterative Development
The Spiral Model3
1. Objective setting
• Definition of objectives for the phase
• Identification of risks and planning of alternative strategies 2. Risk assessment and reduction
• Analyse risks, and choose or adapt development model 3. Development and validation
4. Planning
• Review project
• Decide whether to continue with spiral
• Draw up plan for next phase
3Barry W. Boehm (1988) A Spiral Model of Software Development and Enhancement. Computer 21(5), IEEE 14
Iterative Development
The Spiral Model3
3Barry W. Boehm (1988) A Spiral Model of Software Development and Enhancement. Computer 21(5), IEEE 14
Iterative Development
The Spiral Model3
The Spiral Model takes into account:
risk analysis
3Barry W. Boehm (1988) A Spiral Model of Software Development and Enhancement. Computer 21(5), IEEE
14
Iterative Development
The Spiral Model3
The Spiral Model takes into account:
risk analysis and
project management
3Barry W. Boehm (1988) A Spiral Model of Software Development and Enhancement. Computer 21(5), IEEE
14
Contents
Naive Software Development Code & Fix
Towards A Software Process
Software Process Models Traditional Process Models Alternative Process Models Agile Process Models
Agile Development Methods – Two Examples
Concluding Remarks
15
Incremental Delivery
I System is not delivered as a whole but in smallincrements
I Customer is involved in decision on increments
Requirements specification
Assign requirements to increments
Design system architecture
Develop system increment
Validate increment
Integrate increment
Validate system
Final system
16
Component-Based Software Engineering
Requirements specification
Component analysis
Requirements modification
System design with reuse
Development and integration
System validation
I Targeted atreuse
I Process stages adapted to this aim:
I Component analysis: Search for component matching best the requirements
I Requirements modification: Modify requirements to reflect available component
I System design with reuse: Designers incorporate components to be reused, development of new software only if reuse is not possible
I Development and integration: Missing pieces of software are implemented, and reused components integrated
I Is this a reasonable approach?
I When could it be used?
17
Software Design Process Without Reuse
I Turn requirements specification into an executable system
I Interleaved model of design from architecture to algorithms
Requirements specification
Architectural design
Abstract specification
Interface design
Component design
Data structure design
Algorithm design
System architecture
Software specification
Interface architecture
Component specification
Data structure specification
Algorithm specification Design activities
Design products
Implementation
I Can this be used with incremental delivery?
18
Contents
Naive Software Development Code & Fix
Towards A Software Process
Software Process Models Traditional Process Models Alternative Process Models Agile Process Models
Agile Development Methods – Two Examples
Concluding Remarks
19
Agile Processes
Agile Manifesto4
“We are uncovering better ways of developing software by doing it and helping others do it. Through this work we have come to value:
I Individuals and interactionsover processes and tools
I Working softwareover comprehensive documentation
I Customer collaborationover contract negotiation
I Responding to changeover following a plan
That is, while there is value in the items on the right, we value the items on the left more.”
4Kent Beck, et al. (2001) Manifesto for Agile Software Development.
20
Agile Processes
Unified Process5
Core Workflows:
Inception Elaboration Construction Transition PHASES
Business modeling
Requirements
Analysis and Design
Implementation
Test
Deployment
Organisation along time
ITERATIONS
Organisation along content Preliminary Iterations Iter#1 Iter#2 Iter#n Iter#n+1 Iter#n+2 Iter#m Iter#m+1
Supporting Workflows: Configuration and Change Management, Project Management,Environment
5Philippe Kruchten (2004) The rational unified process: an introduction, 3rd ediiton. Addison-Wesley.
21
Agile Processes
Unified Process5
Core Workflows:
Inception Elaboration Construction Transition PHASES
Business modeling
Requirements
Analysis and Design
Implementation
Test
Deployment
Organisation along time
ITERATIONS
Organisation along content Preliminary Iterations Iter#1 Iter#2 Iter#n Iter#n+1 Iter#n+2 Iter#m Iter#m+1
Supporting Workflows: Configuration and Change Management, Project Management,Environment
5Philippe Kruchten (2004) The rational unified process: an introduction, 3rd ediiton. Addison-Wesley.
21
Agile Processes
Unified Process
Six fundamental best practices:6 1. Develop softwareiteratively.
2. Managerequirements.
3. Usecomponent-basedarchitectures. 4. Visuallymodelsoftware.
5. Verify softwarequality. 6. Control changesto software.
6Ian Sommerville (2007) Software Engineering, 8th edition. Addison-Wesley.
22
Agile Processes
Unified Process
Six fundamental best practices:6 1. Develop softwareiteratively.
Plan increments of the system based on customer priorities and develop and deliver the highest priority system features early in the development process.
2. Managerequirements.
3. Usecomponent-basedarchitectures. 4. Visuallymodelsoftware.
5. Verify softwarequality. 6. Control changesto software.
6Ian Sommerville (2007) Software Engineering, 8th edition. Addison-Wesley.
22
Agile Processes
Unified Process
Six fundamental best practices:6 1. Develop softwareiteratively.
2. Managerequirements.
3. Usecomponent-basedarchitectures. 4. Visuallymodelsoftware.
5. Verify softwarequality. 6. Control changesto software.
6Ian Sommerville (2007) Software Engineering, 8th edition. Addison-Wesley.
22
Agile Processes
Unified Process
Six fundamental best practices:6 1. Develop softwareiteratively.
2. Managerequirements.
Explicitly document the customer’s requirements and keep track of changes to these requirements.
Analyse the impact of changes to the system before accepting them.
3. Usecomponent-basedarchitectures. 4. Visuallymodelsoftware.
5. Verify softwarequality. 6. Control changesto software.
6Ian Sommerville (2007) Software Engineering, 8th edition. Addison-Wesley.
22
Agile Processes
Unified Process
Six fundamental best practices:6 1. Develop softwareiteratively.
2. Managerequirements.
3. Usecomponent-basedarchitectures.
4. Visuallymodelsoftware. 5. Verify softwarequality. 6. Control changesto software.
6Ian Sommerville (2007) Software Engineering, 8th edition. Addison-Wesley.
22
Agile Processes
Unified Process
Six fundamental best practices:6 1. Develop softwareiteratively.
2. Managerequirements.
3. Usecomponent-basedarchitectures.
Structure the system architecture into components and rely on reusable software components.
4. Visuallymodelsoftware. 5. Verify softwarequality. 6. Control changesto software.
6Ian Sommerville (2007) Software Engineering, 8th edition. Addison-Wesley.
22
Agile Processes
Unified Process
Six fundamental best practices:6 1. Develop softwareiteratively.
2. Managerequirements.
3. Usecomponent-basedarchitectures.
4. Visuallymodelsoftware.
5. Verify softwarequality. 6. Control changesto software.
6Ian Sommerville (2007) Software Engineering, 8th edition. Addison-Wesley.
22
Agile Processes
Unified Process
Six fundamental best practices:6 1. Develop softwareiteratively.
2. Managerequirements.
3. Usecomponent-basedarchitectures.
4. Visuallymodelsoftware.
Use graphical UML models to present static and dynamic views of the software.
5. Verify softwarequality. 6. Control changesto software.
6Ian Sommerville (2007) Software Engineering, 8th edition. Addison-Wesley.
22
Agile Processes
Unified Process
Six fundamental best practices:6 1. Develop softwareiteratively.
2. Managerequirements.
3. Usecomponent-basedarchitectures.
4. Visuallymodelsoftware.
5. Verify softwarequality.
6. Control changesto software.
6Ian Sommerville (2007) Software Engineering, 8th edition. Addison-Wesley.
22
Agile Processes
Unified Process
Six fundamental best practices:6 1. Develop softwareiteratively.
2. Managerequirements.
3. Usecomponent-basedarchitectures.
4. Visuallymodelsoftware.
5. Verify softwarequality.
Ensure that the software meets the organisational quality standards.
6. Control changesto software.
6Ian Sommerville (2007) Software Engineering, 8th edition. Addison-Wesley.
22
Agile Processes
Unified Process
Six fundamental best practices:6 1. Develop softwareiteratively.
2. Managerequirements.
3. Usecomponent-basedarchitectures.
4. Visuallymodelsoftware.
5. Verify softwarequality.
6. Control changesto software.
6Ian Sommerville (2007) Software Engineering, 8th edition. Addison-Wesley.
22
Agile Processes
Unified Process
Six fundamental best practices:6 1. Develop softwareiteratively.
2. Managerequirements.
3. Usecomponent-basedarchitectures.
4. Visuallymodelsoftware.
5. Verify softwarequality.
6. Control changesto software.
Manage changes to the software using a change management system and configuration
management procedures and tools.
6Ian Sommerville (2007) Software Engineering, 8th edition. Addison-Wesley.
22
Agile Processes
Unified Process
Six fundamental best practices:6 1. Develop softwareiteratively.
2. Managerequirements.
3. Usecomponent-basedarchitectures.
4. Visuallymodelsoftware.
5. Verify softwarequality.
6. Control changesto software.
6Ian Sommerville (2007) Software Engineering, 8th edition. Addison-Wesley.
22
Contents
Naive Software Development Code & Fix
Towards A Software Process
Software Process Models Traditional Process Models Alternative Process Models Agile Process Models
Agile Development Methods – Two Examples
Concluding Remarks
23
Agile Processes
Two Popular Examples
I Extreme Programming:
Leverage developer creativity
and minimise administrative overhead
keywords: small releases, simple design, write tests first, refactoring, pair programming, continuous integration, coding standards
I Scrum:
Self-organising autonomous teams implement product increments in parallel
keywords: sprint, product backlog, prioritised requirements
24
Agile Processes
Extreme Programming7
7Kent Beck (2000) Extreme Programming Explained. Embrace Change. Addison Wesley
25
Agile Processes
Scrum8
8Ken Schwaber, Mike Beedle (2002) Agile software development with Scrum. Prentice Hall.
26
Contents
Naive Software Development Code & Fix
Towards A Software Process
Software Process Models Traditional Process Models Alternative Process Models Agile Process Models
Agile Development Methods – Two Examples
Concluding Remarks
27
Summing Up
Advantages And Disadvantages Of Different Software Processes9
Waterfall vs
Spiral vs Agile
9Eric J. Braude, Michael E. Bernstein (2011) Software Engineering – Modern Approaches. Wiley.
28
The Waterfall Process
I Advantages
I Simple and easy to use
I Easy to allocate resources
I Works well for smaller projects
or when requirements are well understood
I Disadvantages
I Requirements must be known upfront
I Late feedback by users
I Lack of parallelism
I Inefficient use of resources
29
The Spiral Process
I Advantages
I Risks are managed early and throughout the process
I Software evolves as the project progresses
I Planning is built into the process
I Disadvantages
I Complicated to use
I May be overkill for small projects
30
The Agile Process
I Advantages
I The project always has demonstrable results
I Developers tend to be more motivated
I Customers are able to provide better requirements because they can see the evolving product
I Disadvantages
I Problematical for large application
I Problematical for large teams
I Documentation output is questionable
31