Solved

File Naming Question

Posted on 2006-11-18
4
178 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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Creating a slider 12 34
while loop in html mail format 5 33
Error installing extension Linux 4 36
sql sentence 2 13
Consider the following scenario: You are working on a website and make something great - something that lets the server work with information submitted by your users. This could be anything, from a simple guestbook to a e-Money solution. But what…
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to dynamically set the form action using jQuery.

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now