“A class should have one, and only one, reason to change.” - Uncle Bob
The single responsibility principle asserts that every class should have exactly one responsibility. In other words, each class should be concerned about one unique nugget of functionality, whether it be User
, Post
or InvitesController
. The objects instantiated by these classes should be concerned with sending and responding to messages pertaining to their responsibility and nothing more.