Skip to content

Latest commit

 

History

History
13 lines (11 loc) · 533 Bytes

README.md

File metadata and controls

13 lines (11 loc) · 533 Bytes

Object-Oriented Design

  • Avoid global variables.
  • Avoid long parameter lists.
  • Limit dependencies of an object (entities an object depends on).
  • Limit an object's dependents (entities that depend on an object).
  • Prefer composition over inheritance.
  • Prefer small methods. Between one and five lines is best.
  • Prefer small classes with a single, well-defined responsibility. When a class exceeds 100 lines, it may be doing too many things.
  • Tell, don't ask.