Hanselminutes with Scott Hanselman

SOLID Principles with Uncle Bob - Robert C. Martin

21 snips
Jan 5, 2009
Ask episode
AI Snips
Chapters
Transcript
Episode notes
ADVICE

Single Responsibility Principle

  • Separate things that change for different reasons.
  • Group together things that change for the same reasons (Single Responsibility Principle).
INSIGHT

Grouping by Change Reason

  • Grouping by change reason differs from traditional object-oriented design, which groups by data structures.
  • This new approach resembles object-oriented C, where methods in separate files act on a structure.
ADVICE

Naming Objects

  • Smaller, focused objects are easier to name than large, multipurpose objects.
  • Use specific names like 'EmployeeReportGenerator' instead of generic names like 'EmployeeManager'.
Get the Snipd Podcast app to discover more snips from this episode
Get the app