180 likes | 272 Views
Topic 12 Basic concepts of scenario-based view. Parts of this topic use material from the textbook H. Balzert, “Software-Technik”, Vol. 1, 2nd ed., Spektrum Akademischer Verlag, 2001. Basi c concepts: Scenario - based view. Concepts and Views. Alternative Notations. Rarely used.
E N D
Topic 12Basic concepts of scenario-based view Parts of this topic use material from the textbook H. Balzert, “Software-Technik”, Vol. 1, 2nd ed., Spektrum Akademischer Verlag, 2001
Basic concepts: Scenario-based view Concepts and Views Alternative Notations Rarely used Program structure chart 1973 Often used Collabo-ration diagram Program flowchart 1966 Decision tables 1957 Activity diagram 1997 Function tree Use Case Diagram 1987 Data flow diagram 1966 Data-Dictio-nary1979 Entity Relation-ship Model 1976 Class diagram 1980/ 1990 Pseudo code Rules Stateautomat 1954 Petri-Net1962 Sequ.diagram 1987 Entity types and relations Functional hierarchy Business process Infor-mation Flow Data Structures Class structures Control structures If-Then structures Finite State Automat Concurrent structures Interaction structures Object Oriented View Algorith-micView RuleBased View State Oriented View Scenario Based View Functional View Data Oriented View
Business process Definition phase Data flow diagram Function tree Petri-Net State automat Entity Relationship Model Sequence diagram Design phase Collaboration diagram DD (Data Dictionary) Class diagram Decision table Rules Program structure chart Implementation phase Pseudo code Program flowchart Legend: A B: A is used in B
Petri-Nets State automat graphical ER Decision tree Data flow diagram Use Case Diagr. Class diagram Program structure chart Function tree PAP Sequence diagram verbal Collaboration diagram State-diagram/-table State automat (textual) Order requirements ET textual Pseudocode Petri-Nets(textual) Clasification scheme Text Rules DD informal semiformal/formalized formal
12. Basic concepts of scenario-based view • Messages and Scenarios • Collaboration diagrams • Sequence diagrams
Messages • Message • A sender (client) requests a receiver (server, supplier) to perform a certain service by sending a message Sender Receiver Message (Operation of the receiver) • ... by calling an operation of the receiver
createParticipantList() getSeminarTitle() :SeminarType :Seminar P-List SeminarTitle getName() getName() Name Name :Lecturer :Customer Sending messages: createParticipantsList() Contained information: • Sender: seminar manager, seminar • Receiver: seminar, seminartype, lecturer, customer • 4 messages: createParticipantsList(), getSeminarTitle(), getName(), getName() Objects - not classes no order of messages defined
Szenario • Describes dynamic operationalsequence of a system order of messages is defined • A use case can be documented by a collection of scenarios • Scenario = Sequence of messages
3 2 1 4 createParticipantList() getSeminarTitle() P-List SeminarTitle getName() getName() Name Name Szenario during the execution of createParticipantList() :SeminarType :Seminar :Lecturer :Customer
12. Basic concepts of scenario-based view • Messages and Scenarios • Collaboration diagrams • Sequence diagrams
UML representation of scenarios Collaboration diagrams Interaction diagrams Sequence diagrams Basic concepts of the scenario-based view: describe sequencies of messages between actors and objects of the system
Object ‘:customer‘ is placeholder for an arbitrary object of class ‘customer‘ overspecification: the order 2,3,4 is arbitrary How many objects are involved? 1:createParticipantsList() 2:getSeminarTitle() :Seminar :SeminarType 3:getName() 4:getName() :Customer to all dedicated lecturers :Lecturer to all dedicated customers Collaboration diagram: createParticipantList() • Execution of the operation ‘createParticipantList()‘ leads to a collaboration between objects (of 4 differend classes and the actor) • Order by numbers
object constructed and destroyed 1: operation1() :class1 {transient} triggering operation 2: operation2() 3: operation4() :class2 {new} :class4 {destroy} 2.1: operation3() new object objects – not classes ! object destroyed :class3 {new} Collaboration diagram: lifetime of objects
12. Basic concepts of scenario-based view • Messages and Scenarios • Collaboration diagrams • Sequence diagrams
:Lecturer :Seminar :SeminarType :Customer createParticipantsList() overspecification: the order is partly arbitrary getSeminarTitel() getName() control flow returns getName() time Sequence diagram: ‘createParticipantList()‘ Order by time axis
actor :class2 firstObject :class1 allready existing objects Object symbol: from there on the object exists Object is deleted Object sends a message to it self Bar length shows the activity duration operation1() class3() newObject :class3 operation5() operation3() Object linie: represents temporal existence of an object operation2() Sequence diagram: lifetime of objects
Petri-Nets State automat graphical ER Decision tree Data flow diagram Use Case Diagr. Class diagram Program structure chart Function tree PAP Sequence diagram verbal Collaboration diagram State-diagram/-table State automat (textual) Order requirements ET textual Pseudocode Petri-Nets(textual) Clasification scheme Text Rules DD informal semiformal/formalized formal textual?
History • Dr. Ivar Hjalmar Jacobson*2.9.1939 in Ystad, SchwedenVice President Business EngineeringRational Software Corporation • Pioneerof object-oriented software-development(use case driven approach) • Introduction of interaction diagrams tothe object-oriented software development • Pioneer of object-oriented enterprise modelling