You are previewing Growing Object-Oriented Software, Guided by Tests.

Growing Object-Oriented Software, Guided by Tests

Cover of Growing Object-Oriented Software, Guided by Tests by Steve Freeman... Published by Addison-Wesley Professional

Chapter 2. Test-Driven Development with Objects

Music is the space between the notes.

—Claude Debussy

A Web of Objects

Object-oriented design focuses more on the communication between objects than on the objects themselves. As Alan Kay [Kay98] wrote:

The big idea is “messaging” [...] The key in making great and growable systems is much more to design how its modules communicate rather than what their internal properties and behaviors should be.

An object communicates by messages: It receives messages from other objects and reacts by sending messages to other objects as well as, perhaps, returning a value or exception to the original sender. An object has a method of handling every type of message that it understands and, in most cases, encapsulates ...

The best content for your career. Discover unlimited learning on demand for around $1/day.