Solved

File Naming Question

Posted on 2006-11-18
4
199 Views
Last Modified: 2008-02-07
Hi, This may seem like a trivial question, but i was wondering if it is bad practice to use camelCaps for naming public php files on a linux box. I mention linux because on windows obviously  fileName.php and filename.php makes no difference. So really i guess what i am concerned about is that users may try to access filenames directly and think that the server is down etc when really it is not, instead they are using the wrong case. ( should i even worry about that?)

Thanks for any suggestions!
0
Comment
Question by:amagondes
  • 2
  • 2
4 Comments
 
LVL 27

Accepted Solution

by:
yodercm earned 75 total points
ID: 17972787
I guess the best way to handle this is to make everything lower case all the time, then users never have to worry about which letters should be capitalized.  At least be 100% consistant in whatever you decide, so users don't have to think about it.  If you capitalize words within the name, then capitalize ALL words within the name ... that is, use either FileName or filename, but don't use fileName.

Just my opinion. :))
0
 
LVL 19

Assisted Solution

by:VoteyDisciple
VoteyDisciple earned 50 total points
ID: 17972969
For a variety of usability reasons, I always use (and recommend using) all lowercase, with hyphens to separate words.

1.  Just having all lowercase is, as we all know, hard to read, so that's out right off the bat.

2.  Mixed casing can screw up users typing the URL by hand who don't realize case matters.  Since case so seldom matters in ordinary computer use a lot of novice users will completely fail to recognize either FileName or fileName as requiring any special attention at all.

3.  Underscores, an otherwise viable alternative, blend in with the underlining that usually goes with links (even if the URL isn't actually underlined we're kinda used to seeing links underlined so we gloss over it).

4.  For more saavy users it's just as easy to say "experts exchange with a hyphen" as "experts exchange, all one word" and both are easier than the nonsense of "experts exchange, all one word, capital E on Exchange, lowercase e on experts" which everyone will promptly forget and just Google instead.


So, http://www.example.com/files/are-cool/with-hyphens.html
... is a good structure.
0
 
LVL 27

Expert Comment

by:yodercm
ID: 17973001
I strongly disagree that using all lowercase is "out right off the bat".   All lowercase is what most of the internet uses, what most people are used to, and far easier to type than adding in either hyphens or underscores.  It may be your personal preference, VoteyDisciple, but please don't denigrate the opinions of others when you give your own.

I stand by my statement that all lowercase is by far the best if your users have to type the URL.
0
 
LVL 19

Expert Comment

by:VoteyDisciple
ID: 17973082
Sheesh, I just said that's what I do and recommend doing, and I gave my reasons for it.  Me saying so doesn't make your recommendation any less valuable or correct, and if we wait around another few minutes somebody's sure to come along and provide five or six really good reasons that my way's pretty dumb and that therefore the best thing to do is only ever use one-word filenames in one-word directories (probably to enhance RFC 918346 compliance -- an RFC that I now challenge somebody on EE to write, just 'cause it'd be amusing).

Google, for the wealth of "experts"-containing e-mails that show up in my GMail inbox, has lately taken to reminding me of Roosevelt's quote, "There are as many opinions as there are experts."
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
.htaccess 5 39
Be edit-table when I click the edit button (turn into inputs boxes) 7 31
Insert values are dynamic 11 43
write screen output to text file 21 47
Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question