Working on a database class that turned out to be quite large and likely to become much larger, I began to write many attributes and methods related to one particular aspect of the database (users, comments, pages, etc.). for example, about the time for subclassing a database class to several classes, each of which deals with their own aspect, and only the database class contains the absolute core functionality.
However, it is like doing extra classes and communicating with includes and pretty for nothing. The code is quite easy to maintain as is and divided (via comments) into the correct sections, and it does not look like a "large" class that can hurt performance.
So, I come to you: when is the right time, in your opinion and experience, subclasses? Not only in this particular case, but in general terms.
Zirak source share