Some people believe there is a rule about separating things, perhaps the Model-View-Controller model. Bah. Separate everything so none of the chunks are bigger than one can easily handle. I use the rule that (eventually) all my SQL will be in the form of stored procedures. Not only do they run faster (some pre-compilation) and make code re-use easier, not only does it force a person to think about their database layout more, but it also makes for cleaner code. Is that MVC? I divide my tasks so that almost no module has more than a few hundred lines of code. A couple do now, one I will break up, and the other is a library.
You can see why I never talk shop here. This is a forum for politics, darnit! Who cares if my templating system, alone among the available options, has XML valid templates? Or that every request you make to my site goes through 28 handlers (or more) divided into eight of the phases of the Apache request cycle?