Object Design: Roles, Responsibilities, and Collaborations

Book description

If you create software using object-oriented languages and tools, then Responsibility-Driven Design has likely influenced your work. For over ten years Responsibility-Driven Design methodology has been the standard bearer of the behavioral approach to designing object-oriented software. Object Design: Roles, Responsibilities, and Collaborations focuses on the practice of designing objects as integral members of a community where each object has specific roles and responsibilities. The authors present the latest practices and techniques of Responsibility-Driven Design and show how you can apply them as you develop modern object-based applications.

Working within this conceptual framework, Rebecca Wirfs-Brock and Alan McKean present how user requirements, system architecture, and design patterns all contribute to the design of an effective object model. They introduce a rich vocabulary that designers can use to discuss aspects of their designs, discuss design trade-offs, and offer practical guidelines for enhancing the reliability and flexibility of applications. In addition, case studies and real-world examples demonstrate how the principles and techniques of Responsibility-Driven Design apply to real-world software designs.

You'll find coverage of such topics as:

  • Strategies for selecting and rejecting candidate objects in an emerging design model

  • Object role stereotypes and how to identify objects' behaviors

  • How to characterize objects using role stereotypes

  • Allocating responsibilities to appropriate objects

  • Developing a collaboration model

  • Strategies for designing application control centers

  • Documenting and describing a design, focusing on use cases, design conversations, and annotations

  • Strategies for enhancing reliability, including handling exceptions and recovering from errors

  • How to characterize software variations and design to support them for greater flexibility

  • How to categorize and treat various kinds of design problems

  • As all experienced designers know, software design is part art and inspiration and part consistent effort and solid technique. Object Design: Roles, Responsibilities, and Collaborations will help all software designers--from students to seasoned professionals--develop both the concrete reasoning skills and the design expertise necessary to produce responsible software designs.


    Table of contents

    1. Copyright
    2. Foreword
    3. Foreword
    4. Preface
      1. How To Read This Book
      2. Acknowledgments
        1. Rebecca’s Acknowledgments
        2. Alan’s Acknowledgments
    5. 1. Design Concepts
      1. Object Machinery
      2. Roles
      3. Object Role Stereotypes
      4. Roles, Responsibilities, and Collaborations
      5. Object Contracts
        1. Conditions-of-Use and Aftereffect Guarantees
      6. Domain Objects
      7. Application-Specific Objects
      8. Interfaces
      9. Classes
        1. Two Roles
      10. Composition
      11. Inheritance
      12. Object Organizations
      13. Components
      14. Patterns
        1. Applying Double Dispatch to a Specific Problem
          1. A Solution
          2. A Better Solution
          3. The Double Dispatch Pattern
        2. The Real Benefits of Using Patterns
      15. Frameworks, Inc.
      16. Architecture
      17. Architectural Styles
        1. Centralized Control Style
        2. Dispersed Control: No Centers
        3. Delegated Control
        4. Examining Interactions: A Layered Architecture Example
        5. Locating Objects in Layers
      18. Design Description
      19. Summary
      20. Further Reading
    6. 2. Responsibility-Driven Design
      1. A Process for Seeing, Describing, and Designing
        1. Launching the Production: Project Definition and Planning
        2. Setting the Stage: Early Description
        3. Staging the Production: Design
        4. “Seeing” from Multiple Perspectives
      2. Writing the Script: Analysis Descriptions
        1. Usage Descriptions
          1. Actors and Their View of Our System
          2. Use Cases
          3. A Word Processor Example
          4. Scenarios
          5. Conversations
          6. Adding Detail
          7. Alternatives, Annotations, and Other Specifications
          8. Exceptional Actions
          9. Business and Application Policies
          10. Design Notes
        2. Other Specifications
        3. Glossaries
        4. Conceptual Objects
          1. Concentrating on the Core
          2. Document
          3. Page
          4. Paragraph
          5. Spell Checker
      3. Casting the Characters: Exploratory Design
        1. CRC Cards
        2. Inventions: Using Patterns
        3. Pursuing a Solution
        4. Bouncing Between Ideas and Details
      4. Tuning the Production: Design Refinement
        1. Determining Collaboration and Control Styles
        2. Designing to Support User Variations
        3. Designing for Flexibility and Extension
        4. Designing for Reliability
        5. Making Our Design Predictable, Consistent, and Comprehensible
      5. Summary
      6. Further Reading
    7. 3. Finding Objects
      1. A Discovery Strategy
      2. Looking for Objects and Roles, and Then Classes
      3. Why Tell a Design Story?
      4. Search Strategies
      5. What’s in a Name?
      6. Describing Candidates
      7. Characterizing Candidates
      8. Connecting Candidates
      9. Looking for Common Ground
      10. Defend Candidates and Look for Others
      11. SUMMARY
    8. 4. Responsibilities
      1. What Are Responsibilities?
      2. Where Do Responsibilities Come From?
      3. Strategies for Assigning Responsibilities
        1. Recording Responsibilities
        2. Making Initial Assignments
        3. Getting Unstuck
      4. Implementing Objects and Responsibilities
        1. An Object Can Play Multiple Roles
        2. Designing Methods and Signatures That Support Responsibilities
      5. Testing Your Candidates’ Quality
      6. Summary
      7. Further Reading
    9. 5. Collaborations
      1. What Is Object Collaboration?
        1. Preparing for Collaboration
        2. Recording Candidate Collaborations
      2. The Design Story for the Speak for Me Software
      3. Collaboration Options
        1. Who’s In Control?
        2. How Much Should Objects Trust One Another?
      4. Strategies for Identifying Collaborations
        1. Looking at an Individual Object’s Role: Stereotypes Imply Collaborations
          1. Information Holders
          2. Structurers
          3. Service-Providers
          4. Controllers
          5. Coordinators
          6. Interfacers
        2. Looking at Individual Responsibilities: They Imply Collaborations
        3. Designing the Details of a Complex Responsibility
        4. Designing Collaborations for a Specific Task
        5. Identifying Applicable Patterns
        6. Identifying How Architecture Influences Collaborations
        7. Solving Problems in Collaborations
      5. Simulating Collaborations
        1. Planning a Simulation
        2. Running a Simulation
      6. Designing Good Collaborations
        1. The Law of Demeter: A Case Study
      7. Making Collaborations Possible
        1. Guidelines for Making Connections
        2. Designing Reliable Collaborations
      8. When Are We Finished?
      9. Summary
      10. Further Reading
    10. 6. Control Style
      1. What Is Control Style?
      2. COntrol Style Options
      3. Making Trade-Offs
        1. Centralizing Control
        2. Delegating Control
        3. The Limits of Control Decisions
      4. Developing Control Centers
      5. A Case Study: Control Style for External User Events
        1. Centralizing Control in the MessageBuilder
          1. Refactoring Decision Making into Small Controllers
        2. Refactoring Decision Making into State Methods within the MessageBuilder
        3. Abstracting Away Decisions
        4. Delegating More Responsibility
        5. Designing the Control Style for the Guessing Neighborhood
        6. Designing a Similar Control Center: Can We Be Consistent?
      6. Summary
    11. 7. Describing Collaborations
      1. Telling Collaboration Stories
      2. A Strategy for Developing a Collaboration Story
      3. Establishing Scope, Depth, and Tone
      4. Listing What You Will Cover
      5. Deciding on the Level of Detail
        1. Showing a Bird’s-Eye View
        2. Showing Collaborators Only
        3. Showing a Sequence of Interactions Among Collaborators
        4. Showing an In-Depth View
        5. Showing a Focused Interaction
        6. Showing an Implementation View
        7. Showing How to Adapt a Collaboration
        8. Where UML Diagrams Fall Short
      6. Choosing the Appropriate Form
      7. Tell It, Draw It, Describe It: Guidelines
      8. Organizing Your Work
        1. Adding Emphasis
        2. Unfolding Your Story
        3. Understanding What’s Fundamental
        4. Putting It All Together
      9. Preserving Stories
      10. Summary
      11. Further Reading
    12. 8. Reliable Collaborations
      1. Understanding the Consequences of Failure
      2. Increasing Your System’s Reliability
      3. Determining Where Collaborations Can Be Trusted
        1. Trusted Versus Untrusted Collaborations
        2. Implications of Trust
      4. Identifying Collaborations To Be Made Reliable
        1. What Use Cases Tell Us
        2. Distinguish Between Exceptions and Errors
        3. Object Exceptions Versus Use Case Exceptions
        4. Object Exception Basics
        5. Exception- and Error-Handling Strategies
        6. Determining Who Should Take Action
          1. Asking the Client to Check Before Making a Request
          2. Giving the Client Some Responsibility for Recovery
          3. Giving the Service Provider Some Responsibility for Recovery
      5. Designing A Solution
        1. Brainstorm Exception Conditions
        2. Limit Your Scope
        3. Record Exception-Handling Policies
      6. Documenting Your Exception-Handling Designs
        1. Specifying Formal Contracts
      7. Reviewing Your Design
      8. Summary
      9. Further Reading
    13. 9. Flexibility
      1. What Does It Mean to Be Flexible?
      2. Degrees of Flexibility
      3. The Consequences of a Flexible Solution
      4. Nailing Down Flexibility Requirements
      5. Recording Variations
      6. Variations and Realizations
        1. Identifying the Impact of a Variation
        2. Exploring Strategies for Realizing Flexibility
        3. Using Templates and Hooks to Support Variations
      7. The Role of Patterns in Flexible Designs
        1. Varying an Object’s Behavior with the Strategy Pattern
        2. Hiding Interacting Objects with Mediator
        3. Making a Predefined Object or System Fit Using Adapter
        4. How Do Patterns Increase Flexibility?
      8. How to Document a Flexible Design
        1. Consider Your Audience
        2. Describing How to Make a Variation
      9. Changing a Working System’s Design
      10. Summary
      11. Further Reading
    14. 10. On Design
      1. The Nature of Software Design
      2. Tackling Core Design Problems
      3. Frame the Problem
      4. Dealing with Revealing Design Problems
        1. A Story About Managing Shared Information
        2. A Story About Connection Problem Complexity
        3. A Story About a Design Problem That Never Got Easier
        4. Can Revealing Problems Be Wicked, Too?
      5. Strategies for Solving Revealing Problems
        1. Redefining the Problem
        2. Synthesizing a Solution
      6. Working on the Rest
      7. Designing Responsibly
      8. Further Reading
    15. Bibliography

    Product information

    • Title: Object Design: Roles, Responsibilities, and Collaborations
    • Author(s):
    • Release date: November 2002
    • Publisher(s): Addison-Wesley Professional
    • ISBN: 9780201379433