46
Software Engineering Plan-based Software Development Software Engineering 2004-2005 Marco Scotto ([email protected])

Plan-based Software Developmentpro.unibz.it/staff/mscotto/SE/SE - Plan-based Software Development.pdf · Waterfall development model ¾Different phases of software development are

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Plan-based Software Developmentpro.unibz.it/staff/mscotto/SE/SE - Plan-based Software Development.pdf · Waterfall development model ¾Different phases of software development are

Software Engineering

Plan-based Software DevelopmentSoftware Engineering

2004-2005Marco Scotto ([email protected])

Page 2: Plan-based Software Developmentpro.unibz.it/staff/mscotto/SE/SE - Plan-based Software Development.pdf · Waterfall development model ¾Different phases of software development are

2Software Engineering

Development Models

IntroductionThe Waterfall Development ModelThe V-Shaped Software Development ModelThe Incremental Software Development Model

A synoptic view

Page 3: Plan-based Software Developmentpro.unibz.it/staff/mscotto/SE/SE - Plan-based Software Development.pdf · Waterfall development model ¾Different phases of software development are

3Software Engineering

Plan-based DevelopmentAddresses problems in posed by 3 beastsBased on the idea that the problems of software development are due to a lack of orderOrder requires finding what to do (planning) and then doing itPlans involve:• tasks, • the deliverables of those tasks, and • the dependencies among the tasks that are often

related to those deliverables

High level of adherence to process

Page 4: Plan-based Software Developmentpro.unibz.it/staff/mscotto/SE/SE - Plan-based Software Development.pdf · Waterfall development model ¾Different phases of software development are

4Software Engineering

Changes…

A change in the process is intrinsically bad in a plan-based model• it causes an alteration of the plan and that might

affect the overall architecture of the project.

To eliminate the need for change, more effort is required by the software developer• better planning • a higher level of adherence to the development

process • the automation of plan management…

Page 5: Plan-based Software Developmentpro.unibz.it/staff/mscotto/SE/SE - Plan-based Software Development.pdf · Waterfall development model ¾Different phases of software development are

5Software Engineering

Plan-based Development

Page 6: Plan-based Software Developmentpro.unibz.it/staff/mscotto/SE/SE - Plan-based Software Development.pdf · Waterfall development model ¾Different phases of software development are

6Software Engineering

Development Models

IntroductionThe Waterfall Development ModelThe V-Shaped Software Development ModelThe Incremental Software Development ModelA synoptic view

Page 7: Plan-based Software Developmentpro.unibz.it/staff/mscotto/SE/SE - Plan-based Software Development.pdf · Waterfall development model ¾Different phases of software development are

7Software Engineering

Waterfall development model

Different phases of software development are defined first and then ordered in a strictly sequential waySeveral instances of the waterfall software development model differ according to how the phases are organized In some cases there may be more emphasis on:• customer communications• on the design document, or • on the system architecture• …

Page 8: Plan-based Software Developmentpro.unibz.it/staff/mscotto/SE/SE - Plan-based Software Development.pdf · Waterfall development model ¾Different phases of software development are

8Software Engineering

Diagram

Very detailed

Requirement capture

Analysis

Design

Implementation

Testing

Maintenance

Requirement document

Analysis document

Design document

Source code

Working system

Requirement analysts

System analysts

System designers

Programmers

Testers

System maintainers

Very generic

Calendar time

Level of detail

Page 9: Plan-based Software Developmentpro.unibz.it/staff/mscotto/SE/SE - Plan-based Software Development.pdf · Waterfall development model ¾Different phases of software development are

9Software Engineering

Waterfall model

Page 10: Plan-based Software Developmentpro.unibz.it/staff/mscotto/SE/SE - Plan-based Software Development.pdf · Waterfall development model ¾Different phases of software development are

10Software Engineering

