SlideShare a Scribd company logo
1 of 52
Lecture 6: Collaboration 
Diagrams 
Copyright W. Howden 1
Context - 1 
• Interaction sequence diagrams show: 
– interactions of actors with the whole system 
(via the GUI/View layer/subsystem) 
– interactions between subsystems 
• illustrates how the GUI/View sends messages to 
other subsystems, and how they cooperate to 
perform some responsibility 
Copyright W. Howden 2
Context - 2 
• Messages received by subsystems 
– in our design, messages received by the 
interface class for a subsystem 
– corresponds to a method in the interface class 
(i.e. an instance of it) being executed 
– corresponds to a task/request/event to which the 
subsystem must respond 
Copyright W. Howden 3
Context - 3 
• Subsystem responses 
– for each request, we have to design how the 
subsystem will respond 
– creation of new subsystem classes to fulfill 
those responsibilities 
• design for change 
• design for intellectual manageability 
• use design patterns and basic design patterns 
Copyright W. Howden 4
Collaboration Diagrams 
• Use for subsystem and class design 
• Will use to show event responses 
– Event º receiving a message 
• how should the entity (e.g. subsystem/subsystem-interface) 
react to this? 
• Diagrams will show auxiliary objects that 
we will create as part of the design 
– leads to definition of new subsystem classes 
Copyright W. Howden 5
Collaboration Diagram 
Components 
• Objects 
• Messages 
– One object sends a message to another message 
• Sequencing of messages 
– various notations can be used here 
Copyright W. Howden 6
2b: [userName=/ name] result :="Not logged on" 
3b: [2a & memberData == null] result = "NotAMember" 
5: [2a & 3a] result = "UpdateMade" 
1: userName = getUserName() 
result = setMemberData 
(name, dateeData) :String 
dL : DomainLogic 
2a: [userName==name] memberData 
= getMemberData(userName) 
4: [2a & 3a] updateMemberData(memberData) 
dB : DataBase 
logOn : LogOn 
3a: [2a & memberData/= null] 
setDateeData(dateeData) 
memberData : MemberData 
Domain (Business) Logic subsystem updates a member's data 
Copyright W. Howden 7
Message Sequence Notation 
• Don’t number first message, we are showing how 
the object responds to this initial event 
• Complicated situations: 
– Conditional branching 
– Nesting of (sub) operations 
– Compound conditionals 
Copyright W. Howden 8
Notation: Conditionals 
• Alternative choices of message flows 
1. Precede messages with constraints/guards 
• E.g. [userName == name] ……. 
2. Use lettered notation to indicate alternative 
message flows 
• E.g. 2a, 2b; 3a, 3b in the example 
Copyright W. Howden 9
Conditionals Example 
• Used to indicate choices based on specified 
conditions. Either 1a or 1b is done, then 2 is 
done 
1a: [cond] m1() 
Object1 
Object2 
Object3 
1b:[not cond] m2() 
2: m3() 
Object4 
Copyright W. Howden 10 
Object5
Nesting and Sub-Operations 
• Nested inside the response to message m1, 
is the sending of messages m2 then m3, 
done before “returning” from m1 
1: m1() 1.1: m2() 
Object1 Object2 
1.2: m3() 
Object3 
Object4 
Copyright W. Howden 11 
Object5
Compound Conditions 
• How to number structures such as? 
if a then 
if b then {c, d} 
else e 
else g 
• Nested numbering already used up for sub-operation 
nesting so just repeat the 
Copyright W. Howden 12 
condition
2b: [userName=/ name] result :="Not logged on" 
3b: [2a & memberData == null] result = "NotAMember" 
5: [2a & 3a] result = "UpdateMade" 
1: userName = getUserName() 
result = setMemberData 
(name, dateeData) :String 
dL : DomainLogic 
2a: [userName==name] memberData 
= getMemberData(userName) 
4: [2a & 3a] updateMemberData(memberData) 
dB : DataBase 
logOn : LogOn 
3a: [2a & memberData/= null] 
setDateeData(dateeData) 
memberData : MemberData 
Domain (Business) Logic subsystem updates a member's data 
Copyright W. Howden 13
Notation - Names 
• Lower case 
– Specific: objects, messages, instances instances, 
instance variables 
• Upper Case 
– General: Classes, Types, Associations in 
Domain Models 
Copyright W. Howden 14
2b: [userName=/ name] result :="Not logged on" 
3b: [2a & memberData == null] result = "NotAMember" 
5: [2a & 3a] result = "UpdateMade" 
1: userName = getUserName() 
result = setMemberData 
(name, dateeData) :String 
dL : DomainLogic 
2a: [userName==name] memberData 
= getMemberData(userName) 
4: [2a & 3a] updateMemberData(memberData) 
dB : DataBase 
logOn : LogOn 
3a: [2a & memberData/= null] 
setDateeData(dateeData) 
memberData : MemberData 
Domain (Business) Logic subsystem updates a member's data 
Copyright W. Howden 15
Notation - Iteration 
• Use star notation to indicate repetition of a 
message 
– Iterated sequence of messages: match iterated 
conditions, possible ambiguity 
• Stacked icons indicate object collections 
• Additional notation: anonymous objects 
Copyright W. Howden 16
2*: [until result = true or memberData = nil] result = 
match(dR.daterPreferences, memberData.dateeData) 
memberData = execute(): MemberData 
dR : DateRequest : DateMatchExpert 
1*: [until result = true or memberData=nil] memberData = getnext() 
:MemberData 
Copyright W. Howden 17
Notation: Object Creation 
• Diagrams show messages from one object 
to another 
• How to show creation of an object? 
• Notational convention: send it a create 
message 
1: userName = name 
: LogOn 
create(name) 
Copyright W. Howden 18
Discovery of Classes and 
Methods 
• Collaboration Diagrams show objects for 
which we will develop classes 
• Messages that are sent to Classes/Objects 
will be methods in the classes 
Copyright W. Howden 19
Collaboration Diagrams for DS 
• Assume three level design: GUI, DL 
(Business or Domain Logic) and DB (Data 
Base) 
• Assume a single interface class for each 
subsystem: GUI, DL, DB 
• Start with DL 
Copyright W. Howden 20
Domain Logic Classes 
• Start with interface class DomainLogic 
• During construction of collaboration 
diagrams 
– Discover new, needed methods for the class 
– Create new classes/objects needed to help fulfill 
some responsibility 
Copyright W. Howden 21
Domain Logic Event Responses 
• Events/messages to be handled by dL 
(Domain Logic Interface) 
– logOn() 
– getUserType() 
– getCurrentUName() 
• Design choices shown on following 
collaboration diagram 
Copyright W. Howden 22
uT = getUserType():int 1: uT = getUserType() 
dL : DomainLogic 
: LogOn 
1: uN = getCurrentUName(): String Un = getUserName() 
Copyright W. Howden 23 
logOn(name) 
1: create(name) 
2: initialize() 
dL : DomainLogic : LogOn 
dL : DomainLogic 
: LogOn
Expert & Creator Pattern Uses 
– DL creates LogOn because it has the 
initialization data, and records instances of 
LogOn event 
– LogOn will have the information necessary to 
determine user type, so it will be given this 
expert responsibility 
– It has the information necessary to determine 
the name of the logged on user so will have this 
responsibility also 
Copyright W. Howden 24 
11/10/14
More DL Event Responses 
• dL will have to deal with the following 
event/messages 
– getDate() 
– isMemberber() 
– getMemberData() 
• Design Choices shown on following 
diagram 
Copyright W. Howden 25
1: create(userName, daterPrefs) 
2: memberData = execute() 
dateRequest dL : DomainLogic : DateRequest 
1: isMember(name): Boolean 
mD = getDate(userName, daterPrefs) 
: MemberData 
: DataBase 
dL : DomainLogic 
2: [userName = name] 
mD = getMemberData(userName) 
isMember(name): Boolean 
mD = getMemberData(name) 
: MemberData 
dL : DomainLogic : DataBase 
1: UserName = getUserName() 
: LogOn 
Copyright W. Howden 26
Expert and Creator Pattern Uses 
– DL creates LogOn because it has the 
initialization data and records instances of 
LogOn event 
– LogOn will have the information necessary to 
determine user type, so it will be given this 
expert responsibility 
– It has the information necessary to determine 
the name of the logged on user so will have this 
responsibility also 
Copyright W. Howden 27 
11/10/14
More Complex Diagrams 
• Following slide shows dL response to 
setMemberData() event/message 
• Interfaces with both its own subsystem 
classes and other subsystem interface 
Copyright W. Howden 28
2b: [userName=/ name] result :="Not logged on" 
3b: [2a & memberData == null] result = "NotAMember" 
5: [2a & 3a] result = "UpdateMade" 
1: userName = getUserName() 
result = setMemberData 
(name, dateeData) :String 
dL : DomainLogic 
2a: [userName==name] memberData 
= getMemberData(userName) 
4: [2a & 3a] updateMemberData(memberData) 
dB : DataBase 
logOn : LogOn 
3a: [2a & memberData/= null] 
setDateeData(dateeData) 
memberData : MemberData 
Domain (Business) Logic subsystem updates a member's data 
Copyright W. Howden 29
Design Decisions for 
DomainLogic 
• Necessary DomainLogic methods 
– logOn, getCurrentUName, getUserType 
– getDate, isMember, getMemberData 
– setMemberData 
• New objects/classes created 
– LogOn, DateRequest, MemberData 
Copyright W. Howden 30
Designing Subsystem Classes 
• LogOn is one of the classes we decided to 
create inside the DomainLogic subsystem 
• The dL interface class for DL sends 
messages to this class 
• How will it respond to the event/messages it 
must take the responsibility for? 
• Shown in following Collaboration diagrams 
Copyright W. Howden 31
LogOn Class 
1: userName = name 
create(name) 
: LogOn 
1: userName = name 
name = getUserName() 
: LogOn 
Copyright W. Howden 32
If name is in DB set user type to Member 
else set to Unauthorized 
initialize() 
: LogOn 
1: memberData = getMemberData(name) 
eB : DataBase 
1: userType = userType 
userType = getUserType() 
: LogOn 
Copyright W. Howden 33
Design Decisions for LogOn 
• LogOn methods 
– create(name) 
– getUserName() 
– initialize() 
– getUserType() 
Copyright W. Howden 34
DL Design Motivation 
• Where did these objects and these ideas for the 
design come from? 
• 1. Messages sent from GUI 
– GUI collaboration diagrams show GUI will respond to 
user initiated events identified in sequence diagrams 
• 2. Principles of good design 
– 2.1 Design evaluation 
– 2.2 Design patterns 
Copyright W. Howden 35
GUI Classes 
• Start with GUI interface class 
• Collaboration Diagrams 
– Discover needed methods for the class 
– Create new classes/objects needed to help fulfill 
some responsibility 
Copyright W. Howden 36
Collaboration Diagrams 
and User Interface Design 
• Messages are a little different 
– Come from 
• actor actions such as pressing a button 
• other GUI objects which may create them and send 
a message to become visible 
• Following (partial) set of diagrams does not 
deal with case where user is ADMIN 
Copyright W. Howden 37
System 
1a: [Button == End] Exit 
1b: [Button = Start] show() 
: GUIFrame : LogOnDialog 
2: [1b] userType = getUserType() 
dL : DomainLogic 
Start/End Button 
3b: [1b & userType = UNAUTH] 
create(gUI, "Unauthorized") 
4: [1b & userType = UNAUTH] show() 
3a: [1b & userType == MEMBER] show() 
: DaterOptionSelectionDialog 
GUI Frame Presentation Logic 
Copyright W. Howden 38 
: MessageDialog
Design Decisions for GUI 
• New Classes 
– Objects appearing in GUI collaboration model 
• MessageDialog, LogOnDialog, 
DaterOptionSelectionDialog 
– When made visible (with show()) a GUI object 
can respond to events 
• Additional collaboration diagrams will show their 
responses, and additional classes 
Copyright W. Howden 39
More GUI Collaboration 
Diagrams 1 
• Diagrams for Classes that receive 
messages/events from :GUIFrame 
• Shows their responses to events 
– from actors 
– from other GUI objects 
Copyright W. Howden 40
1: setVisible(false) 
: MessageDialog 
OKButton 
Copyright W. Howden 41
: LogOnDialog : DomainLogic 
: TextField 
Copyright W. Howden 42 
OKButton 
3: setVisible(false) 
2: logOn(name) 
1: name = getText
3: setVisible(false) 
setMemberDataButton 
: DaterOptionSelectionDialog 
1: create() 
2: show() 
: SetMemberDataDialog 
Copyright W. Howden 43
6a: [mD /= null] 
create (gUI, mD.name, mD.dateeData) 
7a: [ mD /= null] show() 
8: setVisible(false) 
: DaterOptionSelectionDialog : SelectDateePropsDialog 
6b: [mD == null] create(gUI, "No Date") 
7b: [mD == null] show() 
dL : DomainLogic 
Copyright W. Howden 44 
1: create() 
daterPrefs : DaterPreferences 
: SelectDaterPrefsDialog 
: MessageDialog 
GetADateButton 
4: userName = getUserName() 
5: mD = getDate(userName, 2: create() daterPrefs) 
3: show()
Design Decisions for 
DaterOptionSelectionDialog 
• New Classes for setMemberData message 
– SetMemberDataDialog 
• New Classes for getADateButton message 
– SelectDaterPrefsDialog, MessageDialog, 
SelectDateePropsDialog, DaterPreferences 
Copyright W. Howden 45
More GUI 
Collaboration Diagrams 2 
• Collaboration diagrams for classes 
receiving messages/events from classes that 
receive messages/events from GUIFrame 
– From DaterOptionSelectionDialog 
• setMemberDataButton alternative 
– SetMemberDataDialog 
• getADateButton alternative (only first is shown) 
– SelectDaterPrefsDialog, MessageDialog, 
SelectDateePropsDialog, DaterPreferences 
Copyright W. Howden 46
1:name = nameField.getText() 
nameField : TextField 
2: create() 
3: setGender(genderField.getText()) 
4: setReligion(religionField.getText) 
5: setOccupation(occupationField.getText()) 
6: setEmail(emailField.getText()) 
Copyright W. Howden 47 
7: result = setMemberData 
(name, dateeData) 
10: setVisible(false) 
acceptButton 
: setMemberDataDialog 
dateeData : DateeData 
dl : DomainLogic 
: MessageDialog 
8: create(gUI, result) 
9: show()
1: religionChoice = ListBox.Religion 
3: genderChoice = ListBox.Gender 
2: setReligion(religionChoice) 
4: setGender(genderChoice) 
Copyright W. Howden 48 
EnterButton 
: SelectDaterPrefsDialog 
: DaterPreferences
Design Decisions 
• SetMemberDataDialog 
– New Classes 
• DateeData 
– necessary methods 
• SelectDaterPrefsDialog 
– additional methods for daterPreferences 
• setReligion, setGender 
Copyright W. Howden 49
Additional GUI Diagrams 
• GUIFrame, for full set of functionality, will 
need a branch for UserType = ADMIN 
• This will send a show() message to an 
object called 
– AdminOptionSelectionDialog 
leading to new classes and additional 
collaboration diagrams 
Copyright W. Howden 50
Collaboration vs Sequence 
Diagrams 
• Equivalent: it is possible to transform one kind of 
diagram into the other 
– Rational Rose: automated tool 
• Sequence diagrams: clearly show 
– ordering of messages in time 
– linear interaction structure 
• Collaboration 
– good for free form create of new messages and classes 
during design process 
Copyright W. Howden 51
Assignment 5 
• Construct collaboration diagrams for your 
subsystem interface classes (Phase 1) 
• Construct collaboration diagrams for the 
more complex classes that are created by 
the subsystem interface classes (and more 
complex ones created by them, ....) 
Copyright W. Howden 52

