![]() ![]() What's wrong with this sequence diagram? :Computer :PrintServer :Printer :Queue print(file) print(file) enqueue(file)ġ6 Why not just code it? Sequence diagrams can be somewhat close to the code level. What's wrong with this sequence diagram? (Look at the UML syntax and the viability of the scenario.) What can you say about the control flow of each of the following systems? centralized? distributed? If one sequence diagram is too large or refers to another diagram, indicate it with either: an unfinished arrow and comment a "ref" frame that names the other diagram when would this occur in our system? A sequence diagram describes a pattern of interaction among objects, arranged in a chronological order it shows the objects participating in the interaction by. dashed line loop -> (loop) opt = alt loop Notice that an object created after the start of the scenario appears lower than the others deletion: an X at bottom of object's lifeline Java doesn't explicitly delete objects they fall out of scope and are garbage-collectedĪctivation: thick box over object's life line drawn when object's method is on the stack either that object is running its code, or it is on the stack waiting for another object's method to finish nest to indicate recursion Activation Nestingįrame: box around part of a sequence diagram to indicate selection or loop if -> (opt) if/else -> (alt), separated by horiz. ![]() Message (method call) indicated by horizontal arrow to other object write message name and arguments above arrow dashed arrow back indicates return different arrowheads for normal / concurrent (asynchronous) methodsħ Lifetime of objects creation: arrow with 'new' written above it Participant: an object or entity that acts in the sequence diagram sequence diagram starts with an unattached "found message" arrow message: communication between participant objects the axes in a sequence diagram: horizontal: which object/participant is acting vertical: time (down -> forward in time)ĥ Representing objects squares with object type, optionally preceded by object name and colon write object's name if it clarifies the diagram object's "life line" represented by dashed vert. If you want to learn about the structure of a web framework, I suggest Baruco 2012: Deconstructing the framework, by Gary Bernhardt.Presentation on theme: "UML SEQUENCE DIAGRAM."- Presentation transcript:Ģ UML sequence diagrams sequence diagram: an "interaction diagram" that models a single scenario executing in the system perhaps 2nd most used UML diagram (behind class diagram) relation of UML diagrams to other exercises: CRC cards -> class diagram use cases -> sequence diagrams In practice there should be a router to decide what controller to call, it should not be responsability of the controller to check the role (plus the validation can be much more complex that just a role), there probably should be a presenter, etc. ![]() ![]() They are, first and foremost, for illustration of how to make sequence diagrams. Please do not base your implementation on these diagrams. Restricted Area Controller->-Web Server: Response Note right of Restricted Area Controller: role verified Session Manager->-Restricted Area Controller: Session role Session Manager->+Database: Query session role by session id Restricted Area Controller->+Session Manager: Validate Session (with session id) Note right of Restricted Area Controller: session id taken from cookie Web Server->+Restricted Area Controller: Call Controller Web Server->-Client: Response (cookie with session id)Īnd finally something like this: title Access to Restricted AreaĬlient->+Web Server: Request restricted area (with cookie) Login Controller->-Web Server: Response (cookie with session id) Session Manager->-Login Controller: Unique session id Session Manager->+Database: Insert session id and role Note right of Session Manager: generate unique session id Login Controller->+Session Manager: Create session for role Session Manager->-Login Controller: User valid Note right of Session Manager: Compute hash of Password with salt and compare Session Manager->+Database: Retrieve password hash (and salt) and role by Usernameĭatabase->-Session Manager: Hash (and salt) and role Login Controller->+Session Manager: Validate user Web Server->+Login Controller: Call Controller Then something like this: title Authentication SequenceĬlient->+Web Server: Send Username and Password Web Server->-Client: Response (login form) Login Controller->-Web Server: Response (login form) Web Server->+Login Controller: Call controller You want something like this (code for ): title Login Request You do not have a home page actor, you have a controller. Those should be calls (with activation boxes) that return. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |