3 ms·
> Single Responsibility Principle Too many Java programmers take the SRE too far, IMO. If you have a class that only has a single function, then it probably s
by Sohcahtoa82 7y ago
> Single Responsibility Principle
Too many Java programmers take the SRE too far, IMO.
If you have a class that only has a single function, then it probably should be a function, not a whole class.
To give an example that I've seen, I've seen code with classes named UserGetter, UserCreator, UserDeleter, etc. All of these should have just been bundled up into a single User class.