A class name that's either a verb or an action noun, such as Locator or Mailer , is one canary in the coal mine. Another is when the extension of a class forces the extension of several other classes. The ZipCodeMap class is a collection of valid zip codes. Resist the temptation to create a special class, LithuanianZipCodeMap , if the only difference between this and other zip code classes is data and some easily parameterized behavior. You require massive numbers of classes Changes made to one class dictate changes in another Extensions made to one class force extensions of others Several seemingly admirable goals can lead to designs with behaviors masquerading as classes.
Many designers attempt to separate data from the behavior that operates on it.
Their goal is to create a set of reusable data and a number of libraries that encapsulate behavior and operate on the data. There's a reason the grouping of data and its behavior into classes is one of the primary tenets of object-oriented design. All behaviors must assume some meaning and structure for the data they use. These semantics prove difficult or impossible to coordinate across many modules. In addition, any modification to the semantics or structure of this data will ripple throughout all of the modules that depend on it.