Lecture 4 (Software Development Processes II) · Software Development ... Workflows • When. 9 UP...

Post on 13-Jul-2020

7 views 0 download

Transcript of Lecture 4 (Software Development Processes II) · Software Development ... Workflows • When. 9 UP...

Software EngineeringITCS 3155Fall 2008

Dr. Jamie PaytonDepartment of Computer ScienceUniversity of North Carolina at Charlotte

September 4, 2008

Lecture 4Software Development

Processes II

2

Lecture Overview

Finishing up our discussion of software process models

More on Formal ModelingUnified Process Model

Chapter 2Software Design Processes and Management

3

Software Process Models

Waterfall modelClassic life cycleSeparate and distinct process activity phases followed in linear fashion

Incremental process modelsComplete a sequence of the process activities in linear fashion to address a portion of requirementsEach iteration through the activities results in a piece of the final product

Evolutionary process modelsSpecification, design, and validation activities are interleavedEach iteration through activities develops a limited prototype to extract feedback from customer• Details of product design are delayed • Prototype often serves as primary form of design documentation

4

Comparing Process Models

5

Lecture Overview

Process ModelsWaterfallIncrementalEvolutionaryHybrids• Spiral model• Unified Process model

Describing Processes

6

Rational Unified Process (RUP)

Hybrid generic process model derived from work on UML and an object-oriented process

An instantiation of the spiral modelElements of multiple generic process models• Waterfall• Evolutionary Development• CBSE

7

Perspectives on theUnified Process (UP)

Dynamic perspectiveDescribed in terms of phases of process over time

Static perspectiveDescribed in terms of process activities, participants, and results

Practice perspectiveDescribed in terms of good practices to be used during process

8

UP Static Perspective

Modeling elementsWorkers• Who

Activities• How

Artifacts• What

Workflows• When

9

UP Dynamic Perspective

Life Cycle

time

Iterative phase model

Phases terminate in a milestonePoint in time at which critical decision must be madeBased on availability of a set of artifacts in a particular state

Product Release

10

The Rational Unified Process:

Static + DynamicC

ore

Sup

porti

ng

Workflows

©Rational Software

time

content

11

Unified Process Principles

Best practices1. Develop software iteratively2. Manage requirements3. Use component-based architectures4. Visually model software5. Verify software quality6. Control changes to software

12

Lecture Overview

Process ModelsWaterfallIncrementalEvolutionaryHybrids• Spiral model• Unified process model

Describing Processes

13

Describing Processes

Process description notationsDescribe design processesDescribe computational processes

In this class, we will use the Unified Modeling Language (UML)

Widely usedUML provides a process description notation• Activity diagrams

14

UML Activity Diagrams

An activity diagram shows ActionsFlow of control and data between actions

ActivityA non-atomic task or procedureCan be decomposed into actions

ActionA task or procedure that cannot be broken into parts

15

Activity Graph Elements

Sort Clothes

Wash Whites

Wash Darks

Dry Clothes

Fold Clothes

Do Laundry

activity symbol

action node

activity edge

initial node

activity final node

16

Activity Diagram Execution Model

Execution is modeled by tokensProduced by action nodesTravel over action edgesConsumed by action nodes

Action nodesRepresent an actionBegin execution when a token exists on every incoming edgeConsumes tokens upon executionProduces tokens on every outgoing edge upon completion

Action

Notation

17

Activity Diagram Execution Model (2)

Initial nodeProduces a token on each outgoing edge when activity begins

Final nodeConsumes a token available on any incoming edge and terminates entire activity

Notation

18

Branching Nodes

guards

merge node

decision node

19

Branching Execution Model

Decision nodePasses tokens, doesn’t consume them • If token arrives on incoming edge of decision node• Then token will be made available on outgoing edge whose

guard is true

Merge nodeActs as a simple “repeater”• If token arrives on incoming edge of merge node• Then token will be made available on outgoing edge of merge

node

GuardsMust be mutually exclusive!• Otherwise, behavior is undefined

20

Deadlock

RunDrier cannot execute!

Why?Run Drier

Fold Clothes

Try to DryClothes

[else]

[still wet]

21

Data FlowsObject (data) nodes

Represented by labeled rectangle• Name of object• State (optional)

Control flow vs. Data flowControl flow: activity edge that is a conduit for control tokensData flow: activity edge that is a conduit for data tokens• Considered data flow if:

Flow begins or ends at object nodeEdge leaving decision or merge node where at least one incoming edge is data flow

Data flow tokens Contain data/objectsConsumed: action nodes extract dataProduced: action node places data or objects in token

22

Data Flow Example

23

Activity Parameters

Activity parametersObject nodes placed on activity symbol boundaries Indicate data or object inputs or outputsContain the data or object nameTypes are specified in the activity symbol beneath the activity name

24

Activity Parameter Example

max = a[i]

FindMaxa : int[1..*]max : int

[else][i < a.length]

i++

[max < a.[i]]

[else]

max = a[0]i = 1a

max

output activity parameter

input activity

parameter

activity parameter

types

25

Next time

Beginning the software development processSoftware Product DesignRead Chapter 3