1 12/14/201511 Life Cycle Models (Lect 2) Prof.Lalji prasad.

Post on 17-Jan-2016

216 views 0 download

Transcript of 1 12/14/201511 Life Cycle Models (Lect 2) Prof.Lalji prasad.

104/21/23 11

Life Cycle Models

(Lect 2)

Prof.Lalji prasad

2

Classical Waterfall Model

Classical waterfall model divides life cycle into phases: feasibility study, requirements analysis and specification, design, coding and unit testing, integration and system testing, maintenance.

3

Classical Waterfall Model

Feasibility Study

Req. Analysis

Design

Coding

Testing

Maintenance

4

Relative Effort for Phases

Phases between feasibility study and testing known as development

phases.

Among all life cycle Among all life cycle phasesphases maintenance phase maintenance phase

consumes maximum effort.consumes maximum effort.

Among development phases, testing phase consumes

the maximum effort.

0

10

20

30

40

50

60

Req

. S

p

Desig

n

Cod

ing

Test

Main

tnce

Rela

tive E

ffort

5

Classical Waterfall Model (CONT.)

Most organizations usually define: standards on the outputs (deliverables)

produced at the end of every phase

entry and exit criteria for every phase.

They also prescribe methodologies for: specification,

design,

testing,

project management, etc.

6

Classical Waterfall Model (CONT.)

The guidelines and methodologies of an organization: Called the organization's software software development methodology.development methodology.

Software development organizations: Expect fresh engineers to master the organization's software development methodology.

7

Feasibility Study Main aim of feasibility study:determine

whether developing the product Financially worthwhile

Technically feasible. Roughly understand what customer

wants: Data which would be input to the system, Processing needed on these data, Output data to be produced by the system, Various constraints on the behavior of the

system.

8

Activities during Feasibility Study

Work out an overall understanding of the problem.

Formulate different solution strategies.

Examine alternate solution strategies in terms of:

resources required, cost of development, and development time.

9

Activities during Feasibility Study

Perform a cost/benefit analysis: to determine which solution is the best.

you may determine that none of the solutions is feasible due to:

high cost, resource constraints, technical reasons.

10

Requirements Analysis and Specification

Aim of this phase: Understand the exact requirements of the customer,

Document them properly.

Consists of two distinct activities: Requirements gathering and analysis

Requirements specification.

11

Goals of Requirements Analysis

Collect all related data from the customer: Analyze the collected data to clearly understand what customer wants,

Find out any inconsistencies and incompleteness in the requirements,

Resolve all inconsistencies and incompleteness.

12

Requirements Gathering

Gathering relevant data: Usually collected from the end-users through interviews and discussions.

For example, for a business accounting software:

Interview all the accountants of the organization to find out their requirements.

13

Requirements Analysis (Cont...)

The data you initially collect from the users: Would usually contain several contradictions and ambiguities:

Each user typically has only a partial and incomplete view of the system.

14

Requirements Analysis (Cont...)

Ambiguities and contradictions: must be identified resolved by discussions with the customers.

Next, requirements are organized: into a Software Requirements Specification (SRS) document.

15

Requirements Analysis (CONT.)

Engineers doing requirements analysis and specification: are designated as analysts.

16

DesignDesign phase transforms requirements specification: Into a form suitable for implementation in some programming language.

17

Design In technical terms:

During design phase, software architecture is derived from the SRS document.

Two design approaches: traditional approach, object oriented approach.

18

Traditional Design Approach

Consists of two activities: Structured analysis Structured design

19

Structured Analysis Activity

Identify all the functions to be performed.

Identify data flow among the functions. Decompose each function recursively into sub-functions. Identify data flow among the subfunctions as well.

20

Structured Analysis (CONT.)

Carried out using Data flow diagrams (DFDs).

After structured analysis, carry out structured design: architectural design (or high-level design)

detailed design (or low-level design).

21

Structured Design High-level design:

decompose the system into modules, represent invocation relationships among the modules.

Detailed design: different modules designed in greater detail:

data structures and algorithms for each module are designed.

22

Object Oriented Design First identify various objects (real world

entities) occurring in the problem: Identify the relationships among the

objects. For example, the objects in a pay-roll

software may be: employees, managers, pay-roll register, Departments, etc.

23

Object Oriented Design (CONT.)

Object structure further refined to obtain the detailed

design.

OOD has several advantages: lower development effort,

lower development time,

better maintainability.

24

Implementation

Purpose of implementation phase (aka coding and unit testing phase): translate software design into source code.

25

Implementation

During the implementation phase: Each module of the design is coded,

Each module is unit testedTested independently as a stand alone unit, and debugged,

Each module is documented.

26

Implementation (CONT.)

The purpose of unit testing: Test if individual modules work correctly.

The end product of implementation phase: A set of program modules that have been tested individually.

