Reputation: 2441
I have seen the Ndepend rule of having a method more than 30 lines is bad. Does the same apply to a class?
Upvotes: -1
Views: 618
Reputation: 1444
There isn't a good or bad measure of "lines of code" or "number of members" in a class. Just to better emphasize Jeff's point, good class design should follow a SOLID programming standard instead.
More information on that concept can be found here
http://en.wikipedia.org/wiki/Solid_%28object-oriented_design%29
Methods are asked to be shorter in design due to a sincere likelihood that most lengthy methods can be refactored into smaller ones.
Upvotes: 3
Reputation: 62387
There is no such reasonable guideline for a class or type. The type will be as long as it needs to be to meet the goals of its responsibilities.
Upvotes: 3