Object-Oriented Analysis and Design

Conceptual Model

1. Identify candidate concepts in the domain 2. Add associations between concepts 3. Add attributes (not methods)

System Sequence Diagram

Identify external actors and system events. Every system has at least a start() system event. Every system event will result in a Collaboration Diagram.

Collaboration Diagram

A behavioral model - time has meaning. Show the time order of messages being passed between objects.

Design Class Diagram

A structural model - time has no meaning.


General Responsibility Assignment Software Patterns
"that which knows, does"
"do it myself"
"put services with attributes"
put the responsibility to create instances of class A in the class that contains A objects the most, or uses A objects the most
identify a "controller" for each system event, invent a "facade" to separate layers
minimize coupling between classes
maximize cohesion within a class
"all problems in computing science can be solved with one more level of indirection"
Don't talk to strangers
Law of Demeter
don't ask for a reference to a 3rd-party object from a 2nd-party object and then couple yourself to the 3rd-party object   -   instead, ask the 2nd-party object to do something (and it will delegate to the 3rd-party object)
Pure Fabrication
invent new classes to engineer additional abstraction and flexibility
never test the type of an object, and then perform some conditional logic based on that type

Mapping design artifacts to code