Properties and featuresProduct passed from stage to stageDivision and specialization of laborMatches with sequential coordination mechanism• Strict end-to-start dependencies• Magnifies the problem of unclear deliverables

Strict and detailed planning to tame the beasts• Uncertainty is hard to avoid• Irreversibility cannot be ignored if uncertainty

existsCustomers are not able view the product development

Page 11: Plan-based Software Developmentpro.unibz.it/staff/mscotto/SE/SE - Plan-based Software Development.pdf · Waterfall development model ¾Different phases of software development are

11Software Engineering

Division and specialization of laborAiming for perfection and economies of scaleSpecific professionals for specific stagesProgresses from generic to detailedStrict and detailed planning to tame the beastsClear and well defined deliverables as interfaces between stages• No human in deliverables more robustSimplified management & clear responsibilities

Page 12: Plan-based Software Developmentpro.unibz.it/staff/mscotto/SE/SE - Plan-based Software Development.pdf · Waterfall development model ¾Different phases of software development are

12Software Engineering

The 3 beastsStrict and detailed planning to tame the beasts• Uncertainty is hard to avoid• Irreversibility cannot be ignored if

uncertainty existsBeast Approach

Uncertainty A very detailed planning phase in which all the details are sorted out.

Irreversibility Not really managed within the process. Almost all decisions are considered irreversible.

Complexity Clear division of tasks among and within phases. Formal document interfaces.

Page 13: Plan-based Software Developmentpro.unibz.it/staff/mscotto/SE/SE - Plan-based Software Development.pdf · Waterfall development model ¾Different phases of software development are

13Software Engineering

Evaluation of the waterfall model

First methodology to guide the development of a software system Pitfalls• It is not possible to foresee the appearance of all possible

features of a software system • Work specialization may not work well in software nowadays• Lack of integration between phases• Deliverables often not fully understood by the next stage

Bugs or problems of deliverables are overlookedSequential dependency magnifies the problem

Implications for Coding• Modifying the code regardless of what is written in the upstream

deliverables “Write Once Read Never” documents

Page 14: Plan-based Software Developmentpro.unibz.it/staff/mscotto/SE/SE - Plan-based Software Development.pdf · Waterfall development model ¾Different phases of software development are

14Software Engineering

Functional decomposition models

Associated to waterfall modelsSimilarities• Superimposing suitable structure to project• Belief in perfect planning and precise

predictionDifferences• Functional decomposition: divide and conquer• Waterfall: linear and easily decomposable

structure

Page 15: Plan-based Software Developmentpro.unibz.it/staff/mscotto/SE/SE - Plan-based Software Development.pdf · Waterfall development model ¾Different phases of software development are

15Software Engineering

Cowboy coding

Just patching the bugs and hacking in codeSpaghetti code• Messy• Result of cowboy coding

Everything is tied together Slight modification causes unpredictable changes

Page 16: Plan-based Software Developmentpro.unibz.it/staff/mscotto/SE/SE - Plan-based Software Development.pdf · Waterfall development model ¾Different phases of software development are

16Software Engineering

Alternatives to the Waterfall Model –needed? Why?

Not possible to develop a unique formalism for defining requirements, analysis, design, and code• Unique model missing –unambiguous,

complete, correct The product appears only at the very end and then it is shipped to the customer• The customer must proceed on an act of faith

that the development is going in the right direction

Page 17: Plan-based Software Developmentpro.unibz.it/staff/mscotto/SE/SE - Plan-based Software Development.pdf · Waterfall development model ¾Different phases of software development are

17Software Engineering

Development Models

IntroductionThe Waterfall Development Model

The V-Shaped Software Development ModelThe Incremental Software Development Model

A synoptic view

Page 18: Plan-based Software Developmentpro.unibz.it/staff/mscotto/SE/SE - Plan-based Software Development.pdf · Waterfall development model ¾Different phases of software development are

18Software Engineering

V-shaped model

