Prashant Mhatre

Make Money, Programming, Bollywood, Marathi

  • You are here: 
  • Home
  • Object-Oriented Design Heuristics

Object-Oriented Design Heuristics

Posted on March 1st, 2008

    Object Oriented Design Thumb Rules

  1. All data should be hidden within its class.
  2. Users of a class must be dependent on its public interface, but a class should not be dependent on its users.
  3. Minimize the number of messages in the protocol of a class.

  4. -- Sponsored Links --


  5. Implement a minimal public interface that all classes understand [e.g., operations such as copy (deep versus shallow), equality testing, pretty printing, parsing from an ASCII description, etc.].
  6. Do not put implementation details such as common-code private functions into the public interface of a class.
  7. Do not clutter the public interface of a class with things that users of that class are not able to use or are not interested in using.
  8. Classes should only exhibit nil or export coupling with other classes, that is, a class should only use operations in the public interface of another class or have nothing to do with that class.
  9. A class should capture one and only one key abstraction.
  10. Keep related data and behavior in one place.
  11. Spin off non related information into another class (i.e., non communicating behavior).
  12. Be sure the abstractions that you model are classes and not simply the roles objects play.

-- Sponsored Links --


Object-Oriented Design Heuristics By Arthur J. Riel

Filed under Programming |

Comments are closed.