More Related Content

Viewers also liked

Collaboration Diagram
Collaboration DiagramCollaboration Diagram
Collaboration Diagramfahad_uaar
 
Collaboration diagram- UML diagram
Collaboration diagram- UML diagram Collaboration diagram- UML diagram
Collaboration diagram- UML diagram Ramakant Soni
 
7. sequence and collaboration diagrams
7. sequence and collaboration diagrams7. sequence and collaboration diagrams
7. sequence and collaboration diagramsAPU
 
Class, Collaboration, Sequence Diagram of a sample project
Class, Collaboration, Sequence Diagram of a sample projectClass, Collaboration, Sequence Diagram of a sample project
Class, Collaboration, Sequence Diagram of a sample projectNaimul Arif
 
Sequence diagram
Sequence diagramSequence diagram
Sequence diagramRahul Pola
 
Sequence diagram- UML diagram
Sequence diagram- UML diagramSequence diagram- UML diagram
Sequence diagram- UML diagramRamakant Soni
 
The Ultimate Sequence Diagram Tutorial
The Ultimate Sequence Diagram TutorialThe Ultimate Sequence Diagram Tutorial
The Ultimate Sequence Diagram TutorialCreately
 
Uml diagrams
Uml diagramsUml diagrams
Uml diagramsbarney92
 
