4 ms·
That's interesting. I think classes are supposed to have a single responsibility according to S.O.L.I.D so it seems to make sense to have a lot of them.
by jon_kuperman 13y ago
That's interesting. I think classes are supposed to have a single responsibility according to S.O.L.I.D so it seems to make sense to have a lot of them.
- informatimago 13y agoDepends on how many. I would say that a module should contain at most about 35 classes. Of which, about 3 belong to the module interface. So you may have a layer of about ten modules (again this gives about 30 public classes), before you need to abstract away another level of module. Unformtunately what we observe in the field is rather thousands of classes unstructured, and the least operation requiring using and combining ten if not more classes, with no abstraction.