The reason you are finding what you are trying to do, hard, is because it is a purely intellectual exercise, not driven by either need or urgency.
You'll probably take that as a criticism, but it isn't intended that way, we all have our back-burner projects. I've dozens.
IMO there are exactly two reasons to 'create a module':
These 'fall out' of the designing, prototyping, refining or testing the project.
You don't need to ask yourself those questions, because the answers are obvious.
Ie. You are quite certain that the cost of extracting the code from the original project(s); (re)naming it; defining a common interface for it; and re-working those original projects will save you and/or your clients time/money in the future.
Any and all other reasons are 'costs'. To you and your life, and your company or institution. Investment, maybe; but only iff ....
And whether the ...s ever happen, whatever they may be, is unknown and unknowable. Like an old man putting money under the mattress for a rainy day that may never come.
That doesn't mean you don't do them -- if (for example) OSS is a hobby of yours, then 'somebody might find it useful' can be enough of a reason.
If you are young enough, and work (or aspire to) in a field where OSS contributions can be considered a part of your CV, better still.
But structuring and restructuring code to satisfy the intellectual need (your own, or that of others) to 'get it right' has been the ruination of vast numbers of commercial projects.
And if this is a purely personal project, the knowledge that you 'did it right' will be of scant comfort when you look back at all the things you didn't do to achieve it.
In reply to Re: Refactoring complex module into set of specialized sub modules?
by BrowserUk
in thread Refactoring complex module into set of specialized sub modules?
by LanX
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |