Page 1 of 1

File system organization for PoEAA-inspired systems...

Posted: Tue Aug 23, 2005 6:09 pm
by nielsene
As I get deeper into the refactoring of my application along PoEAA lines, I'm starting to wonder if my include directory layout still makes sense. In the past the include directory looked something like

Code: Select all

include/classes/access-control/
                    database/
                    html-formatters/
                    phrasebook/
                    storeable-objects/
Most of the sub-directories had about 5-10 class files so it managed the "grouping" well.

Now I'm having an explosion of little classes that implement a given pattern, so I've been adding directories for "contexts","requests","controllers","handlers", etc. These are likely to have a large number of classes, 20+ each, easily.

In addition there's a clustering effect. Almost every handler has its own request. Contexts are almost similarly customized, though there is a litle more sharing, etc.

I'm a little tempted to re-orient the tree around functional areas, Each functional sub-directory would have its own controller with its associated contexts/requests/handlers. The few universally applicable/base-class can live in a "shared" or similar named directory. Any thoughts?

Posted: Wed Aug 24, 2005 2:50 pm
by McGruff
That sounds good. It means that "modules" can be added and removed simply by adding/deleting a directory.

For a library of general-purpose classes I'd probably group them by type: data access, filesystem, etc.