DOC PREVIEW
Toronto CSC 302 - Lecture 15 - Robustness Analysis

This preview shows page 1-2 out of 7 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

1University of TorontoDepartment of Computer Science© 2008 Steve Easterbrook. This presentation is available free for non-commercial use with attribution under a creative commons license. 1Lecture 15:Robustness AnalysisGood Object Oriented DesignRobustness AnalysisAllocating BehaviourUniversity of TorontoDepartment of Computer Science© 2008 Steve Easterbrook. This presentation is available free for non-commercial use with attribution under a creative commons license. 2Starting PointYou’ve done the Requirements AnalysisYou have:Challenge:Allocate responsibility for the use cases to classes in the systemDocumentDictionaryWordmisspelling1..*Alphabeticcharactercorrect spellingSuggestion list1..*1..*11HasNon-Alphabeticcharacterends1have an automated spelling checkerreduce the number of spelling mistakessave time lookingup words inmy dictionaryhelp me learnto spell better+++++have custom dictionariesspot errorsas I writeallow me toignore mispellingssuggest correctspellingsandwritertechnicalwriterignore amispellingadd wordto dictionaryspell checkas you writespell checkdocumentauto-suggestinvokesA set of Use Cases(explaining how users will use the system)A Domain Model(to keep track of key domain concepts)Stakeholder Goal Models(explaining how the use cases will meet the stakeholders’real needs)2University of TorontoDepartment of Computer Science© 2008 Steve Easterbrook. This presentation is available free for non-commercial use with attribution under a creative commons license. 3Diversion: What’s wrong with this?Job*1Everything ControllergetJC(j:Job) : JobController JobController 1**1University of TorontoDepartment of Computer Science© 2008 Steve Easterbrook. This presentation is available free for non-commercial use with attribution under a creative commons license. 4Or this?CustomerPayPalAccountCreditCardBookstoreclass Bookstore { …void settlebill (int total) { … Customer.PayPalAccount.CreditCard.subtract(total) … }}3University of TorontoDepartment of Computer Science© 2008 Steve Easterbrook. This presentation is available free for non-commercial use with attribution under a creative commons license. 5the Law of DemeterBasically:“Only talk to your friends”More specifically:A method, m, of an object, O, can only call methods of:1. O itself2. m’s parameters3. any object created by m4. O’s direct component objects[m cannot call methods of an object returned by another method call]Programmer’s rule of thumb:“use only one dot”e.g. instead of: Customer.PayPalAccount.CreditCard.subtract(total)use: Customer.GetPayment(total)University of TorontoDepartment of Computer Science© 2008 Steve Easterbrook. This presentation is available free for non-commercial use with attribution under a creative commons license. 6Robustness AnalysisBoundary ObjectsUsed by actors when communicating with the systemOnly these can initiate events(usually widgets on the UI)Entity ObjectsUsually objects from the domain modelThings we need to keep track ofControl ObjectsThe “glue” between boundary objects & entity objectsCapture business rules and policies(note: often implemented as methods of other objects)4University of TorontoDepartment of Computer Science© 2008 Steve Easterbrook. This presentation is available free for non-commercial use with attribution under a creative commons license. 7Why do Robustness AnalysisBridges the gap between Requirements and DesignSanity CheckTests the language in the Use Case descriptionNouns from the Use Case get mapped onto objectsVerbs from the Use Case get mapped onto actionsCompleteness CheckDiscover the objects you need to implement the use casesIdentify alternative courses of actionObject IdentificationDecide which methods belong to which objectsUniversity of TorontoDepartment of Computer Science© 2008 Steve Easterbrook. This presentation is available free for non-commercial use with attribution under a creative commons license. 8Rules for Robustness DiagramsAllowed Not Allowed5University of TorontoDepartment of Computer Science© 2008 Steve Easterbrook. This presentation is available free for non-commercial use with attribution under a creative commons license. 9Intended for the whiteboard…University of TorontoDepartment of Computer Science© 2008 Steve Easterbrook. This presentation is available free for non-commercial use with attribution under a creative commons license. 10ExampleCustomerHome Pageclick loginLogin Pageclick OKDisplay Generatoraccount tablevalidate logingenerate errormessage6University of TorontoDepartment of Computer Science© 2008 Steve Easterbrook. This presentation is available free for non-commercial use with attribution under a creative commons license. 11ICONIX processUniversity of TorontoDepartment of Computer Science© 2008 Steve Easterbrook. This presentation is available free for non-commercial use with attribution under a creative commons license. 12Basic Design Steps7University of TorontoDepartment of Computer Science© 2008 Steve Easterbrook. This presentation is available free for non-commercial use with attribution under a creative commons license. 13Benefits of Robustness Analysis1. Forces a consistent style foruse cases2. Forces correct ‘voice’ for usecases3. Sanity and completenesscheck for use cases4. Syntax rules for use casedescriptionse.g. actors only talk to boundary objects5. Quicker and easier to readthan sequence diagrams6. Encourages use ofModel-View-Controller (MVC)pattern7. Helps build layeredarchitecturese.g presentation layer, domain layer,repository layer8. Checks for reusability acrossuse cases before doingdetailed design9. Provides traceability betweenuser’s view and design view10. Plugs semantic gap betweenrequirements and


View Full Document

Toronto CSC 302 - Lecture 15 - Robustness Analysis

Documents in this Course
Load more
Download Lecture 15 - Robustness Analysis
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture 15 - Robustness Analysis and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture 15 - Robustness Analysis 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?