27

Integration and System Testing

Different modules are integrated in a planned manner: Modules are almost never integrated in one shot.

Normally integration is carried out through a number of steps.

During each integration step, the partially integrated system is tested.

28

Integration and System Testing

M1

M4M3

M2

29

System Testing

After all the modules have been successfully integrated and tested: System testing is carried out.

Goal of system testing: Ensure that the developed system functions according to its requirements as specified in the SRS document.

30

MaintenanceMaintenance of any software product: Requires much more effort than the effort to develop the product itself.

Development effort to maintenance effort is typically 40:60.

31

Maintenance (CONT.)

Corrective maintenance: Correct errors which were not discovered

during the product development phases.

Perfective maintenance: Improve implementation of the system enhance functionalities of the system.

Adaptive maintenance: Port software to a new environment,

e.g. to a new computer or to a new operating system.

32

Iterative Waterfall Model

Classical waterfall model is idealistic: Assumes that no defect is introduced during any development activity.

In practice: defects do get introduced in almost every phase of the life cycle.

33

Iterative Waterfall Model (CONT.)

Defects usually get detected much later in the life cycle: For example, a design defect might go unnoticed till the coding or testing phase.

34

Iterative Waterfall Model (CONT.)

Once a defect is detected: We need to go back to the phase where it was introduced

Redo some of the work done during that and all subsequent phases.

Therefore we need feedback paths in the classical waterfall model.

35

Iterative Waterfall Model (CONT.)

Feasibility Study

Req. Analysis

Design

Coding

Testing

Maintenance

36

Phase Containment of Errors

(Cont...) Errors should be detected: In the same phase in which they are introduced.

For example: if a design problem is detected in the design phase itself,

The problem can be taken care of much more easily

Than say if it is identified at the end of the integration and system testing phase.

37

Phase Containment of Errors

Reason: rework must be carried out not only to the design but also to code and test phases.

The principle of detecting errors as close to its point of introduction as possible: is known as phase containment of errors.

Iterative waterfall model is by far the most widely used model. Almost every other model is derived from the

waterfall model.

38

Classical Waterfall Model (CONT.)

Irrespective of the life cycle model actually followed: The documents should reflect a classical waterfall model of development,

Comprehension of the documents is facilitated.

39

Classical Waterfall Model (CONT.)

Metaphor of mathematical theorem proving: A mathematician presents a proof as a single chain of deductions,

Even though the proof might have come from a convoluted set of partial attempts, blind alleys and backtracks.

40

Prototyping Model Before starting actual development,

A working prototype of the system should first be built.

A prototype is a toy implementation of a system: limited functional capabilities, Low reliability, Inefficient performance.

41

Reasons for developing a prototype

Illustrate to the customer: input data formats, messages, reports, or interactive dialogs.

Examine technical issues associated with product development: Often major design decisions depend on issues like:

response time of a hardware controller, efficiency of a sorting algorithm, etc.

42

Prototyping Model (CONT.)

The third reason for developing a prototype is: It is impossible to ``get it right'' the first time,

We must plan to throw away the first product

if we want to develop a good product.

43

Prototyping Model (CONT.)

Start with approximate requirements. Carry out a quick design. Prototype model is built using several

short-cuts: Short-cuts might involve using inefficient, inaccurate, or dummy functions.

A function may use a table look-up rather than performing the actual computations.

44

Prototyping Model (CONT.)

The developed prototype is submitted to the customer for his evaluation: Based on the user feedback, requirements are refined.

This cycle continues until the user approves the prototype.

The actual system is developed using the classical waterfall approach.

45

Prototyping Model (CONT.)

Test

RequirementsGathering

Quick Design

Refine Requirements

Build Prototype

Customer Evaluation of Prototype

Design

Implement

Maintain

Customer satisfied

46

Prototyping Model (CONT.)

Requirements analysis and specification phase becomes redundant: final working prototype (with all user

feedbacks incorporated) serves as an animated requirements specification.

Design and code for the prototype is usually thrown away: However, the experience gathered from

developing the prototype helps a great deal while developing the actual product.

47

Prototyping Model (CONT.)

Even though construction of a working prototype model involves additional cost --- overall development cost might be lower for: Systems with unclear user requirements, Systems with unresolved technical issues.

Many user requirements get properly defined and technical issues get resolved: These would have appeared later as change

requests and resulted in incurring massive redesign costs.

48

Evolutionary Model Evolutionary model (aka successive

versions or incremental model): The system is broken down into several

modules which can be incrementally implemented and delivered.

First develop the core modules of the system.

The initial product skeleton is refined into increasing levels of capability: by adding new functionalities in successive

versions.

49

Evolutionary Model (CONT.)

Successive version of the product: functioning systems capable of performing some useful work.

A new release may include new functionality:

Also existing functionality in the current release might have been enhanced.

50

Evolutionary Model (CONT.)

A B

C

A A

BB

51

Advantages of Evolutionary Model

Users get a chance to experiment with a partially developed system: Much before the full working version is

released, Helps finding exact user requirements:

Much before fully working system is developed.

Core modules get tested thoroughly: Reduces chances of errors in final product.

52

Disadvantages of Evolutionary Model

Often, difficult to subdivide problems into functional units: Which can be incrementally implemented and delivered.

Evolutionary model is useful for very large problems,

Where it is easier to find modules for incremental implementation.

53

Evolutionary Model with Iteration

Many organizations use a combination of iterative and incremental development: A new release may include new functionality

Existing functionality from the current release may also have been modified.

54

Evolutionary Model with iteration

Several advantages: Training can start on an earlier release

customer feedback taken into account Markets can be created:

For functionality that has never been offered by other vendors.

Frequent releases allow developers to fix unanticipated problems quickly.

55

Major difficulties of older Life Cycle Models

1. Difficulty in incorporating change requests during product development.

2. High cost incurred in developing custom applications:

Also, certain other types of software products.

56

Major difficulties of older Life Cycle Models

In traditional models: Requirements for the system are determined at the start and are assumed to be fixed from that point on.

Long term planning is made based on this.

57

Rapid Application Development (RAD)

Model Sometimes referred to as the rapid

prototyping model. Major aims:

Decrease the time taken and the cost incurred to develop software systems.

Facilitate accommodating change requests as early as possible:

before large investments have been made in development and testing.

.

58

An Important Principle

• Decrease in development time, cost reductions, and the flexibility to incorporate changes:• Achieved through minimal use of planning and heavy reuse of existing code.

59

Methodology•Plans are made for one increment at a time.• The time planned for each iteration is called a time box.

•Each iteration (increment):• Enhances the implemented functionality of the application a little.

60

Methodology•During each iteration,• A quick-and-dirty prototype-style software for some functionality is developed.• The customer evaluates the prototype and gives his feedback.• The prototype is refined based on the customer feedback.

61

How Does RAD Facilitate Faster Development?

RAD advocates use of specialized tools: That support fast creation of working prototypes.

These specialized tools usually support the following features: Visual style of development. Use of reusable components. Use of standard APIs (Application Program Interfaces).

.

62

Applications for Which RAD is Suitable

•Customized product developed for one or two customers only

•Performance and reliability are not critical.

•The system can be split into several independent modules.

•.

63

Application Characteristics that Render RAD

Unsuitable• Few plug-in components are available• High performance or reliability required• No precedence for similar products exists• The system cannot be modularized.•.

64

RAD versus Prototyping

•In prototyping model:•The developed prototype is primarily used to gain insights into the solution•Choose between alternatives•Elicit customer feedback.

•The developed prototype:•Usually thrown away.•.

65

RAD versus Prototyping

• In contrast:• In RAD the developed prototype evolves into the deliverable software.

• Though RAD is expected to lead to faster product development compared to traditional models:• The quality and reliability would be poorer.• .

66

RAD versus Iterative Waterfall Model

In the iterative waterfall model, All product functionalities are developed

together. In the RAD model on the other hand,

Product functionalities are developed incrementally through heavy code and design reuse.

Customer feedback is obtained on the developed prototype after each iteration:

Based on this the prototype is refined. .

67

RAD versus Iterative Waterfall Model

The iterative waterfall model: Does not help accommodate requirement change

requests. The iterative waterfall model does have some

important advantages Use of the iterative waterfall model leads to

production of good documentation. Also, the developed product usually has better

quality and reliability than that developed using RAD. .

68

RAD versus Evolutionary Model

Incremental development: Occurs in both evolutionary and RAD

models. However, in RAD:

Each increment is a quick and dirty prototype,

Whereas in the evolutionary model each increment is systematically developed using the iterative waterfall model.

Also, RAD develops software in shorter increments: Compared to the evolutionary model The incremental functionalities are fairly

large in the evolutionary model. .

69

Agile Model To overcome the shortcomings of the waterfall model of development. Proposed in mid-1990s

The agile model was primarily designed: To help a project to adapt to change requests

In the agile model,: The requirements are decomposed into many small incremental parts that can be developed over one to four weeks each.

.

70

Agile Model At a time, only one increment is planned,

developed, deployed at the customer site. No long-term plans are made.

Each iteration is developed using the waterfall model of development.

An iteration may not add significant functionality, but still a new release is invariably made at the

end of each iteration Delivered to the customer for regular use.

.

71

Methodology Agile model emphasizes the advantage

of face-to-face communication over written documents.

To facilitate face-to-face communication, development team to share a single office

space. Team size is deliberately kept small (5-9

people) This makes the agile model most suited to

