Presentation is loading. Please wait.

Presentation is loading. Please wait.

Observations so far…. In general… There are two ways to design a software system –Centralized control One “driver” function that contains the entire algorithm.

Similar presentations


Presentation on theme: "Observations so far…. In general… There are two ways to design a software system –Centralized control One “driver” function that contains the entire algorithm."— Presentation transcript:

1 Observations so far…

2 In general… There are two ways to design a software system –Centralized control One “driver” function that contains the entire algorithm and makes a lot of function calls to support –Distributed control The algorithm is split across many objects

3 Control Centralized –Easy to design –Easy to read (reverse engineer) –Easy to implement and debug –Hard to change/update (changes are not always localized) Distributed –Hard to design –Hard to read (reverse engineer) –Hard to implement and debug –Easy to change (changes are usually localized) My guess is that most (all?) of you are thinking centralized

4 Sequence Diagrams Chapter 4

5 Sequence Diagram The Sequence Diagram represents the collaborative nature of the design –The communication/cooperation between objects –Note these are not “static” relationships (those are in class diagrams) –Note these are relationships between objects (instantiations) not classes

6 Sequence Diagram Shows messages that are passed among objects over a period of time The time period covered is typically that of a single scenario (instantiated Use Case) They don’t show algorithmic behaviors to well –There are artifacts for loops and conditional statements but they lack detail

7 Sequence Diagram object (participant) loop deletion found message message with parameters message life line activation return self deletion Time

8 Loops and Conditionals Merely an indicator of what is going on –There is [typically] not enough detail for implementation loop [for each object] alt [amount < $10] [else] opt [amount < $10] parregion for/while/do if/else/switch if parallel critical region

9 Synchronous/asynchronous messages Messages can be synchronous –Sender waits until the receiver is finished processing the message Messages can be asynchronous –Sender proceeds while the receiver processes the message

10 Sequence Diagrams This diagram is going to help you “arrange” your objects One classic issue in object-oriented programming is accessibility –“I need this object to send a message to that one but there is not direct link between them – guess I’ll just make a global variable” With a legitimate design effort you should be able to avoid that situation

11 Deliverables Sequence Diagrams –First draft Revised Class Diagram Now is a good time to begin writing code


Download ppt "Observations so far…. In general… There are two ways to design a software system –Centralized control One “driver” function that contains the entire algorithm."

Similar presentations


Ads by Google