Welcome to WebmasterWorld Guest from 50.16.31.61

Forum Moderators: phranque

How do you organize your folder structure?

Where do you put images, videos, etc.

   
7:45 pm on Dec 23, 2006 (gmt 0)

5+ Year Member



Hi Everybody,

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.

9:07 pm on Dec 23, 2006 (gmt 0)

WebmasterWorld Senior Member essex_boy is a WebmasterWorld Top Contributor of All Time 10+ Year Member



as a general rule I keep teh HTML in teh root directory and teh images in their own category specific folders, although my largest site is around 100 pages.

I guess if it was to be larger and far more complex then id have to rethink it.

11:00 pm on Dec 23, 2006 (gmt 0)

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member



The planned complexity is the key as Essex indicates - most of your stuff can go in a directory at root, but if it gets **really** big you might want to divide your directory structure up. This is because scripts and programs that have to read in large directories will slow things down.

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. :-)

12:08 am on Dec 24, 2006 (gmt 0)

5+ Year Member



I learned long ago to make a new folder for each topic. So if I make a new topic, the html page, the graphcs and any other files are put into that folder. The folder also has a descriptive name reflecting the content (SEO).

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

Root
-->Online_Games (folder)
... -->Whack_a_mole (folder)
... -->House_hunt (folder)

Any common files (CSS) can go in the Online_Games folder.

11:07 am on Dec 24, 2006 (gmt 0)

10+ Year Member



A very large websites directory system will have to be designed in it's proper theme. A bad backend can cause fuzzy page indexing. Having database designer perspective with a nice dmoz mindset.
3:38 pm on Dec 24, 2006 (gmt 0)

10+ Year Member



I use lots of nested sub-folders to organize files and I mirror the structures between the html file directories and the image directories.

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.

HTML files

/galleries/gallery1/photo1.html
/galleries/gallery1/photo2.html
/galleries/gallery2/photo1.html
/galleries/gallery2/photo2.html
(lather, rinse repeat)

Image files
/images/galleries/gallery1/photo1.jpg
/images/galleries/gallery1/photo2.jpg
/images/galleries/gallery1/thumbs/photo1.jpg
/images/galleries/gallery1/thumbs/photo2.jpg
/images/galleries/gallery2/photo1.jpg
/images/galleries/gallery2/photo2.jpg
/images/galleries/gallery2/thumbs/photo1.jpg
/images/galleries/gallery2/thumbs/photo2.jpg

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.

 

Featured Threads

Hot Threads This Week

Hot Threads This Month