Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I'm just wondering whether it would be appropriate/acceptable to use the following folder naming convention within a website development?

For folders which the end users will see as part of the URL:

/Photos

/Downloads

/Downloads/Documents

(basically, the standard way of naming folders)

... but for folders which aren't seen by the user, but which contain resources used by the website:

/_sitegraphics

/_js

/_xml

/Photos/_photosxml

Are there any reasons that prefixing the 'private' folders with an underscore is a bad idea? I'm only considering it because I think it keeps things tidy and easier to identifty.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

I often use a very similar naming convention / separation of system and userland folders. Either using the _ (underscore) or @ (at) to prefix the system folders. Like you say, it makes the folders easier to identify (when arranged alphabetical they are at the top) and I've not come across anything negative to doing it this way.

However, I do try to keep the _/@ system folders to a small core of folders at the root. And subfolders (inside a system folder) use regular folder names.

Example...

/public_html
----/@W3d
--------/Core
--------/Ext
--------/Project

This is generally for server-side scripts. I don't always do this with JavaScript and CSS - may be for the core files in an application. For server-side script you could always keep them in folders above the document root, then they are truly separated.

share|improve this answer
    
To be honest, using the convention when they're subfolders was only an afterthought - I can't imagine a situation where it would be needed. Thanks for your response, it was really useful. –  triplestones Aug 6 '11 at 11:43

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.