CSC/ECE 517 Fall 2012/ch2a 2w23 sr: Difference between revisions
No edit summary |
|||
Line 21: | Line 21: | ||
Initially hide the distinction between data and behavior. | Initially hide the distinction between data and behavior. | ||
Think of objects responsibilities for “knowing”, “doing”,and “deciding” | Think of objects responsibilities for “knowing”, “doing”,and “deciding”. | ||
* Distribute Behavior | * Distribute Behavior | ||
Line 27: | Line 27: | ||
Promote a delegated control architecture. | Promote a delegated control architecture. | ||
Make objects | Make objects smart—-have them behave intelligently, not just hold bundles of data. | ||
*Preserve Flexibility | *Preserve Flexibility | ||
Design objects so interior details can be readily changed | Design objects so interior details can be readily changed. | ||
== Advantages == | == Advantages == |
Revision as of 00:03, 27 October 2012
Responsibility-Driven Design
Introduction
Object-oriented programming(OOP) language enable software to be reusable, refinable, testable, maintainable, and extensible by supporting encapsulation. In order to realize these advantages, encapsulation should be maximized during the design process. other techniques attempt to enforce encapsulation during the implementation phase. This is too late in the software life-cycle to achieve maximum benefits.
Responsibility-driven design(RRD) is an alternate design method to focus on increasing the encapsulation by viewing a program in terms of the client/server model.<ref>http://dl.acm.org/citation.cfm?doid=74877.74885 Object-oriented design: a responsibility-driven approach</ref> This method was proposed by Rebecca Wirfs-Brock and Brian Wilkerson.
Definition
RRD is defined as follows:
Responsibility-driven design is inspired by the client/server model. It focuses on the contract by asking:
- What actions is this object responsible for?
- What information does this object share?<ref>1</ref>
Client-server model
The goal of responsibility-driven design is to improve encapsulation. It does so by viewing a program in terms of the client/server model.
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.
Advantages
Disadvantages
Comparison
Conclusion
References
<references/>