Welcome to WebmasterWorld Guest from 188.8.131.52
Forum Moderators: phranque
I have designed a few websites for small buisinesses and educational facilities, so I'm not a total noobie.
I was curious what methods people use to organize their folder structure. I have read that some people make an "assets" folder for each directory that they put all related content into. Is this the best way to do this?
I also wondered how you manage directories that only exist to provide services that the end-user never needs to see. Example: I use phpThumbnail to generate dynamic thumbnails for my website. It is currently in my root directory with my other content folders (i.e. "Articles", "Press Releases", "phpThumbnail", etc.). Is there any better way to separate the content from the underlying applications?
Thanks for any suggestions.
Example, with one small client I foolishly thought I could get away with images uploaded for a cart to just go into /images/products and /images/products/thumbs. Well I never predicted the outstanding success of this client, both directories grew to over 800 files in a few short months and growth was continuing at an alarming rate. Big mistake. FTP into this directory would take from 1-2 minutes just to CWD.
So we temporarily headed this off by creating /images/products/a, /images/products/b, etc, up to z and included /images/products/0 -9 and /images/products/other for file names not beginning with alphanumeric characters. Another even deeper structure could consist of /images/products/category/subcategory/a and so on. But I think this will work ad infinitum for this client.
Think of your directory structure as just another logical navigation throughout your site - don't make it unnecessarily deep, but it should reflect the structure of your site in a logical fashion. This can work against you - there's no reason to have a directory /contact if contact.html is the only thing in it. :-)
This works well for me, updating a topic means only to update the relevent folders.
I do have sub folders so a directory might look like this
... -->Whack_a_mole (folder)
... -->House_hunt (folder)
Any common files (CSS) can go in the Online_Games folder.
Same with music files if the site has those.
Usually there aren't enough js files or includes for that to be an issue, so I usually just have one directory each for those.
I designed a site for a photographer earlier this year and I organized the files this way.
(lather, rinse repeat)
There are no more than 10 files in any given directory.
All the backgrounds are in one image sub-directory, cover images from his publications are in another and are further sorted into sub-directories by publication.