Key Points

  • Class interfaces should provide a consistent abstraction. Many problems arise from violating this single principle.

  • A class interface should hide something—a system interface, a design decision, or an implementation detail.

  • Containment is usually preferable to inheritance unless you're modeling an "is a" relationship.

  • Inheritance is a useful tool, but it adds complexity, which is counter to Software's Primary Technical Imperative of managing complexity.

  • Classes are your primary tool for managing complexity. Give their design as much attention as needed to accomplish that objective.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.224.44.53