What Makes A Good Object-Oriented Design?Source: comp.object
Jeff Yarnell asked:
I'm reviewing an object-oriented design for what I consider a complex application. What are some characteristics of good designs? When looking at class or object interaction diagrams, what are signs of inefficient, inflexible designs?
Tim Ottinger replied:
See the paper on the principles of object oriented design at our web site. It will help you to spot poor uses of inheritance and poor dependency structures, among other kinds of design errors.
[The thumbnails for the principles in this paper are:
Also look for good things.
Look for simplicity. If you don't have it, make sure that there are reasons that more complexity was exposed. Accept good answers, but only good answers.
I have tried from time to time to come up with a theory of "needless contrivance" where you can recognize the the difficulty of using an interface that the interface is inappropriate, and in what way. I guess what I'm saying is that if you see a design with a lot of "patching up around the edges" then the problem isn't the edges: its the core.
A less formal way of saying it is "If it seems like you're swimming against the stream, consider that perhaps you are." Or "don't force it".
Jan K. Marek added:
Arthur Riel published an interesting book
Object-Oriented Design Heuristics. The book contains about 50 heuristics to
follow when using OO in the design phase - e.g. 'Do not create god
classes/objects in your design', 'Do not change the state of an object
without going through its public interface', 'All abstract classes must
be base classes', 'All base classes should be abstract'.
OOD Principles by Robert C. Martin:
(Contains pointers to the original sources for many of these principles)