I follow the thought: 1 Class = 1 Job
.
Using a Physiology Analogy: Motor (Neural System), Respiration (Lungs), Digestive (Stomach), Olfactory (Observation), etc. Each of these will have a subset of controllers, but they each only have 1 responsibility, whether its to manage the way each of their respective subsystems works or whether they are an end-point subsystem and perform only 1 task, such as lifting a finger or growing a hair-follicle.
Don't confuse the fact that it may be acting as a manager instead of a worker. Some worker's eventually get promoted to Manager, when the work they were performing has become too complicated for one process to handle by itself.
The most complicated part of what i have experienced, is knowing when to designate a Class as an Operator, Supervisor, or Manager process. Regardless, you will need to observe and denote its functionality for 1 responsibility (Operator, Supervisor, or Manager).
When a Class/Object performs more than 1 of these type roles, you will find that the overall process will start having performance issues, or process bottle-necks.
SRP
is currently viciously abused to convertOOP
intofunctional programming
. Building a separate class for a single simple method that always acts against a single class type object is doing it wrong IMO. You put that stray method in the class where it belongs. SRP is too often for my taste functional programming under the guise of OOP. And smack a fancy acronym (that nobody can actually define) on it... to make it marketable. – CodeAngry Dec 18 '14 at 14:28