lecture # 01 prologue : the software process

21
SWE 316: Software Design and Architecture Objectives Lecture # 01 Prologue: The Software Process SWE 316: Software Design & Architecture To review software process and its phases Chapter 0

Upload: tahlia

Post on 24-Feb-2016

49 views

Category:

Documents


1 download

DESCRIPTION

SWE 316: Software Design & Architecture. Lecture # 01 Prologue : The Software Process. Chapter 0 . To review software process and its phases. Software Process. Models. Requirements. Design. Coding. Testing. Maintenance. Main Phases of Software Process. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Lecture # 01 Prologue : The Software Process

SWE 316: Software Design and Architecture

Objectives

Lecture # 01Prologue: The Software Process

SWE 316: Software Design & Architecture

To review software process and its phases

Chapter 0

Page 2: Lecture # 01 Prologue : The Software Process

SWE 316: Software Design and Architecture

Main Phases of Software ProcessSoftware Process: a procedure followed by the

development team toproduce an application.

1.Requirements Analysis (answers “WHAT?”) Specifying what the application must do

2.Design (answers “HOW?”) Specifying what the parts will be, and how they will fit together

3.Implementation (A.K.A. “CODING”) Writing the code

4.Testing (type of VERIFICATION) Executing the application with test data for input

5.Maintenance (REPAIR or ENHANCEMENT) Repairing defects and adding capability

2

Sec 0.1

Software Process Models Requirements Design Coding Testing Maintenance

Page 2 of 21

Page 3: Lecture # 01 Prologue : The Software Process

SWE 316: Software Design and Architecture

Personal Finance Example Requirements Analysis: Diagrams and text

e.g., “ … The application shall display the balance in the user’s bank account. …”

Design: Diagrams and text

e.g., “ … The design will consist of the classes CheckingAccount, SavingsAccount, …”

Implementation: Source code

e.g., … class CheckingAccount{ double balance; … } …

3

Software Process Models Requirements Design Coding Testing Maintenance

Page 3 of 21

Page 4: Lecture # 01 Prologue : The Software Process

SWE 316: Software Design and Architecture

Personal Finance Example (Cont’d)

Testing: Test cases and test results

e.g., “… With test case: deposit $44.92 / deposit $32.00 / withdraw $101.45 / … the balance was $2938.22, which is correct. …”

Maintenance: Modified design, code, and text

e.g., Defect repair: “Application crashes when balance is $0 and attempt is made to withdraw funds. …”

e.g., Enhancement: “Allow operation with Riyal.”4

Software Process Models Requirements Design Coding Testing Maintenance

Page 4 of 21

Page 5: Lecture # 01 Prologue : The Software Process

SWE 316: Software Design and Architecture

Waterfall Process Basic software process in which requirements

analysis, design, coding, testing, and maintenance are performed in sequence, but with some overlap.

5

Software Process Models Requirements Design Coding Testing Maintenance

Page 5 of 21

Page 6: Lecture # 01 Prologue : The Software Process

SWE 316: Software Design and Architecture

Waterfall Process (cont.) Why a Pure Waterfall Process is Usually Not Practical ? Don’t know up front everything wanted and needed

Usually hard to visualize every detail in advance

We can only estimate the costs of implementing requirements To gain confidence in an estimate, we need to design and

actually implement parts, especially the riskiest ones We will probably need to modify requirements as a result

We often need to execute intermediate builds Stakeholders need to gain confidence Designers and developers need confirmation they're building

what’s needed and wanted

Team members can't be idle while the requirements are being completed Typically put people to work on several phases at once

6

Software Process Models Requirements Design Coding Testing Maintenance

Page 6 of 21

Page 7: Lecture # 01 Prologue : The Software Process

SWE 316: Software Design and Architecture

The Spiral Process

7

Software Process Models Requirements Design Coding Testing Maintenance

Page 7 of 21

Page 8: Lecture # 01 Prologue : The Software Process

SWE 316: Software Design and Architecture

Common Procedures Work Against the Product of Prior Phase

In each phase of the software process, we design and code within the specifications produced by the prior phase.

Inspections An artifact is a document or code.

An inspection of an artifact is the process of reading through the artifact in a complete and entirely thorough manner.

8

Software Process Models Requirements Design Coding Testing Maintenance

Page 8 of 21

Page 9: Lecture # 01 Prologue : The Software Process

SWE 316: Software Design and Architecture

Requirements Analysis The process of understanding what’s needed or

wanted, and expressing the results in writing.

9

Sec 0.2

Software Process Models Requirements Design Coding Testing Maintenance

Page 9 of 21

Page 10: Lecture # 01 Prologue : The Software Process

SWE 316: Software Design and Architecture

