Your SlideShare is downloading. ×
Programming Paradigms Seminar 3
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Saving this for later?

Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime - even offline.

Text the download link to your phone

Standard text messaging rates apply

Programming Paradigms Seminar 3

562
views

Published on


0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
562
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
12
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • If a class depends on upon other classes, to help carry out it’s responsibilities, it will have collaborators written by side the responsibilityIf a card is part of a hierarchy, it may have superclass or subclasses.
  • If a class depends on upon other classes, to help carry out it’s responsibilities, it will have collaborators written by side the responsibilityIf a card is part of a hierarchy, it may have superclass or subclasses.
  • Discovering Candidate ClassesRead Requirements DocumentsUnderline nouns and noun phrasesAdd them to candidate class listBrainstorm to find other potential classesClarifying the ScopeSelecting Core ClassesArchitectural DesignIdentify hot spotsUse appropriate design patternsTake advantage of existing software frameworksEliminate Unnecessary ClassesRemove ghost classesCombine synonyms Distinguish attributes from classes
  • Does it handle everything--Is the ATM responsible for updating accounting records? or just recording and mediating the transaction activity?
  • Limits its scope to banking information capture -- Leaving the user interface, security and actual account update to other systems.
  • Pree definition: Specialization (=adaption) takes place at points of predefined refinement that we call hot spots (Pree,1995, 1996, 1997).Predefine refinement aka the framework of the domain.
  • Hotspot also enables the reuse of the overall system architecture and common code.The Abstract classes of the framework intertwine with hotspots highlighted in grey.
  • http://docs.google.com/viewer?a=v&q=cache:ihjN-VmNNaEJ:citeseerx.ist.psu.edu/viewdoc/download%3Fdoi%3D10.1.1.97.6069%26rep%3Drep1%26type%3Dpdf+hot+spots+driven+approach&hl=en&gl=sg&pid=bl&srcid=ADGEESgC8vV6UzFjxHOKDLqcxcnVf1w-lJnBU13X9N-fsIP1trelhEudmWNpYpGhrfo-CcSlxFokUONDuYqRfajy_KDGuWHJYrU7kBJlVHjSBgHzCNHspTZ5_-rrcBVVgeN_9rrkfESg&sig=AHIEtbSbl7ozvrNrZ8ZTj9GxfgzZoBXpXAhttp://docs.google.com/viewer?a=v&q=cache:L-Yyq-nbVakJ:citeseerx.ist.psu.edu/viewdoc/download%3Fdoi%3D10.1.1.76.4910%26rep%3Drep1%26type%3Dpdf+Wolfgang+pree+Which+aspects+of+the+domain+differ+from+application+to+application%3F&hl=en&gl=sg&pid=bl&srcid=ADGEESgBvu4B0-28tpkoszuKNLtOEoPjFUX36Mqk3AGyln5jDpwqb4NCPFoDIPvcYiyMw247ms-dPWtzz6S3Cz8BsKdv3ThLRyfZ5xllYa5IUACILcS96Lu4FuqLqiEiMHn8tXmR3Xhq&sig=AHIEtbQqPZKDE0evqNqUfZNF2vmG519FRQ
  • After Hotspot has been identified…
  • A framework is a collection of classes--some abstract, some concrete--that captures the architecture and basic operation of an application system. Systems are created by extending the given classes to add the specialized behaviors.
  • Transcript

    • 1. Seminar 3: Making Good Progress
      Programming Paradigms
      [The Paradigms - Group 2]
    • 2. We will always use system analysis and design at the start of every software project.
    • 3.
    • 4. No approaches were taught to derived
    • 5. Knowing an good approach can build a robust system design.
    • 6. Let us learn an approach to do system analysis and design 
    • 7. What is Object-Oriented Analysis & Design?
      7
      Teacher
      Student
      An approach that models a system as a group of interacting objects.
    • 8. New approach to analysis & design
      8
    • 9. CRC Approach
      9
    • 10. What is CRC?
      Class, Responsibility & Collaboration
      Discovering the real world objects is a system
      Mapping the collaboration among classes and their responsibilities
    • 11. Why CRC?
      Uses brainstorming and role-playing to maximize advantages of group work
    • 12. Basics of CRC approach
    • 13. OO Characteristics
      13
    • 14. The things they do
      Their relationship to other classes
    • 15. Back of the card is used list attributes and write class description
      The things they do
      Their relationship to other classes
    • 16. 16
    • 17. QuickCRC 
      17
    • 18. CRC books
      18
    • 19. 19
    • 20. CRC Card
      1. Discovering Candidate Classes
      1. Read Requirements Documents
      2. Clarifying the Scope
      2. Underline nouns and noun phrases.
      3. Selecting Core Classes
      3. Add them to candidate class list.
      4. Brainstorm to find other potential classes.
    • 21. The ATM System will interface with the customer through a display screen , numeric and special input keys, a bankcard reader, a deposit slot, and a receipt printer.
      Customer may make deposits, withdrawals and balance inquires using the ATM machine, but the update of accounts will be handled by an interface to the Accounts system.
      Customers will be assigned a PIN and clearance level by the security system which will be verified prior to transactions.
      We would allow customers to update routine information such as change of address or phone number using the ATM.
      1.Discovering The Candidate Class List
      1. Read Requirements Documents
    • 22. The ATM System will interface with the customer through a display screen , numeric and special input keys, a bankcard reader, a deposit slot, and a receipt printer.
      Customer may make deposits, withdrawals and balance inquires using the ATM machine, but the update of accounts will be handled by an interface to the Accounts system.
      Customers will be assigned a PIN and clearance level by the security system which will be verified prior to transactions.
      We would allow customers to update routine information such as change of address or phone numberusing the ATM.
      1. Discovering The Candidate Class List
      2. Underline nouns and noun phrases.
    • 23. 23
      1. Discovering The Candidate Class List
      Candidate Class List
      3. Add them to candidate class list.
    • 1. Discovering The Candidate Class List
      4. Brainstorm to find other potential classes.
    • 41. 25
      Q: How does the customer access the ATM?
      1. Discovering The Candidate Class List
      4. Brainstorm to find other potential classes.
    • 42. 1.Discovering The Candidate Class List
      Candidate Class List
    • 43. 27
      CRC Card
      1. Read Requirements Documents
      1. Discovering Candidate Classes
      2. Underline nouns and noun phrases.
      2. Clarifying the Scope
      3. Add them to candidate class list.
      3. Selecting Core Classes
      4. Brainstorm to find other potential classes.
    • 44. Clarifying System Scope
      What is and what is not part of the system.
    • 45. Clarifying System Scope
      29
      What is the scope of the ATM system?
      Questions
      Does it handle everything?
      banking application
      user interface
      interactions between them
      Does it..
      updates accounting records?
      records and mediates the transaction activity?
      Other Possible questions
    • 46. Clarifying System Scope
    • 47. 31
      Clarifying System Scope
      The sharper the system boundaries, the easier the evaluation of candidate class list.
    • 48. 32
      CRC Card
      1. Read Requirements Documents
      1. Discovering Candidate Classes
      2. Underline nouns and noun phrases.
      2. Clarifying the Scope
      3. Add them to candidate class list.
      3. Selecting Core Classes
      4. Brainstorm to find other potential classes.
    • 49. Sort Candidate Class List
    • 50. Essential Classes for the application
      4. Selecting Core Classes
    • 51. Class that we are NOT able to categorize without knowing the system boundaries and definition
      4. Selecting Core Classes
      To be Reviewed further for categorization
    • 52. Classes that are outsidethe system scope
      Printer, ScreenSave, and Prompt.
      Related to the user interface subsystem But not to the core banking application
      4. Selecting Core Classes
    • 53. 37
      3. Selecting Core Classes
      Eliminate Unnecessary Classes
      Architectural Design Issues
      1. Identify hot spots
      1. Remove ghost classes
      2. Use appropriate design patterns
      2. Combine synonyms 
      3. Take advantage of existing software frameworks
      3. Distinguish attributes from classes
    • 54. What are Hot Spots?
      A hot spot is a portion of the system that is likely to change from one system variant to another.
    • 55. What are Hot Spots?
      Hot spots encapsulatethe variable aspects within components.
      • Changes will only be made to hot spots
      • 56. Interfaces and the relationships among components will become less prone to changes.
      Aid in designing components where changes is seldom necessary or constraint to a class
    • 57.  Identify Hot Spots
      Identify hot spot by answering:
      • Which aspects of the domain differ fromapplication to application?
      (Help to generate a List of hot spots)
      Let’s apply this question to our ATM domain ...
    • 58. Identify Hot Spots
      Analysis of ATM
      Q: Which aspects of the domain differ fromapplication to application?
      • Withdrawal handling. Why?
      Future
    • 59. Identify hot spots
      Withdrawal handling is a hot spot.
      Initially supports the dispensing of cash; future may require update of cash cards.
      The classes that touch this hot spot include Account, Withdrawal, FundsAvailable, and BankCard.
    • 60. Benefits of Hot Spots
    • 61. 44
      3. Selecting Core Classes
      Eliminate Unnecessary Classes
      Architectural Design Issues
      1. Identify hot spots
      1. Remove ghost classes
      2. Use appropriate design patterns
      2. Combine synonyms 
      3. Take advantage of existing software frameworks
      3. Distinguish attributes from classes
    • 62. Design Patterns
      A design pattern is a design structure that has been successfully used in a similar context
      “No Point Reinventing the Wheel”
      “Reuse and Adapt existing”
    • 63. Design Patterns
      Pioneers have laid out the foundations
      There exist library of patterns
      Apply them to them to the CRC cards
      Speed up analysis
      Application of Design Patterns may result in new classes that are not found during brainstorming
    • 64. “System Interaction Pattern"
      AuthorizeSystemInteraction
    • 65. Example
      AuthorizeSystemInteraction
      Encapsulate Communication between ATM and the bank existing security system
    • 66. Example of Patterns that can be considered
      Clients
      Servers
      Transactions
      Interacting Systems
      Interacting Devices
      Etc…
    • 67. Some Good Pattern Books
    • 68. 51
      3. Selecting Core Classes
      Eliminate Unnecessary Classes
      Architectural Design Issues
      1. Identify hot spots
      1. Remove ghost classes
      2. Use appropriate design patterns
      2. Combine synonyms 
      3. Take advantage of existing software frameworks
      3. Distinguish attributes from classes
    • 69. Framework
      A collection of classes that captures the architecture and basic operation of an application system.
      Systems are created by extending the given classes to add the specialized behaviors.
    • 70. Frameworks are "upside down libraries“.
      System control resides in framework code that calls "down" to user-supplied code.
      A blue print for the implementation
      Framework
    • 71. Example in ATM
      54
      There are many papers on ATM that has been successfully built
      These framework can also be standards that existing ATM follows
    • 72. Part of a Framework
      55
    • 73. 56
      In the event where there is no available framework
      Use design patterns to aid the design and analysis part of the application
    • 74. 57
      3. Selecting Core Classes
      Eliminate Unnecessary Classes
      Architectural Design Issues
      1. Identify hot spots
      1. Remove ghost classes
      2. Use appropriate design patterns
      2. Combine synonyms 
      3. Take advantage of existing software frameworks
      3. Distinguish attributes from classes
    • 75. Remove ghost classes
      Classes that do not fit within the application
      Classes that are related entities but are outside the system.
    • 76. Example
      Printer, and Keypad are relevant but outside the application.
    • 77. 60
      3. Selecting Core Classes
      Eliminate Unnecessary Classes
      Architectural Design Issues
      1. Identify hot spots
      1. Remove ghost classes
      2. Use appropriate design patterns
      2. Combine synonyms 
      3. Take advantage of existing software frameworks
      3. Distinguish attributes from classes
    • 78. Combine synonyms 
      Use a common name for same items
      This situation may arise when different groups within an organization use different names to refer to the same thing.
    • 79. Similarity
      BankCustomerand AccountHolder are probably synonyms.
      Adopt one of them or create a new name.
    • 80. Situation based
      Balance and FundsAvailablemay or may not be different in concepts
      Example:
      A policy of disallowing withdrawals for some period after deposit of a check.
    • 81. Caution!
      Be careful when the same word actually refers to different things!
      New core classes may be needed.
    • 82. 65
      3. Selecting Core Classes
      Eliminate Unnecessary Classes
      Architectural Design Issues
      1. Identify hot spots
      1. Remove ghost classes
      2. Use appropriate design patterns
      2. Combine synonyms 
      3. Take advantage of existing software frameworks
      3. Distinguish attributes from classes
    • 83. Distinguish attributes from classes
      Some candidate classes may turn out to represent information only!
      A candidate class may be an attribute if:
      It does not have any operations
      It does not change
    • 84. Example
      It does not have any operations
      Balance and FundsAvailable
      • Few meaningful operations
      • 85. Closely associated with Account.
    • Example
      Cannot change state
      Consider a PIN. If a PIN is viewed as being immutable, then it probably should be an attribute of Account.
      BUT
      If a PIN can change state (valid, invalid, and suspended), it should be a class.
    • 86. 69
      So what do we have so far?
    • 87. Annotated Candidate Class List
      Critical Classes
      FinancialTransaction
      Account
      BalanceInquiry
      Withdrawal
      Deposit
      AuthorizeSystemInteraction
      BankCard
      Undecided Classes
      BankCustomer(ghost - integrated with AuthorizeSystemInteraction)
      PIN (attribute)
      SavingsAccount(attribute of Account)
      CheckingAccount(attribute of Account)
      ATM (ghost -> system name)
      FundsAvailable(attribute)
      Balance (attribute)
      AccountHolder(synonym)
    • 88. Annotated Candidate Class List
      Irrelevant Items
      Transfer
      Receipt
      ReceiptPrinter
      Keypad
      Screen
      CashDispenser
      ScreenMessage
      Display
      Deposit
      EnvelopeFailure
      TimeOut
      KeyTransaction
      LogPrinter
      ScreenSaver
      Prompt
      Numeric Key
      Key
    • 89. Thank you!
      End of Presentation