1 / 31

Sequence Diagrams

Sequence Diagrams. Analysis Paralysis. “Do you want it perfect or do you want it now?”. Watch out for Red Herrings. Faulty Assumptions. In the second lecture we drew up the following detailed specification…

Download Presentation

Sequence Diagrams

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Sequence Diagrams

  2. Analysis Paralysis • “Do you want it perfect or do you want it now?”

  3. Watch out for Red Herrings

  4. Faulty Assumptions • In the second lecture we drew up the following detailed specification… • The consultant sits at their desk with a stack of business cards and flyers. They pick up a business card and start to input the details into system. The first field they enter is the name of the company. While doing this the system looks up the company name to see if it is already on the system. The next field the user enters is the name of the contact. Whilst dong this, the list of contacts for that company is displayed such that if the contact is already on the system the user may move onto another business card. At this point the user should have the opportunity to update the details on the system should they note that some aspect has change e.g. email address.

  5. From this we drew up an initial event table…

  6. Resulting in the following initial use case diagram…

  7. There is a problem • Back to that red herring • If we collected business cards like stamps then yes we would be interested in recording individual cards • What’s more important in our case isn’t the cards but the data they contain • We are interested in business intelligence on the companies and the people they employ • This new insight means we need to re-visit all the other associated documentation!

  8. We Need to Revise the Specification • The consultant sits at their desk with a stack of business cards and flyers. They pick up a business card and start to input the details into system. The user is interested in recording details of the individual and associated company. The first field they enter is the name of the company. While doing this the system looks up the company name to see if it is already on the system. The next field the user enters is the name of the contact. Whilst dong this, the list of contacts for that company is displayed such that if the contact is already on the system the user may move onto another business card. At this point the user should have the opportunity to update the details on the system should they note that some aspect has change e.g. email address.

  9. And the Event Table

  10. And the Use Case Diagram

  11. And Probably the Class Diagram

  12. The Sequence Diagram • Allows us to cross check our use cases and classes • The smoke and mirrors prototype informs this process • Need to think in terms of what classes support our use cases…

  13. Triangulation Class Designs • Not a simple linear process • Things we discover later shed light on what we thought we knew previously Use Cases Sequence Diagram

  14. First go at the Sequence Diagram • Actors • Objects • Life lines • Messages

  15. Important Questions to Ask • Do we have an actor on the use case that matches the sequence diagram?

  16. Important Questions to Ask • Do we have a classes that map to those on the sequence diagram?

  17. Important Questions to Ask • Do we have operations in the classes that are able to handle the messages? • FilterByCompanyName • FilterByCompanyNo

  18. Revise the Class Diagram

  19. So What Data Comes Back? • We may also find clues to the attributes (CompanyName / CompanyNo)

  20. Extending the Sequence Diagram • Can we return list data from one life line to another? • Do we have an operation to support this message?

  21. Revise the Class Diagram

  22. What About Validation?

  23. Modify the Use Case Diagram

  24. 1 1 Has Uses 0..* 1..* Order Order Line Customer Address Attributes Attributes Attributes Attributes Operations Operations Operations Operations Where to Place the Validation Method? • Composition and Aggregation Revisited • Composition • Aggregation

  25. Does this Make sense? • Aggregation or Composition?

  26. This is an Aggregation • This will need extending to include the parameters

  27. The Sequence Diagram

  28. The Use Case Diagram

  29. The Class Diagram

  30. Is it right? • Probably not yet • But we now have a mechanism to cross check one diagram with another

  31. Exercise • Start with an interface component e.g. adding a new record • Plan out the interface on paper • Think about what classes would be required to make this interface work • Have a go at drawing out an initial sequence diagram • Check the triangulation between your use cases and your classes • What use cases / classes might be required

More Related