Page 19: Plan-based Software Developmentpro.unibz.it/staff/mscotto/SE/SE - Plan-based Software Development.pdf · Waterfall development model ¾Different phases of software development are

19Software Engineering

The Structure of the V-Shaped Development Model

At the end of each phase there is the definition of a test of the system as it is perceived then

Test cases for systemintegration

Test cases forcustomer acceptance

Verygeneric

A nalysis

R equirement

capture

Design

C odingTe st of

C ode

Delivery to

customer

System

integration

Unit

Integration

Test cases for code

Requirementdocument

Code

Analysisdocument

Designdocument

Test cases for unitintegration

???

???

???Level ofdetail

Verydetailed Calendar time

Page 20: Plan-based Software Developmentpro.unibz.it/staff/mscotto/SE/SE - Plan-based Software Development.pdf · Waterfall development model ¾Different phases of software development are

20Software Engineering

Develop correctness criteria for each stage

Correctness criteria = test caseTwo interfaces between contiguous phases• Deliverable• Test case

Checking for errors at the end of development• Checking proceeds from more specific to less

specific issues

Page 21: Plan-based Software Developmentpro.unibz.it/staff/mscotto/SE/SE - Plan-based Software Development.pdf · Waterfall development model ¾Different phases of software development are

21Software Engineering

Interfaces in the V-Shaped Model In the V-shaped models there are two interfaces

between contiguous phases:A document is created with the details of the product at the conclusion of each phase (requirement document, analysis document, design document, code) • The document triggers the flow down in the model, toward

more specialization

A document is created with the acceptance criteria for a more specific phase to the more generic phase –the test cases for customer acceptance, the test cases for system integration, and so on• This document ensures that the more detailed phase has

satisfied the need of the less detailed phase

Page 22: Plan-based Software Developmentpro.unibz.it/staff/mscotto/SE/SE - Plan-based Software Development.pdf · Waterfall development model ¾Different phases of software development are

22Software Engineering

Coordination Mechanisms in the V-Shaped Model

Verification vs. validation• Verification: checking against customer's

original requirements• Validation: checking against previous phase

Sequential (preferred) or common output mechanism • Strict end-to-start dependencies

Page 23: Plan-based Software Developmentpro.unibz.it/staff/mscotto/SE/SE - Plan-based Software Development.pdf · Waterfall development model ¾Different phases of software development are

23Software Engineering

Addressing the 3 beasts

Uncertainty and irreversibility are considered with the introduction of test casesAn error in a phase implies rework of all the following phases

Page 24: Plan-based Software Developmentpro.unibz.it/staff/mscotto/SE/SE - Plan-based Software Development.pdf · Waterfall development model ¾Different phases of software development are

24Software Engineering

Addressing the 3 beastsBeast Approach

Uncertainty There is very detailed planning phase in which all the details are sorted out. The possibility of misunderstanding and errors is taken into consideration via the insertion of checks against each previous phase.

Irreversibility Irreversibility is now considered. Errors exist. Finding an error in a phase implies the invalidity of everything done after it, which, in principle, requires a complete rework.

Complexity Complexity is handled analogously to the handling in waterfall model, with the addition of the checks of validity for the movements upstream.

Page 25: Plan-based Software Developmentpro.unibz.it/staff/mscotto/SE/SE - Plan-based Software Development.pdf · Waterfall development model ¾Different phases of software development are

25Software Engineering

Evaluation of the V-shaped Model

Successes• The control of correctness beyond the scope of simple

testing of the code and before the final deliverable to the customer

Pitfalls• We cannot be sure that the different phases are

properly interconnected• All the development process is based on the same

sequential concepts of planning, specialization of skills, and modularization of development

the structure of development is not intended for concepts that will evolve in the course of development

• The product appears only at the end; the customer cannot see it growing step-by-step

Page 26: Plan-based Software Developmentpro.unibz.it/staff/mscotto/SE/SE - Plan-based Software Development.pdf · Waterfall development model ¾Different phases of software development are

26Software Engineering

Development Models

IntroductionThe Waterfall Development ModelThe V-Shaped Software Development Model

The Incremental Software Development ModelA synoptic view

Page 27: Plan-based Software Developmentpro.unibz.it/staff/mscotto/SE/SE - Plan-based Software Development.pdf · Waterfall development model ¾Different phases of software development are

27Software Engineering

Incremental modelBased on first developing the overall system architecture and then building in increments subsystems fitting that architecture

Page 28: Plan-based Software Developmentpro.unibz.it/staff/mscotto/SE/SE - Plan-based Software Development.pdf · Waterfall development model ¾Different phases of software development are

28Software Engineering

Activities in the incremental model

The incremental model is based on two kinds of activities:On the one hand:• the capture of requirements, • the analysis of the system, • the development of a product architecture, and • the division of the product architecture into a set of

independent parts

The development of each independent part quite like a small V-shaped model.

Page 29: Plan-based Software Developmentpro.unibz.it/staff/mscotto/SE/SE - Plan-based Software Development.pdf · Waterfall development model ¾Different phases of software development are

29Software Engineering

New features

Compared to waterfall and V-shaped models

IncrementsArchitecture design phaseReuse library

Page 30: Plan-based Software Developmentpro.unibz.it/staff/mscotto/SE/SE - Plan-based Software Development.pdf · Waterfall development model ¾Different phases of software development are

30Software Engineering

Increments

Subsystems; independent partsIndependent development• Analogous to small V-shaped models• Mutual references and parallel progress via clear

interfaces• No direct and unrestricted access to each other's

part

Can be shown to customersRequire regular deliverable and system architecture as inputs

Page 31: Plan-based Software Developmentpro.unibz.it/staff/mscotto/SE/SE - Plan-based Software Development.pdf · Waterfall development model ¾Different phases of software development are

31Software Engineering

Upper portion of the incremental model

Test cases for systemintegration

Test cases forcustomer acceptance

Verygeneric

Level ofdetail

Analysis

Requirementcapture

Arch. design

Delivery tocustomer

System integration

Unit Integration

Calendar time

Requirementdocument

Analysisdocument

Systemarchitecture

est cases for unitintegration

Verydetailed

???

???

???

Page 32: Plan-based Software Developmentpro.unibz.it/staff/mscotto/SE/SE - Plan-based Software Development.pdf · Waterfall development model ¾Different phases of software development are

32Software Engineering

Lower portion of the incremental model

Design

Coding Test of Code

Unit Integration

Test cases for code Code

Design document

Test cases for unit integration

???

System architecture

Analysis document

Page 33: Plan-based Software Developmentpro.unibz.it/staff/mscotto/SE/SE - Plan-based Software Development.pdf · Waterfall development model ¾Different phases of software development are

33Software Engineering

The big picture

Test cases for system integration

Test cases for customer acceptance

Verygeneric

Very detailed

Level ofdetails

Analysis

Requirementcapture

Architecturedesign

Delivery tocustomer

System integration

Unit Integration

Calendar time

Requirement document

Analysis document

System architecture

Test cases for unit integration

???

???

???

Iteration 2

Design

Coding Test of Code

Unit Integration

Test cases for codeCode

Design document

Test cases for unit integration

???

System architecture

Analysis document

Iteration 1

Design

Coding Test of Code

Unit Integration

Test cases for codeCode

Design document

Test cases for unit integration

???

System architecture

Analysis document

Iteration n

Design

Coding Test of Code

Unit Integration

Test cases for codeCode

Design document

Test cases for unit integration

???

System architecture

Analysis document

Page 34: Plan-based Software Developmentpro.unibz.it/staff/mscotto/SE/SE - Plan-based Software Development.pdf · Waterfall development model ¾Different phases of software development are

34Software Engineering

Architecture design phase

Produces a deliverable called system architectureSystem architecture• Provides the overall model of solution• Identifies increments• Used by other phases and increments

Page 35: Plan-based Software Developmentpro.unibz.it/staff/mscotto/SE/SE - Plan-based Software Development.pdf · Waterfall development model ¾Different phases of software development are

35Software Engineering

Addressing the 3 beasts (1/2)

Uncertainty, irreversibility, and overall complexity reduced due to smaller scope of incrementsHigher planned coordination complexity

Page 36: Plan-based Software Developmentpro.unibz.it/staff/mscotto/SE/SE - Plan-based Software Development.pdf · Waterfall development model ¾Different phases of software development are

36Software Engineering

Addressing the 3 beasts (2/2)Beast Approach

Uncertainty Uncertainty in system development is limited by developing the system increment-by-increment. The uncertainty in customer requirements is not taken into account significantly.

Irreversibility A good architecture should specify solid and sound interfaces, thus limiting irreversibility that arises because of errors in development. Irreversibility due to misunderstood requirements is not properly addressed.

Complexity The system architecture separates the concerns of the different subsystems and limits the complexity of the overall development.Planned coordination complexity becomes greater, though.

Page 37: Plan-based Software Developmentpro.unibz.it/staff/mscotto/SE/SE - Plan-based Software Development.pdf · Waterfall development model ¾Different phases of software development are

37Software Engineering

Common output coordination mechanism

Integration test within each incrementCorrects problems soonerIntegration challenges• Interaction not limited to external interfaces• Extends to internal variables and structures

Dependencies• End-to-start for overall development• Start-to-start among increments which may

be partially overlapped

Page 38: Plan-based Software Developmentpro.unibz.it/staff/mscotto/SE/SE - Plan-based Software Development.pdf · Waterfall development model ¾Different phases of software development are

38Software Engineering

Object oriented model

OO natural match with incremental modelReduces problem of integrationSame language between phasesRisks • Developing structures difficult to understand• Building many useless diagrams

Page 39: Plan-based Software Developmentpro.unibz.it/staff/mscotto/SE/SE - Plan-based Software Development.pdf · Waterfall development model ¾Different phases of software development are

39Software Engineering

Reuse library

Before start of increments• Reusing elements

Increases quality and helps finding defectsrepeated usage repeated tests

• Risk of wasting time and effortFunctionalities required are not clear at this point

During development of incrementFramework

Page 40: Plan-based Software Developmentpro.unibz.it/staff/mscotto/SE/SE - Plan-based Software Development.pdf · Waterfall development model ¾Different phases of software development are

40Software Engineering

Reuse library before start of increments

Test cases for system integration

Test cases for customer acceptance

Very generic

Very detailed

Level of details

Analysis

Requirement capture

Architecture design

Delivery to customer

System integration

Unit Integration

Calendar time

Requirement document

Analysis document

Test cases for unit integration

???

???

???

Iteration 2

Design

Coding Test of Code

Unit Integration

Test cases for codeCode

Design document

Test cases for unit integration

???

System architecture

Analysis document

Iteration 1

Design

Coding Test of Code

Unit Integration

Test cases for codeCode

Design document

Test cases for unit integration

???

System architecture

Analysis document

Iteration n

Design

Coding Test of Code

Unit Integration

Test cases for codeCode

Design document

Test cases for unit integration

???

System architecture

Analysis document

Reuse library development

System architecture

Reuse library

Page 41: Plan-based Software Developmentpro.unibz.it/staff/mscotto/SE/SE - Plan-based Software Development.pdf · Waterfall development model ¾Different phases of software development are

41Software Engineering

Reuse library

Before start of incrementsDuring development of increments• Increases quality and helps finding defects• Essentially a set of utility objects and functions• Minimum risk of producing useless components• Constantly upgraded and re-factoredFramework

Page 42: Plan-based Software Developmentpro.unibz.it/staff/mscotto/SE/SE - Plan-based Software Development.pdf · Waterfall development model ¾Different phases of software development are

