72
The Software Life Cycle Software Engineering Andreas Zeller • Saarland University Planning Modelling Construction Deployment Communication Software Increment Inception Elaboration Construction Transition Production

The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

The Software Life CycleSoftware Engineering

Andreas Zeller • Saarland University

Planning

Modelling

Construction

Deployment

CommunicationSoftware Increment

Inception

Elaboration

ConstructionTransition

Production

Page 2: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way
Page 3: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

A Software Crisis

Page 4: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Code and Fix (1950–)

Build first version

Modify until client is satisfied

Operate

Retirement

Page 5: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Code and Fix: Issues

• No process steps – no specs, docs, tests…

• No separation of concerns – no teamwork

• No way to deal with complexity

Page 6: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Code and Fix

Page 7: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Waterfall Model (1968)

Communication

project initiation

Planningestimatingschedulingtracking

Modelinganalysisdesign

Constructioncodetest

Deploymentdeliverysupportfeedback

Page 8: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

CommunicationCommunicatio

nproject initiation

Page 9: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Waterfall Model (1968)

Communication

project initiation

Planningestimatingschedulingtracking

Modelinganalysisdesign

Constructioncodetest

Deploymentdeliverysupportfeedback

Page 10: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Planning

Planningestimatingschedulingtracking

Page 11: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Waterfall Model (1968)

Communication

project initiation

Planningestimatingschedulingtracking

Modelinganalysisdesign

Constructioncodetest

Deploymentdeliverysupportfeedback

Page 12: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Waterfall Model (1968)

Modelinganalysisdesign

Page 13: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Waterfall Model (1968)

Communication

project initiation

Planningestimatingschedulingtracking

Modelinganalysisdesign

Constructioncodetest

Deploymentdeliverysupportfeedback

Page 14: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Waterfall Model

Constructioncodetest

Page 15: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Waterfall Model (1968)

Communication

project initiation

Planningestimatingschedulingtracking

Modelinganalysisdesign

Constructioncodetest

Deploymentdeliverysupportfeedback

Page 16: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Deployment

Deploymentdeliverysupportfeedback

Page 17: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Waterfall Model (1968)

Communication

project initiation

Planningestimatingschedulingtracking

Modelinganalysisdesign

Constructioncodetest

Deploymentdeliverysupportfeedback

Page 18: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way
Page 19: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way
Page 20: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way
Page 21: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Communication

project initiation

Planningestimatingschedulingtracking

Modelinganalysisdesign

Constructioncodetest

Deploymentdeliverysupportfeedback

Waterfall Model (1968)

• Real projects rarely follow a sequential flow

• Hard to state all requirements explicitly

• No maintenance or evolution involved

• Customer must have patience

• Any blunder can be disastrous

Page 22: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Boehm’s first law

Errors are most frequentduring requirements and design activities

and are the more expensivethe later they are removed.

Page 23: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Problem Cost

0,0

7,5

15,0

22,5

30,0

Coding Unit test Component test System test Field

Relative cost of problem per phase

Page 24: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Incremental ModelFeatures

Time

Communicationproject initiation

requirements gathering

Planningestimatingschedulingtracking

Modelinganalysisdesign

Constructioncodetest

Deploymentdeliverysupportfeedback

Increment #1

Communicationproject initiation

requirements gathering

Planningestimatingschedulingtracking

Modelinganalysisdesign

Constructioncodetest

Deploymentdeliverysupportfeedback

Increment #2

Communicationproject initiation

requirements gathering

Planningestimatingschedulingtracking

Modelinganalysisdesign

Constructioncodetest

Deploymentdeliverysupportfeedback

Increment #3

Page 25: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Incremental Model

• Each linear sequence produces a particular “increment” to the software

• First increment typically core product; more features added by later increments

• Allows flexible allocation of resources

Page 26: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Prototyping

Quick Plan

Quick Design

PrototypeConstruction

Deployment and Feedback

Communication

Page 27: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Prototypes

Bottom Layer

Top Layer (GUI)

