Responsibility

Responsibility - c s 2 3 4 0:R e s p o ns ib ility Drive...

Info iconThis preview shows pages 1–13. Sign up to view the full content.

View Full Document Right Arrow Icon
Responsibility Driven Design 1 c s 2340: Re s po ns ib ility-Drive n De s ig n Spring 2009 Several slides are adapted from Rebecca Wirfs-Brock and Associates
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Responsibility Driven Design 2 From Analysis to Design Refine Domain Objects with Roles and Responsibilities Create Architecture Add Application Objects Add Utility Objects Refine Collaborations Refine Object Contracts Design Exception Handling Mechanisms
Background image of page 2
Responsibility Driven Design 3
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Responsibility Driven Design 4 OOA
Background image of page 4
Responsibility Driven Design 5 Goal of RDD To move from thinking about objects as  data + algorithms to thinking about  objects as roles + responsibilities
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Responsibility Driven Design 6 Lets Design a Horse!! Data-Driven Procedural Event-Driven Responsibility-Driven
Background image of page 6
Responsibility Driven Design 7 Responsibility-Driven Design Principles Maximize Abstraction Initially hide the distinction between data and behavior. Think of objects responsibilities for “knowing”, “doing”,and “deciding” Distribute Behavior Promote a delegated control architecture Make objects smart— have them behave intelligently, not just hold bundles of data Preserve Flexibility Design objects so interior details can be readily changed
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Responsibility Driven Design 8 RDD Constructs an application = a set of interacting objects an object = an implementation of one or more roles a role = a set of related responsibilities a responsibility = an obligation to perform a task or know information a collaboration = an interaction of objects or roles (or both) a contract = an agreement outlining the terms of a collaboration
Background image of page 8
Responsibility Driven Design 9 Two Ways to Think About Roles Primary - Responsibilities that make an object unique Secondary – Responsibilities that allow an object to fit into the community of cooperating objects.
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Responsibility Driven Design 10 Role Stereotypes Controller (direct activities) Coordinator (delegates work) Structurer (maintain relationships) Information Holder (keep facts) Service Provider (perform operation) Interfacer (support internal/external communication)
Background image of page 10
Responsibility Driven Design 11 Stereotype Examples ATM Machine: SessionController (Controller) Word Processor : FontManager (Coordinator) File System : Folder (Structurer) Pay System: Employee (Information Holder) Pay System: PayReport (Service Provider) ATM Machine: CashDispenser (Interfacer)
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
12 More on Roles Represent how we view the object from outside looking in Dynamic during early design Use to what-if? active vs. passive?
Background image of page 12
Image of page 13
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 66

Responsibility - c s 2 3 4 0:R e s p o ns ib ility Drive...

This preview shows document pages 1 - 13. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online