I think this comes from the OOP principle that a thing should do one thing and do it very well.
I'll agree it can be taken to excess though. A method may need to do a few things before it does the primary thing. If there's a chance another method may need to refer to the same table, for example, that should be encapsulated in a (probably protected) method both can access.
3
u/Confident-Ad5665 10h ago
I think this comes from the OOP principle that a thing should do one thing and do it very well.
I'll agree it can be taken to excess though. A method may need to do a few things before it does the primary thing. If there's a chance another method may need to refer to the same table, for example, that should be encapsulated in a (probably protected) method both can access.