5.state diagrams
5.state diagrams5.state diagrams
5.state diagramsAPU
 
Uml Presentation
Uml PresentationUml Presentation
Uml Presentationmewaseem
 
Slide 4 Interaction Diagram
Slide 4 Interaction DiagramSlide 4 Interaction Diagram
Slide 4 Interaction DiagramNiloy Rocker
 
Lecture#08 sequence diagrams
Lecture#08 sequence diagramsLecture#08 sequence diagrams
Lecture#08 sequence diagramsbabak danyal
 
Use case Diagram and Sequence Diagram
Use case Diagram and Sequence DiagramUse case Diagram and Sequence Diagram
Use case Diagram and Sequence DiagramNikhil Pandit
 
Use Case Diagram
Use Case DiagramUse Case Diagram
Use Case DiagramKumar
 
Unit i-ooad-notes-revised
Unit i-ooad-notes-revisedUnit i-ooad-notes-revised
Unit i-ooad-notes-revisedPrabhu D
 
Pak Afghan relations
Pak Afghan relationsPak Afghan relations
Pak Afghan relationsAreej Fatima
 

Viewers also liked (20)

Collaboration Diagram
Collaboration DiagramCollaboration Diagram
Collaboration Diagram
 
Collaboration diagram- UML diagram
Collaboration diagram- UML diagram Collaboration diagram- UML diagram
Collaboration diagram- UML diagram
 
