Hall of fame
This page is an attempt to make sense of the overwhelming morass of OOD advice by classifying it by how valuable we consider it to be.
We the people hold these things to be absolute and inviolable laws of OO design. Anyone breaking these maxims should be publically mocked and made to program in COBOL forevermore.
- Goto considered harmful
- Don't repeat yourself
- Program to the interface not the implementation
- Keep accessors and mutators separate/ Avoid side effects
Most excellent ideas
Everybody should know about these & try to follow them. Any exceptions need convincing justification.
- Design by contract
- Liskov substitution principle
- Behavioral completeness
- Information hiding
- Don't expose mutable attributes
General knowledge that identifies forces that should normally be taken into consideration.
- Design patterns
- Keep it simple (beginners probably often violate this one, therefore it should be one of the most important ideas)
Debatable propositions. Might help in some cases, but not everyone agrees.
These are wrong. Following this advice will make your designs worse.