10 ms·
Same thing here: small classes, a lot of them with a single method. Some state but usually immutable (besides other services, stuff like "password" and "base pa
by mdpopescu 10y ago
Same thing here: small classes, a lot of them with a single method. Some state but usually immutable (besides other services, stuff like "password" and "base path"). A huge amount of composition.
I've had people object to this design: I simplify the classes too much so as a result, I have too many of them. I disagree with that idea - I don't find English too complicated because "there are too many words". (Or the .NET framework because there are too many classes, to keep it in scope.) As long as abstractions are built correctly, with good names (a hard problem :D), I can handle the result much better than if I have only a few "God classes".