in reply to Lots of subs in large program vs lots of small programs
Think about grouping subroutine functions in terms of things that you are likely to find useful in other apps, versus things that are likely to be unique to this particular app.
For example, you mention doing a lot with MySQL. Some of the code you write for that might be stuff you'll want to do again in some other project -- so that's a good candidate for a separate module.
That sort of thinking could guide your refactoring so that you spend a little more time now trying to separate the "app specific" from the "general purpose" (where "general" just means "you personally might use this bit again somewhere else"). Then you'll find yourself spending less time later on, as you create (or refactor) other apps, because their design and coding will benefit directly from stuff you've already done.
|
---|