Chapter 17. GRASP: Designing Objects with Responsibilities

 

Understanding responsibilities is key to good object-oriented design.

 
 --Martin Fowler

This chapter and the next contribute significantly to an understanding of core OO design (OOD). OOD is sometimes taught as some variation of the following:

  • After identifying your requirements and creating a domain model, then add methods to the appropriate classes, and define the messaging between the objects to fulfill the requirements.

Ouch! Such vague advice doesn't help us, because deep principles and issues are involved. Deciding what methods belong where and how objects should interact carries consequences and should be undertaken ...

Get Applying UML and Patterns: An Introduction to Object-Oriented Analysis and Design and Iterative Development, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.