The Challenges of Requirements Analysis Express requirements in ordinary, clear English

Non-technical From the user’s perspective

Organize the requirements into logical groupings Make easy to access and change Challenging for real applications

Arrange for the management of requirements A procedure must be developed in advance for

keeping the requirements documents up to date Who, how, and when

10

Software Process Models Requirements Design Coding Testing Maintenance

Page 10 of 21

Page 11: Lecture # 01 Prologue : The Software Process

SWE 316: Software Design and Architecture

Design (The heart of this course) The design of an application expresses how the

application is to be constructed.

It describes the parts involved and how they are to assembled.

It consists of a set of documents (diagrams and text)

11

Sec 0.3

Software Process Models Requirements Design Coding Testing Maintenance

Page 11 of 21

Page 12: Lecture # 01 Prologue : The Software Process

SWE 316: Software Design and Architecture

Tips on Coding Code only against a design

Specify precisely what each method accomplishes

12

Sec 0.4

Software Process Models Requirements Design Coding Testing Maintenance

Page 12 of 21

Page 13: Lecture # 01 Prologue : The Software Process

SWE 316: Software Design and Architecture

Tips on Coding (cont.) Before compiling, satisfy yourself that the code you have

typed is correct. Read it thoroughly. ‘correct’ means that is satisfies what’s required of it This is “author-inspection”

Build-a-little-Test-a-little1. Add a relatively small amount of code (“build-a-little”)2. (Again): Read what you have typed and correct it if necessary

until you are totally satisfied it’s correct3. Compile4. Test the new functionality (“test-a-little”)

13

Software Process Models Requirements Design Coding Testing Maintenance

Page 13 of 21

Page 14: Lecture # 01 Prologue : The Software Process

SWE 316: Software Design and Architecture

Author-Inspect Before CompilingInspect and edit the block of code you have just written until you are convinced it does exactly what it is meant to do. Only then compile it.

14

Software Process Models Requirements Design Coding Testing Maintenance

Page 14 of 21

Page 15: Lecture # 01 Prologue : The Software Process

SWE 316: Software Design and Architecture

Testing The testing phase consists of supplying input to

the application and comparing the output with that mandated by the software requirements specification.

Helps to uncover defects

Proves the presence of defects, but never their absence

15

Sec 0.5

Software Process Models Requirements Design Coding Testing Maintenance

Page 15 of 21

Page 16: Lecture # 01 Prologue : The Software Process

SWE 316: Software Design and Architecture

Types of Testing Black-box testing

Compares the output obtained with the output specified by the requirements document

Does not take into account the manner in which the application is designed

White-box testing Based on the design Exercise specific design

features such as branching, loops, interfaces, etc.

Unit Tests Tests on parts of an

application (individual methods, classes, etc.)

Integration Tests Tests the software units

work together correctly System Tests

Tests of an entire application

Software Process Models Requirements Design Coding Testing Maintenance

Page 16 of 21

Page 17: Lecture # 01 Prologue : The Software Process

SWE 316: Software Design and Architecture

Tips on Testing Test early and often

Test with extreme values Very small, very big, etc. Borderline “Illegal” values

Vary test cases Don’t repeat tests with same test data except

when specifically intended

17

Software Process Models Requirements Design Coding Testing Maintenance

Page 17 of 21

Page 18: Lecture # 01 Prologue : The Software Process

SWE 316: Software Design and Architecture

Testing Test early and often: Note that “passed all tests”

doesn’t equate to “bug free.”

18

Software Process Models Requirements Design Coding Testing Maintenance

Page 18 of 21

Page 19: Lecture # 01 Prologue : The Software Process

SWE 316: Software Design and Architecture

Maintenance Maintenance refers to the work performed on

the application that occurs after it has been delivered.

Types of maintenance Corrective (Defect Removal)

Finding and fixing all inconsistencies with the requirements document

Perfective (Enhancement) Introducing new or improved capability

Adaptive Adapts software to new environment

Preventive changing some aspect of the system to

prevent failures19

Sec 0.6

Software Process Models Requirements Design Coding Testing Maintenance

Page 19 of 21

Page 20: Lecture # 01 Prologue : The Software Process

SWE 316: Software Design and Architecture

Summary of Software Process A way of going about the creation and upkeep of

a software product

Commonly based on the Waterfall process 1.Specify requirements2.Create design3.Write code4.Test5.Maintain

20

In sequence with some overlap

Software Process Models Requirements Design Coding Testing Maintenance

Page 20 of 21

Page 21: Lecture # 01 Prologue : The Software Process

SWE 316: Software Design and Architecture

Reading

21

Prologue - The Software Process (Page 1-18)

Software Process Models Requirements Design Coding Testing Maintenance

Page 21 of 21