Page 28: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Horizontal Prototype

Bottom Layer

Top Layer (GUI)

Page 29: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Prototypes

Bottom Layer

Top Layer (GUI)

Page 30: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Vertical Prototype

Bottom Layer

Top Layer (GUI)

Page 31: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Prototypes

• A horizontal prototype tests a particular layer (typically the GUI) of the system

• A vertical prototype tests a particular functionality across all layers

• Resist pressure to turn a prototype into a final result!

Page 32: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Spiral Model (1988)

Communication

PlanningModeling

Construction

Test                   Deployment + Feedback

Page 33: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Spiral Model

• System is developed in series of evolutionary releases

• Milestones for each iteration of the spiral

• Process does not end with delivery

• Reflects iterative nature of development

Page 34: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Unified Process (1999)

Planning

Modelling

Construction

Deployment

CommunicationSoftware Increment

Inception

Elaboration

ConstructionTransition

Production

Page 35: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Inception

PlanningCommunication

Inception

• Encompasses communication with user + planning

• Results in a set of use cases

• Architecture is just a tentative outline

Planning

Modelling

Construction

Deployment

CommunicationSoftware Increment

Inception

Elaboration

ConstructionTransition

Production

Page 36: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Elaboration

Planning

Modelling

Elaboration

• Refines and expands preliminary use cases

• Provides architecture and initial design model

Planning

Modelling

Construction

Deployment

CommunicationSoftware Increment

Inception

Elaboration

ConstructionTransition

Production

Page 37: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Construction

Modelling

ConstructionConstruction

• Builds (or acquires) software components according to architecture

• Completes design model

• Includes implementation, unit tests, acceptance tests

Planning

Modelling

Construction

Deployment

CommunicationSoftware Increment

Inception

Elaboration

ConstructionTransition

Production

Page 38: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Transition

Construction

Deployment

Transition

• Software given to end users for beta testing

• Feedback reports defects and changes

Planning

Modelling

Construction

Deployment

CommunicationSoftware Increment

Inception

Elaboration

ConstructionTransition

Production

Page 39: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Production

Deployment

Software Increment

Production

• Software is deployed

• Problems are monitored

Planning

Modelling

Construction

Deployment

CommunicationSoftware Increment

Inception

Elaboration

ConstructionTransition

Production

Page 40: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Re-Iteration

Deployment

Communication

• Feedback results in new iteration for next

Planning

Modelling

Construction

Deployment

CommunicationSoftware Increment

Inception

Elaboration

ConstructionTransition

Production

Page 41: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Unified Process

Planning

Modelling

Construction

Deployment

CommunicationSoftware Increment

Inception

Elaboration

ConstructionTransition

Production

Page 42: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Unified Process

Planning

Modelling

Construction

Deployment

CommunicationSoftware Increment

Inception

Elaboration

ConstructionTransition

Production

• Draws on best features of conventional process models

• Emphasizes software architecture and design

• Integrates with UML modeling techniques (more on this later)

Page 43: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way
Page 44: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way
Page 45: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

• Individuals and activities over processes and tools.

• Working software over comprehensive documentation.

• Customer collaboration over contract negotiation.

• Responding to change over following a plan..

Manifesto for Agile Software Development (2001)

Page 46: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

• Fast development? Hacking? Prototyping? Uncontrolled fun? Programmer heaven?

• Agility = ability to react to changing situations quickly, appropriately, and effectively.

• notice changes early

• initiate action promptly

• create a feasible and effective alternative plan quickly

• reorient work and resources quickly and effectively

What is Agile Development?

Page 47: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Agile?Communicatio

nproject initiation

Planningestimatingschedulingtracking

Modelinganalysisdesign

Constructioncodetest

Deploymentdeliverysupportfeedback

Page 48: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Incremental ModelFeatures

Time

Communicationproject initiation

requirements gathering

Planningestimatingschedulingtracking

Modelinganalysisdesign

Constructioncodetest

Deploymentdeliverysupportfeedback

