Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

File Naming Question

Posted on 2006-11-18
4
Medium Priority
?
233 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:
Cornelia Yoder earned 300 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 200 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:Cornelia Yoder
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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
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 …
Suggested Courses

927 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