the development of small projects. .

72

Agile Model Emphasizes incremental release of working

software: As the primary measure of progress.

A few important principles behind the agile model are: Frequent delivery of versions every few weeks. All change requests to the requirements are

accommodated easily. Close cooperation between customers and

developers. Face-to-face communication among the

development team members. .

73

Agile Model versus Iterative Waterfall

Model The waterfall model steps through

requirements-capture, analysis, design, coding, and testing stages: In a planned sequence.

Progress is measured in terms of delivered artifacts: Requirement specifications, design documents,

test plans, code reviews, etc. The agile model, in contrast:

Sequences delivery of working versions of a product in several increments.

74

Agile Model versus Iterative Waterfall

ModelAs regards to similarity: Agile teams use the waterfall model on a small scale.

75

Agile versus RAD Model Agile model does not recommend

developing prototypes: Systematic development of each

incremental feature is emphasized. In contrast:

RAD is based on designing quick-and-dirty prototypes, which are then refined into production quality code.

Agile projects logically break down the solution into features: These are incrementally developed and

delivered.

76

Agile versus RAD Model RAD model focuses on:

Developing all the features of an application First doing it badly and then successively

improving the code over time. Agile development practices are stringent

and thorough, ensures that problems in design or code are

detected and fixed as quickly as possible. Agile teams only demonstrate completed

work. In contrast, RAD teams demonstrate screen

mock ups, and prototypes. .

77

Agile versus exploratory programming

Similarity: Frequent re-evaluation of plans, Emphasis on face-to-face communication,

Relatively sparse use of documents. Agile teams, however, do follow defined and disciplined processes and carry out rigorous designs: This is in contrast to chaotic coding in exploratory programming.

.

78

Extreme Programming Model

Extreme programming (XP) was proposed by Kent Beck in 1999.

The methodology got its name from the fact that: It recommends taking the best practices in program development to extreme levels.

79

Best Practices Coding:

without code it is not possible to have a working system.

Utmost attention needs to be placed on coding.

Testing: Testing is the primary means for

developing a fault-free product. Listening:

Careful listening to the customers is essential to develop a good quality product.

.

80

Best Practices Designing:

Without proper design, a system implementation becomes too complex

The dependencies within the system become too numerous to comprehend.

Feedback: Feedback is important in learning customer requirements.

.

81

Project Characteristics that Suggest Suitability of Extreme

ProgrammingProjects involving new technology or research projects. In this case, the requirements change rapidly and unforeseen technical problems need to be resolved.

Small projects: These are easily developed using extreme programming.

82

Spiral Model Proposed by Boehm in 1988. Each loop of the spiral represents a phase

of the software process: the innermost loop might be concerned with

system feasibility, the next loop with system requirements

definition, the next one with system design, and so on.

There are no fixed phases in this model, the phases shown in the figure are just examples.

83

Spiral Model (CONT.)

The team must decide: how to structure the project into phases.

Start work using some generic model: add extra phases

for specific projects or when problems are identified during a project.

Each loop in the spiral is split into four sectors (quadrants).

84

Spiral Model (CONT.)

Determine Objectives

Identify & Resolve Risks

Develop Next Level of Product

Customer Evaluation of Prototype

85

Objective Setting (First Quadrant)

Identify objectives of the phase, Examine the risks associated with

these objectives. Risk:

any adverse circumstance that might hamper successful completion of a software project.

Find alternate solutions possible.

86

Risk Assessment and Reduction (Second Quadrant)

For each identified project risk, a detailed analysis is carried out.

Steps are taken to reduce the risk. For example, if there is a risk that requirements are inappropriate: A prototype system may be developed.

87

Spiral Model (CONT.)

Development and Validation (Third Third quadrantquadrant): develop and validate the next level of the

product.

Review and Planning (Fourth quadrantFourth quadrant): review the results achieved so far with the

customer and plan the next iteration around the spiral.

With each iteration around the spiral: progressively more complete version of the

software gets built.

88

Spiral Model as a Meta Model

Subsumes all discussed models: a single loop spiral represents waterfall

model.

uses an evolutionary approach -- iterations through the spiral are evolutionary

levels.

enables understanding and reacting to risks during each iteration along the spiral.

Uses: prototyping as a risk reduction mechanism retains the step-wise approach of the waterfall

model.

89

Comparison of Different Life Cycle Models

Iterative waterfall model most widely used model. But, suitable only for well-understood problems.

Prototype model is suitable for projects not well understood: user requirements technical aspects

90

Comparison of Different Life Cycle Models (CONT.)

Evolutionary model is suitable for large problems: can be decomposed into a set of

modules that can be incrementally implemented,

incremental delivery of the system is acceptable to the customer.

The spiral model: suitable for development of technically

challenging software products that are subject to several kinds of risks.