Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Camel case in web resources

What is you opinion on using camel case for web resources?

I am coming from a Java background where camel case is second nature, but still when naming web resources, such as html, css, javascript camel case does not feel right.

(e.g. http://localhost/application/editUserForm.html vs http://localhost/application/edit/user/form.html)

Any comments, suggestions are welcome!

like image 985
yannisf Avatar asked Jan 31 '11 14:01

yannisf


2 Answers

The main consideration on naming schemes would be impact on SEO. From my understanding, Google (and presumably other engines) can 'read' amalgamated words in a single string, so camel case should be OK, as would a single case-insensitive string. Splitting the scheme by directory using rewrites would be clearer for less capable spiders. One piece of advice Google give is to use hyphens (-) rather than underscores (_), but that's not relevant here.

If you expect a real person to ever have to type the full address, using something easy to read would be a bonus in order to minimise error.

like image 148
Purpletoucan Avatar answered Sep 30 '22 03:09

Purpletoucan


I don't find anything wrong with such naming.

My personal preference is to name web resources with -, like edit-user.jsp. I think it's more question of personal taste. I don't like _. - makes easier to visually find separate words in browser address bar (at least for me). And as far as I saw - is pretty common.

like image 39
tenshi Avatar answered Sep 30 '22 01:09

tenshi