Monday, January 22, 2007

IA: Coupling and Cohesion

Low Coupling
  • Interdependency between methods and their environment
  • Goal:
    • Minimize attribute visibility
    • Keep it low for maintainability

High Cohesion

  • Coupling is a "system wide" phenomenon
    • Objective is NOT to have class "linked" unnecessarily
  • Cohesion is a "single class" phenomenon
    • Objective is to have each class "limited and focused"
    • Internally cohesive, contains everything that is relevant to itself, and doesn't have things that are irrelevant.

No comments: