oop - When is a class too big? -


i tend create large classes have 30-40 (or more) methods. how many methods many? there "smells" or rules of thumb use?

step 1 adhere single responsibility principle. if can't in 1 sentence class does, much.

once you've narrowed down, don't know number of methods matters long methods don't much.


Comments

Popular posts from this blog

400 Bad Request on Apache/PHP AddHandler wrapper -

Add email recipient to all new Trac tickets -

php - Change action and image src url's with jQuery -