Objects: the Traditional View and the New View

The traditional view of objects is that they are data with methods. One of my teachers called them “smart data.” It is just a step up from a database. This view comes from looking at objects from an implementation perspective.

While this definition is accurate, as explained in Chapter 1, “The Object-Oriented Paradigm,” it is based on the implementation perspective. A more useful definition is one based on the conceptual perspective—an object is an entity that has responsibilities. These responsibilities give the object its behavior. Sometimes, I also think of an object as an entity that has specific behavior.

This is a better definition because it helps to focus on what the objects are supposed to ...

Get Design Patterns Explained: A New Perspective on Object-Oriented Design 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.