chapter 8 behavioral modeling chapter 8 alan dennis, barbara wixom, and david tegarden john wiley...

18
Behavioral Modeling Chapter 8 Chapter 8 Alan Dennis, Barbara Wixom, and David Tegarden John Wiley & Sons, Inc. Slides by Fred Niederman Edited by Solomon Negash

Upload: prosper-whitehead

Post on 05-Jan-2016

229 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Chapter 8 Behavioral Modeling Chapter 8 Alan Dennis, Barbara Wixom, and David Tegarden John Wiley & Sons, Inc. Slides by Fred Niederman Edited by Solomon

Behavioral Modeling

Chapter 8Chapter 8

Alan Dennis, Barbara Wixom, and David Tegarden

John Wiley & Sons, Inc.

Slides by Fred NiedermanEdited by Solomon Negash

Page 2: Chapter 8 Behavioral Modeling Chapter 8 Alan Dennis, Barbara Wixom, and David Tegarden John Wiley & Sons, Inc. Slides by Fred Niederman Edited by Solomon

Slide 2

Key Ideas

Behavioral models describe the internal dynamic aspects of an information system that supports business processes in an organizationKey UML behavioral models are: sequence diagrams, collaboration diagrams, and statechart diagrams

Page 3: Chapter 8 Behavioral Modeling Chapter 8 Alan Dennis, Barbara Wixom, and David Tegarden John Wiley & Sons, Inc. Slides by Fred Niederman Edited by Solomon

Slide 3

Purpose of Behavioral Models

To depict the internal view of business processesTo show the effects of varied processes on the systemInteraction diagram components:

ObjectsOperationsMessages

Page 4: Chapter 8 Behavioral Modeling Chapter 8 Alan Dennis, Barbara Wixom, and David Tegarden John Wiley & Sons, Inc. Slides by Fred Niederman Edited by Solomon

Slide 4

Sequence Diagrams

Illustrate the objects that participate in a use-caseShow the messages that pass between objects for a particular use-case

Page 5: Chapter 8 Behavioral Modeling Chapter 8 Alan Dennis, Barbara Wixom, and David Tegarden John Wiley & Sons, Inc. Slides by Fred Niederman Edited by Solomon

Slide 5

Example Sequence Diagram

Page 6: Chapter 8 Behavioral Modeling Chapter 8 Alan Dennis, Barbara Wixom, and David Tegarden John Wiley & Sons, Inc. Slides by Fred Niederman Edited by Solomon

Slide 6

Sequence Diagram SyntaxAN ACTOR

AN OBJECT

A LIFELINE

A FOCUS OF CONTROL

A MESSAGE

OBJECT DESTRUCTION

anObject:aClass

aMessage()

x

Page 7: Chapter 8 Behavioral Modeling Chapter 8 Alan Dennis, Barbara Wixom, and David Tegarden John Wiley & Sons, Inc. Slides by Fred Niederman Edited by Solomon

Slide 7

Building a Sequence Diagram

Determine the context of the sequence diagramIdentify the participating objectsSet the lifeline for each objectAdd messagesPlace the focus of control on each object’s lifelineValidate the sequence diagram

Page 8: Chapter 8 Behavioral Modeling Chapter 8 Alan Dennis, Barbara Wixom, and David Tegarden John Wiley & Sons, Inc. Slides by Fred Niederman Edited by Solomon

Slide 8

Collaboration Diagrams

Essentially an object diagram that shows message passing relationships instead of aggregation or generalization associations.Emphasize the flow of messages among objects, rather than timing and ordering of messages

Page 9: Chapter 8 Behavioral Modeling Chapter 8 Alan Dennis, Barbara Wixom, and David Tegarden John Wiley & Sons, Inc. Slides by Fred Niederman Edited by Solomon

Slide 9

Example Collaboration Diagram

Page 10: Chapter 8 Behavioral Modeling Chapter 8 Alan Dennis, Barbara Wixom, and David Tegarden John Wiley & Sons, Inc. Slides by Fred Niederman Edited by Solomon

Slide 10

Collaboration Diagram Syntax

AN ACTOR

AN OBJECT

AN ASSOCIATION

A MESSAGE

anObject:aClass

aMessage()

Page 11: Chapter 8 Behavioral Modeling Chapter 8 Alan Dennis, Barbara Wixom, and David Tegarden John Wiley & Sons, Inc. Slides by Fred Niederman Edited by Solomon

Slide 11

Building a Collaboration Diagram

Determine the context of the collaboration diagramIdentify the participating objects and their associationsLayout objects and associationsAdd messagesValidate the sequence diagram

Page 12: Chapter 8 Behavioral Modeling Chapter 8 Alan Dennis, Barbara Wixom, and David Tegarden John Wiley & Sons, Inc. Slides by Fred Niederman Edited by Solomon

Slide 12

Statechart Diagrams

The statechart diagram shows the different states of the object and what events cause the object to change from one state to another.Components of Statechart Diagrams

States Events Transitions Actions Activities

Page 13: Chapter 8 Behavioral Modeling Chapter 8 Alan Dennis, Barbara Wixom, and David Tegarden John Wiley & Sons, Inc. Slides by Fred Niederman Edited by Solomon

Slide 13

Example Statechart Diagram

Page 14: Chapter 8 Behavioral Modeling Chapter 8 Alan Dennis, Barbara Wixom, and David Tegarden John Wiley & Sons, Inc. Slides by Fred Niederman Edited by Solomon

Slide 14

Statechart Diagram Syntax

A STATE

AN INITIAL STATE

A FINAL STATE

AN EVENT

A TRANSITION

aState

anEvent

Page 15: Chapter 8 Behavioral Modeling Chapter 8 Alan Dennis, Barbara Wixom, and David Tegarden John Wiley & Sons, Inc. Slides by Fred Niederman Edited by Solomon

Slide 15

Building Statechart Diagrams

Set the contextIdentify the initial final, and stable states of the objectDetermine the order in which the object will pass through stable statesIdentify the events, actions, and guard conditions associated with the transitionsValidate the statechart diagram

Page 16: Chapter 8 Behavioral Modeling Chapter 8 Alan Dennis, Barbara Wixom, and David Tegarden John Wiley & Sons, Inc. Slides by Fred Niederman Edited by Solomon

Slide 16

“CRUD” Analysis Example

Page 17: Chapter 8 Behavioral Modeling Chapter 8 Alan Dennis, Barbara Wixom, and David Tegarden John Wiley & Sons, Inc. Slides by Fred Niederman Edited by Solomon

Slide 17

Your Turn

What distinguishes the sequence diagram, the collaboration diagram, and the statechart diagram?For what sort of new applications might you need to develop all of these? Are there any new applications that would not need all of these diagrams for full development?

Page 18: Chapter 8 Behavioral Modeling Chapter 8 Alan Dennis, Barbara Wixom, and David Tegarden John Wiley & Sons, Inc. Slides by Fred Niederman Edited by Solomon

Slide 18

Summary

Sequence diagrams illustrate the classes that participate in a use case and the messages that pass between them.Collaboration diagrams provide a dynamic view of the object-oriented system and accentuate message passing between collaborating actors and objects.Statechart diagrams show the different states that a single class passes through in response to events.Reference, conference on object oriented programming:

http://oopsla.acm.org