Increment #1

Communicationproject initiation

requirements gathering

Planningestimatingschedulingtracking

Modelinganalysisdesign

Constructioncodetest

Deploymentdeliverysupportfeedback

Increment #2

Communicationproject initiation

requirements gathering

Planningestimatingschedulingtracking

Modelinganalysisdesign

Constructioncodetest

Deploymentdeliverysupportfeedback

Increment #3

Page 49: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Agile Processes

Time

Scope

Analyse

Design

Implement

Test

Waterfall Iterative Agile Processes

Credits: Prof. Bodik

Page 50: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Agile vs. Plan-driven

• Low criticality

• Senior developers

• Requirements change very often

• Small number of developers

• Culture that thrives on chaos

Agile

• High criticality

• Junior developers

• Requirements don't change too often

• Large number of developers

• Culture that demands order

Plan-driven

Page 51: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

What is an Agile Process?

• Difficult to predict which requirements will persist or change in the future.

• For many types of software, design and development are interleaved.

• Analysis, design, construction, and testing are not as predictable.

Page 52: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

So, how to tackle unpredictability?

make the process adaptable...

Page 53: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Extreme Programming (1999–)

Design

CodingTest

Planning

Software Increment

Page 54: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Design

CodingTest

Planning

Software Increment

Planning

Planning

• In XP, planning takes place by means of stories

• Each story captures essential behavior

Page 55: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Extreme Programming

Design

CodingTest

Planning

Software Increment

Design

CodingTest

Planning

Software Increment

Page 56: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Extreme Programming

DesignDesign

CodingTest

Planning

Software Increment

• Design is made on the fly, using the KISS (keep it simple) principle

• Virtually no notation besidesCRC cards (object sketches) andspike solutions (prototypes)

Page 57: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Extreme Programming

Design

CodingTest

Planning

Software Increment

Design

CodingTest

Planning

Software Increment

Page 58: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Coding

Coding

Design

CodingTest

Planning

Software Increment

• Each story becomes a unit test that serves as specification

• The program is continuously refactored to have the design match

Page 59: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Coding

Coding

Design

CodingTest

Planning

Software Increment

• To ensure continuous review, XP mandates pair

Page 60: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Extreme Programming

Design

CodingTest

Planning

Software Increment

Design

CodingTest

Planning

Software Increment

Page 61: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Testing

Test

Design

CodingTest

Planning

Software Increment

Unit tests

• detect errors

• find missing functionality

• measure progress

Page 62: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Extreme Programming

Test

Planning

Software Increment

Design

CodingTest

Planning

Software Increment

• The resulting prototypes result in new stories

Page 63: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Extreme Programming

Design

CodingTest

Planning

Software Increment

Design

CodingTest

Planning

Software Increment

Page 64: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Spot the Difference

Page 65: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Scrum

Page 66: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Scrum

• An iterative and incremental agile software development method for managing software projects and product or application development.

• Small working teams to maximize communication, minimize overhead and maximize knowledge sharing.

• Adaptable to technical and business changes.

• Yields frequent software increments that can be inspected.

Page 67: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Scrum

• Development work and the people who perform it are partitioned into clean, low coupling partitions.

• Constant testing and documentation is performed.

• Ability to declare project “done” whenever required.

Page 68: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Scrum

Page 69: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Demos: Demonstrate software increment to the customer for evaluation.

ScrumA prioritized list project requirements or features that provide business value.

Backlog:

Sprints: Consists of work units that are required to achieve a defined backlog into a predefined time-box (usually 30 days).

Scrum Meetings: Short 15 mins. meetings held daily by the scrum team. The Scrum master leads the meeting.

Page 70: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Your Sprints

Bottom Layer

Top Layer (GUI)

1. Core Use Case

2. Top Layer

3. May-Haves

Page 71: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way
Page 72: The Software Life Cycle · Code and Fix (1950–) Build first version ... • No process steps – no specs, docs, tests… • No separation of concerns – no teamwork • No way

Summary