7. sequence and collaboration diagrams
7. sequence and collaboration diagrams7. sequence and collaboration diagrams
7. sequence and collaboration diagrams
 
Class, Collaboration, Sequence Diagram of a sample project
Class, Collaboration, Sequence Diagram of a sample projectClass, Collaboration, Sequence Diagram of a sample project
Class, Collaboration, Sequence Diagram of a sample project
 
Sequence diagram
Sequence diagramSequence diagram
Sequence diagram
 
Sequence diagram- UML diagram
Sequence diagram- UML diagramSequence diagram- UML diagram
Sequence diagram- UML diagram
 
The Ultimate Sequence Diagram Tutorial
The Ultimate Sequence Diagram TutorialThe Ultimate Sequence Diagram Tutorial
The Ultimate Sequence Diagram Tutorial
 
Uml diagrams
Uml diagramsUml diagrams
Uml diagrams
 
5.state diagrams
5.state diagrams5.state diagrams
5.state diagrams
 
Uml Presentation
Uml PresentationUml Presentation
Uml Presentation
 
Slide 4 Interaction Diagram
Slide 4 Interaction DiagramSlide 4 Interaction Diagram
Slide 4 Interaction Diagram
 
Lecture#08 sequence diagrams
Lecture#08 sequence diagramsLecture#08 sequence diagrams
Lecture#08 sequence diagrams
 
Use case Diagram and Sequence Diagram
Use case Diagram and Sequence DiagramUse case Diagram and Sequence Diagram
Use case Diagram and Sequence Diagram
 
Use case-diagrams
Use case-diagramsUse case-diagrams
Use case-diagrams
 
UML Diagrams
UML DiagramsUML Diagrams
UML Diagrams
 
Use Case Diagram
Use Case DiagramUse Case Diagram
Use Case Diagram
 
Ch07
Ch07Ch07
Ch07
 
Unit i-ooad-notes-revised
Unit i-ooad-notes-revisedUnit i-ooad-notes-revised
Unit i-ooad-notes-revised
 
34. uml
34. uml34. uml
34. uml
 
Pak Afghan relations
Pak Afghan relationsPak Afghan relations
Pak Afghan relations
 

Similar to Lecture 6 collaboration diagrams

Ddp Cs3.0 Solar System
Ddp Cs3.0 Solar SystemDdp Cs3.0 Solar System
Ddp Cs3.0 Solar Systemboonzaai
 
Material modulo02 asf6501(6425-b_01)
Material   modulo02 asf6501(6425-b_01)Material   modulo02 asf6501(6425-b_01)
Material modulo02 asf6501(6425-b_01)JSantanderQ
 
Mca pro1 online
Mca pro1 onlineMca pro1 online
Mca pro1 onlinerameshvvv
 
Addressing Scenario
Addressing ScenarioAddressing Scenario
Addressing ScenarioTara Hardin
 
M03_1_Structur alDiagrams.ppt
M03_1_Structur                         alDiagrams.pptM03_1_Structur                         alDiagrams.ppt
M03_1_Structur alDiagrams.pptnesarahmad37
 
Unit iii vb_study_materials
Unit iii vb_study_materialsUnit iii vb_study_materials
Unit iii vb_study_materialsgayaramesh
 
Chapter03 Creating And Managing User Accounts
Chapter03      Creating And  Managing  User  AccountsChapter03      Creating And  Managing  User  Accounts
Chapter03 Creating And Managing User AccountsRaja Waseem Akhtar
 
Chapter01 Introduction To Windows Server 2003
Chapter01     Introduction To  Windows  Server 2003Chapter01     Introduction To  Windows  Server 2003
Chapter01 Introduction To Windows Server 2003Raja Waseem Akhtar
 
29041329 interview-questions-for-server-2003
29041329 interview-questions-for-server-200329041329 interview-questions-for-server-2003
29041329 interview-questions-for-server-2003rafiq123
 
Active directory installation windows 2003 1
Active directory installation windows 2003 1Active directory installation windows 2003 1
Active directory installation windows 2003 1tameemyousaf
 
IRJET- Research Paper on Active Directory
IRJET-  	  Research Paper on Active DirectoryIRJET-  	  Research Paper on Active Directory
IRJET- Research Paper on Active DirectoryIRJET Journal
 
How to disassemble one monster app into an ecosystem of 30
How to disassemble one monster app into an ecosystem of 30How to disassemble one monster app into an ecosystem of 30
How to disassemble one monster app into an ecosystem of 30fiyuer
 
Active directory introduction
Active directory introductionActive directory introduction
Active directory introductionTimothy Moffatt
 
Active directory domain services
Active directory domain servicesActive directory domain services
Active directory domain servicesIGZ Software house
 
Introduction to Active Directory
Introduction to Active DirectoryIntroduction to Active Directory
Introduction to Active Directorythoms1i
 

Similar to Lecture 6 collaboration diagrams (20)

Ddp Cs3.0 Solar System
Ddp Cs3.0 Solar SystemDdp Cs3.0 Solar System
Ddp Cs3.0 Solar System
 
Domain Driven Design In C#3.0
Domain Driven Design In C#3.0Domain Driven Design In C#3.0
Domain Driven Design In C#3.0
 
Data flow diagram
Data flow diagramData flow diagram
Data flow diagram
 
Material modulo02 asf6501(6425-b_01)
Material   modulo02 asf6501(6425-b_01)Material   modulo02 asf6501(6425-b_01)
Material modulo02 asf6501(6425-b_01)
 
Mca pro1 online
Mca pro1 onlineMca pro1 online
Mca pro1 online
 
SetFocus Portfolio
SetFocus PortfolioSetFocus Portfolio
SetFocus Portfolio
 
Addressing Scenario
Addressing ScenarioAddressing Scenario
Addressing Scenario
 
M03_1_Structur alDiagrams.ppt
M03_1_Structur                         alDiagrams.pptM03_1_Structur                         alDiagrams.ppt
M03_1_Structur alDiagrams.ppt
 
Unit iii vb_study_materials
Unit iii vb_study_materialsUnit iii vb_study_materials
Unit iii vb_study_materials
 
Chapter03 Creating And Managing User Accounts
Chapter03      Creating And  Managing  User  AccountsChapter03      Creating And  Managing  User  Accounts
Chapter03 Creating And Managing User Accounts
 
Chapter01 Introduction To Windows Server 2003
Chapter01     Introduction To  Windows  Server 2003Chapter01     Introduction To  Windows  Server 2003
Chapter01 Introduction To Windows Server 2003
 
29041329 interview-questions-for-server-2003
29041329 interview-questions-for-server-200329041329 interview-questions-for-server-2003
29041329 interview-questions-for-server-2003
 
Active directory installation windows 2003 1
Active directory installation windows 2003 1Active directory installation windows 2003 1
Active directory installation windows 2003 1
 
Windows server
Windows serverWindows server
Windows server
 
