Lost object focus

Lost object focus is another manifestation of problems with class definitions. An object's purpose is stated in its class definition (remember, the class definition is more than just the C++ declaration). A class might start with a concise definition, but over time the definition becomes fuzzy or nonexistent. You might also have a reasonable class definition, but one function might not fit in with the rest.

The only solution to this problem is the same as for object bloat: keep a careful eye on the class design and make sure that an object's role remains
well defined. If an object loses focus, you need to modify the design.

This is terribly important. The ability to easily work with any object-oriented system depends on how well the classes are defined. If the classes are clearly delineated, well defined, and self-contained, a developer can treat them as abstractions. The less this is true, the more the developer must treat them as collections of loosely related functions, which increases the complexity. People deal with complexity by inventing abstractions. To help them, make sure that:


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker