User:Jeroen De Dauw/Single Responsibility Principle/10

From semantic-mediawiki.org
Jump to: navigation, search
Jeroen De DauwJeroen De Dauw/Single Responsibility PrincipleUser:Jeroen De Dauw/Single Responsibility Principle/10

The single responsibility principle

Wrapping up

  • SRP decreases complexity
  • SRP decreases tight coupling
  • SRP makes code easier to understand, use and test
  • SRP increases flexibility
  • SRP decreases time spend on making changes (ie ~80% of dev time)
  • Think UNIX: each component does a single thing and does it well
  • If your class description includes "and", you are probably violating SRP
  • If it includes "all" or "everything", I will throw things at you