IRJET- Research Paper on Active Directory
IRJET-  	  Research Paper on Active DirectoryIRJET-  	  Research Paper on Active Directory
IRJET- Research Paper on Active Directory
 
How to disassemble one monster app into an ecosystem of 30
How to disassemble one monster app into an ecosystem of 30How to disassemble one monster app into an ecosystem of 30
How to disassemble one monster app into an ecosystem of 30
 
Db2 tutorial
Db2 tutorialDb2 tutorial
Db2 tutorial
 
Active directory introduction
Active directory introductionActive directory introduction
Active directory introduction
 
Active directory domain services
Active directory domain servicesActive directory domain services
Active directory domain services
 
Introduction to Active Directory
Introduction to Active DirectoryIntroduction to Active Directory
Introduction to Active Directory
 

Lecture 6 collaboration diagrams

  • 1. Lecture 6: Collaboration Diagrams Copyright W. Howden 1
  • 2. Context - 1 • Interaction sequence diagrams show: – interactions of actors with the whole system (via the GUI/View layer/subsystem) – interactions between subsystems • illustrates how the GUI/View sends messages to other subsystems, and how they cooperate to perform some responsibility Copyright W. Howden 2
  • 3. Context - 2 • Messages received by subsystems – in our design, messages received by the interface class for a subsystem – corresponds to a method in the interface class (i.e. an instance of it) being executed – corresponds to a task/request/event to which the subsystem must respond Copyright W. Howden 3
  • 4. Context - 3 • Subsystem responses – for each request, we have to design how the subsystem will respond – creation of new subsystem classes to fulfill those responsibilities • design for change • design for intellectual manageability • use design patterns and basic design patterns Copyright W. Howden 4
  • 5. Collaboration Diagrams • Use for subsystem and class design • Will use to show event responses – Event º receiving a message • how should the entity (e.g. subsystem/subsystem-interface) react to this? • Diagrams will show auxiliary objects that we will create as part of the design – leads to definition of new subsystem classes Copyright W. Howden 5
  • 6. Collaboration Diagram Components • Objects • Messages – One object sends a message to another message • Sequencing of messages – various notations can be used here Copyright W. Howden 6
  • 7. 2b: [userName=/ name] result :="Not logged on" 3b: [2a & memberData == null] result = "NotAMember" 5: [2a & 3a] result = "UpdateMade" 1: userName = getUserName() result = setMemberData (name, dateeData) :String dL : DomainLogic 2a: [userName==name] memberData = getMemberData(userName) 4: [2a & 3a] updateMemberData(memberData) dB : DataBase logOn : LogOn 3a: [2a & memberData/= null] setDateeData(dateeData) memberData : MemberData Domain (Business) Logic subsystem updates a member's data Copyright W. Howden 7
  • 8. Message Sequence Notation • Don’t number first message, we are showing how the object responds to this initial event • Complicated situations: – Conditional branching – Nesting of (sub) operations – Compound conditionals Copyright W. Howden 8
  • 9. Notation: Conditionals • Alternative choices of message flows 1. Precede messages with constraints/guards • E.g. [userName == name] ……. 2. Use lettered notation to indicate alternative message flows • E.g. 2a, 2b; 3a, 3b in the example Copyright W. Howden 9
  • 10. Conditionals Example • Used to indicate choices based on specified conditions. Either 1a or 1b is done, then 2 is done 1a: [cond] m1() Object1 Object2 Object3 1b:[not cond] m2() 2: m3() Object4 Copyright W. Howden 10 Object5
  • 11. Nesting and Sub-Operations • Nested inside the response to message m1, is the sending of messages m2 then m3, done before “returning” from m1 1: m1() 1.1: m2() Object1 Object2 1.2: m3() Object3 Object4 Copyright W. Howden 11 Object5
  • 12. Compound Conditions • How to number structures such as? if a then if b then {c, d} else e else g • Nested numbering already used up for sub-operation nesting so just repeat the Copyright W. Howden 12 condition
  • 13. 2b: [userName=/ name] result :="Not logged on" 3b: [2a & memberData == null] result = "NotAMember" 5: [2a & 3a] result = "UpdateMade" 1: userName = getUserName() result = setMemberData (name, dateeData) :String dL : DomainLogic 2a: [userName==name] memberData = getMemberData(userName) 4: [2a & 3a] updateMemberData(memberData) dB : DataBase logOn : LogOn 3a: [2a & memberData/= null] setDateeData(dateeData) memberData : MemberData Domain (Business) Logic subsystem updates a member's data Copyright W. Howden 13
  • 14. Notation - Names • Lower case – Specific: objects, messages, instances instances, instance variables • Upper Case – General: Classes, Types, Associations in Domain Models Copyright W. Howden 14
  • 15. 2b: [userName=/ name] result :="Not logged on" 3b: [2a & memberData == null] result = "NotAMember" 5: [2a & 3a] result = "UpdateMade" 1: userName = getUserName() result = setMemberData (name, dateeData) :String dL : DomainLogic 2a: [userName==name] memberData = getMemberData(userName) 4: [2a & 3a] updateMemberData(memberData) dB : DataBase logOn : LogOn 3a: [2a & memberData/= null] setDateeData(dateeData) memberData : MemberData Domain (Business) Logic subsystem updates a member's data Copyright W. Howden 15
  • 16. Notation - Iteration • Use star notation to indicate repetition of a message – Iterated sequence of messages: match iterated conditions, possible ambiguity • Stacked icons indicate object collections • Additional notation: anonymous objects Copyright W. Howden 16
  • 17. 2*: [until result = true or memberData = nil] result = match(dR.daterPreferences, memberData.dateeData) memberData = execute(): MemberData dR : DateRequest : DateMatchExpert 1*: [until result = true or memberData=nil] memberData = getnext() :MemberData Copyright W. Howden 17
  • 18. Notation: Object Creation • Diagrams show messages from one object to another • How to show creation of an object? • Notational convention: send it a create message 1: userName = name : LogOn create(name) Copyright W. Howden 18
  • 19. Discovery of Classes and Methods • Collaboration Diagrams show objects for which we will develop classes • Messages that are sent to Classes/Objects will be methods in the classes Copyright W. Howden 19
  • 20. Collaboration Diagrams for DS • Assume three level design: GUI, DL (Business or Domain Logic) and DB (Data Base) • Assume a single interface class for each subsystem: GUI, DL, DB • Start with DL Copyright W. Howden 20
  • 21. Domain Logic Classes • Start with interface class DomainLogic • During construction of collaboration diagrams – Discover new, needed methods for the class – Create new classes/objects needed to help fulfill some responsibility Copyright W. Howden 21
  • 22. Domain Logic Event Responses • Events/messages to be handled by dL (Domain Logic Interface) – logOn() – getUserType() – getCurrentUName() • Design choices shown on following collaboration diagram Copyright W. Howden 22
  • 23. uT = getUserType():int 1: uT = getUserType() dL : DomainLogic : LogOn 1: uN = getCurrentUName(): String Un = getUserName() Copyright W. Howden 23 logOn(name) 1: create(name) 2: initialize() dL : DomainLogic : LogOn dL : DomainLogic : LogOn
  • 24. Expert & Creator Pattern Uses – DL creates LogOn because it has the initialization data, and records instances of LogOn event – LogOn will have the information necessary to determine user type, so it will be given this expert responsibility – It has the information necessary to determine the name of the logged on user so will have this responsibility also Copyright W. Howden 24 11/10/14
  • 25. More DL Event Responses • dL will have to deal with the following event/messages – getDate() – isMemberber() – getMemberData() • Design Choices shown on following diagram Copyright W. Howden 25
  • 26. 1: create(userName, daterPrefs) 2: memberData = execute() dateRequest dL : DomainLogic : DateRequest 1: isMember(name): Boolean mD = getDate(userName, daterPrefs) : MemberData : DataBase dL : DomainLogic 2: [userName = name] mD = getMemberData(userName) isMember(name): Boolean mD = getMemberData(name) : MemberData dL : DomainLogic : DataBase 1: UserName = getUserName() : LogOn Copyright W. Howden 26
  • 27. Expert and Creator Pattern Uses – DL creates LogOn because it has the initialization data and records instances of LogOn event – LogOn will have the information necessary to determine user type, so it will be given this expert responsibility – It has the information necessary to determine the name of the logged on user so will have this responsibility also Copyright W. Howden 27 11/10/14
  • 28. More Complex Diagrams • Following slide shows dL response to setMemberData() event/message • Interfaces with both its own subsystem classes and other subsystem interface Copyright W. Howden 28
  • 29. 2b: [userName=/ name] result :="Not logged on" 3b: [2a & memberData == null] result = "NotAMember" 5: [2a & 3a] result = "UpdateMade" 1: userName = getUserName() result = setMemberData (name, dateeData) :String dL : DomainLogic 2a: [userName==name] memberData = getMemberData(userName) 4: [2a & 3a] updateMemberData(memberData) dB : DataBase logOn : LogOn 3a: [2a & memberData/= null] setDateeData(dateeData) memberData : MemberData Domain (Business) Logic subsystem updates a member's data Copyright W. Howden 29
  • 30. Design Decisions for DomainLogic • Necessary DomainLogic methods – logOn, getCurrentUName, getUserType – getDate, isMember, getMemberData – setMemberData • New objects/classes created – LogOn, DateRequest, MemberData Copyright W. Howden 30
  • 31. Designing Subsystem Classes • LogOn is one of the classes we decided to create inside the DomainLogic subsystem • The dL interface class for DL sends messages to this class • How will it respond to the event/messages it must take the responsibility for? • Shown in following Collaboration diagrams Copyright W. Howden 31
  • 32. LogOn Class 1: userName = name create(name) : LogOn 1: userName = name name = getUserName() : LogOn Copyright W. Howden 32
  • 33. If name is in DB set user type to Member else set to Unauthorized initialize() : LogOn 1: memberData = getMemberData(name) eB : DataBase 1: userType = userType userType = getUserType() : LogOn Copyright W. Howden 33
  • 34. Design Decisions for LogOn • LogOn methods – create(name) – getUserName() – initialize() – getUserType() Copyright W. Howden 34
  • 35. DL Design Motivation • Where did these objects and these ideas for the design come from? • 1. Messages sent from GUI – GUI collaboration diagrams show GUI will respond to user initiated events identified in sequence diagrams • 2. Principles of good design – 2.1 Design evaluation – 2.2 Design patterns Copyright W. Howden 35
  • 36. GUI Classes • Start with GUI interface class • Collaboration Diagrams – Discover needed methods for the class – Create new classes/objects needed to help fulfill some responsibility Copyright W. Howden 36
  • 37. Collaboration Diagrams and User Interface Design • Messages are a little different – Come from • actor actions such as pressing a button • other GUI objects which may create them and send a message to become visible • Following (partial) set of diagrams does not deal with case where user is ADMIN Copyright W. Howden 37
  • 38. System 1a: [Button == End] Exit 1b: [Button = Start] show() : GUIFrame : LogOnDialog 2: [1b] userType = getUserType() dL : DomainLogic Start/End Button 3b: [1b & userType = UNAUTH] create(gUI, "Unauthorized") 4: [1b & userType = UNAUTH] show() 3a: [1b & userType == MEMBER] show() : DaterOptionSelectionDialog GUI Frame Presentation Logic Copyright W. Howden 38 : MessageDialog
  • 39. Design Decisions for GUI • New Classes – Objects appearing in GUI collaboration model • MessageDialog, LogOnDialog, DaterOptionSelectionDialog – When made visible (with show()) a GUI object can respond to events • Additional collaboration diagrams will show their responses, and additional classes Copyright W. Howden 39
  • 40. More GUI Collaboration Diagrams 1 • Diagrams for Classes that receive messages/events from :GUIFrame • Shows their responses to events – from actors – from other GUI objects Copyright W. Howden 40
  • 41. 1: setVisible(false) : MessageDialog OKButton Copyright W. Howden 41
  • 42. : LogOnDialog : DomainLogic : TextField Copyright W. Howden 42 OKButton 3: setVisible(false) 2: logOn(name) 1: name = getText
  • 43. 3: setVisible(false) setMemberDataButton : DaterOptionSelectionDialog 1: create() 2: show() : SetMemberDataDialog Copyright W. Howden 43
  • 44. 6a: [mD /= null] create (gUI, mD.name, mD.dateeData) 7a: [ mD /= null] show() 8: setVisible(false) : DaterOptionSelectionDialog : SelectDateePropsDialog 6b: [mD == null] create(gUI, "No Date") 7b: [mD == null] show() dL : DomainLogic Copyright W. Howden 44 1: create() daterPrefs : DaterPreferences : SelectDaterPrefsDialog : MessageDialog GetADateButton 4: userName = getUserName() 5: mD = getDate(userName, 2: create() daterPrefs) 3: show()
  • 45. Design Decisions for DaterOptionSelectionDialog • New Classes for setMemberData message – SetMemberDataDialog • New Classes for getADateButton message – SelectDaterPrefsDialog, MessageDialog, SelectDateePropsDialog, DaterPreferences Copyright W. Howden 45
  • 46. More GUI Collaboration Diagrams 2 • Collaboration diagrams for classes receiving messages/events from classes that receive messages/events from GUIFrame – From DaterOptionSelectionDialog • setMemberDataButton alternative – SetMemberDataDialog • getADateButton alternative (only first is shown) – SelectDaterPrefsDialog, MessageDialog, SelectDateePropsDialog, DaterPreferences Copyright W. Howden 46
  • 47. 1:name = nameField.getText() nameField : TextField 2: create() 3: setGender(genderField.getText()) 4: setReligion(religionField.getText) 5: setOccupation(occupationField.getText()) 6: setEmail(emailField.getText()) Copyright W. Howden 47 7: result = setMemberData (name, dateeData) 10: setVisible(false) acceptButton : setMemberDataDialog dateeData : DateeData dl : DomainLogic : MessageDialog 8: create(gUI, result) 9: show()
  • 48. 1: religionChoice = ListBox.Religion 3: genderChoice = ListBox.Gender 2: setReligion(religionChoice) 4: setGender(genderChoice) Copyright W. Howden 48 EnterButton : SelectDaterPrefsDialog : DaterPreferences
  • 49. Design Decisions • SetMemberDataDialog – New Classes • DateeData – necessary methods • SelectDaterPrefsDialog – additional methods for daterPreferences • setReligion, setGender Copyright W. Howden 49
  • 50. Additional GUI Diagrams • GUIFrame, for full set of functionality, will need a branch for UserType = ADMIN • This will send a show() message to an object called – AdminOptionSelectionDialog leading to new classes and additional collaboration diagrams Copyright W. Howden 50
  • 51. Collaboration vs Sequence Diagrams • Equivalent: it is possible to transform one kind of diagram into the other – Rational Rose: automated tool • Sequence diagrams: clearly show – ordering of messages in time – linear interaction structure • Collaboration – good for free form create of new messages and classes during design process Copyright W. Howden 51
  • 52. Assignment 5 • Construct collaboration diagrams for your subsystem interface classes (Phase 1) • Construct collaboration diagrams for the more complex classes that are created by the subsystem interface classes (and more complex ones created by them, ....) Copyright W. Howden 52