42Software Engineering

Reuse library during development of increments

Test cases for system integration

Test cases for customer acceptance

Very generic

Very detailed

Level of details

Analysis

Requirement capture

Architecture design

Delivery to customer

System integration

Unit Integration

Calendar time

Requirement document

Analysis document

System architecture

Test cases for unit integration

???

???

???

I t e r a t i o n 2

D e s ig n

C od i n g T e s t of C o d e

U n it I n t e g r a t i on

Te s t c as e s f o r c o d e Co d e

D es ig n d o c u m e n t

T e st c a s es fo r u n i t in te g ra t io n

? ? ?

S y s te m a rc h it ec tu r e

A n a ly sis d o c u m e n t

I t e r a t i o n 1

D e s ig n

C o d in g T e s t o f C od e

U n it I n t e g r at i on

Te s t c as e s fo r c o d eC o d e

D e sig n d o c u m e nt

Te s t ca s e s f o r u n i t in te g ra t io n

? ? ?

S y ste m ar c h ite ct ur e

A n a ly s is d o cu m e nt

I t e r a t i o n n

D e s ig n

C od in g T e s t of C od e

U n it I n t e g r a t i on

Te s t c as e s f o r c o d eCo d e

D es ig n d o cu m e nt

Te st ca s es f o r u n it in te g ra tio n

? ? ?

S ys te m ar c h it e ct ur e

A n a ly s is d o cu m e n t

Reuse Library

Page 43: Plan-based Software Developmentpro.unibz.it/staff/mscotto/SE/SE - Plan-based Software Development.pdf · Waterfall development model ¾Different phases of software development are

43Software Engineering

Reuse library

Before start of incrementsDuring development of incrementsFramework• "Active library"• Has built-in main function which calls the

developers' supplied functions• No need for developers to worry about overall

logic• Requires upfront investment

Page 44: Plan-based Software Developmentpro.unibz.it/staff/mscotto/SE/SE - Plan-based Software Development.pdf · Waterfall development model ¾Different phases of software development are

44Software Engineering

Evaluation

System easier to manage and more flexibleInvestment diluted throughout developmentAdditional feedbacks from earlier incrementsA need to balance• More valuable feedbacks from tighter integration• Higher coordination complexity

OO techniques increase integrationCustomers are still left out

Page 45: Plan-based Software Developmentpro.unibz.it/staff/mscotto/SE/SE - Plan-based Software Development.pdf · Waterfall development model ¾Different phases of software development are

45Software Engineering

Development Models

IntroductionThe Waterfall Development ModelThe V-Shaped Software Development ModelThe Incremental Software Development Model

A synoptic view

Page 46: Plan-based Software Developmentpro.unibz.it/staff/mscotto/SE/SE - Plan-based Software Development.pdf · Waterfall development model ¾Different phases of software development are

46Software Engineering

A synoptic viewWaterfall V-shaped Incremental

Rigidity of the overall process As waterfall The process becomes more flexible due to the different increments

Significant upfront investment Even more upfront investments After an initial large investment, subsequent investments are diluted in increments

Difficulty to collect all the desired features from the customer upfront

As waterfall As waterfall, unless the customer is made aware of the different increments –this may cause other problems, though

Difficulty to determine the HW/SW specs and predict the HW/SW evolutions of the target environment

As waterfall The development in increments limits this problem

Work specialization does not suit most of today SW development situations

As waterfall Within increments, the development teams may be more integrated

Lack of integration between phases Due to the introduction of tests, there are more earlier checks for integration between phases

As V-shaped. If Object Orientation is used, the integration becomes much higher

When there is a panic, people focus on the code; the other artifacts produced during development –analysis, design, …may soon become obsolete

As waterfall

Customer cannot perceive the evolution of the product

As waterfall As waterfall, unless the customer is made aware of the different increments –this may cause other problems, though