Camel case in web resources

What do you think about using a camel case for web resources?

I come from the Java background, where the case of a camel is second nature, but still, when the names of web resources such as html, css, javascript camel case do not feel good.

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

Any comments, suggestions are welcome!

+7
source share
4 answers

Focusing on naming schemes will have an impact on SEO. In my opinion, Google (and, presumably, other engines) can "read" the combined words in one line, so the case with a camel should be in order, like a single line case-insensitive. Directory splitting using rewriting would be more understandable for less capable spiders. One of the tips Google gives is to use a hyphen (-) rather than an underscore (_), but that doesn't matter here.

If you expect the real person to ever have to enter the full address, using something easy to read will be a bonus to minimize error.

+4
source

I do not find anything wrong with that name.

My personal preference is to name web resources with - , for example edit-user.jsp . I think this is more a matter of personal taste. I do not like _ . - allows you to visually find individual words in the address bar of the browser (at least for me). And as I understand it, it - quite common.

+1
source

It can open the door to problems with two of the same resources that differ in the case if you deploy your site in a Windows environment (either for development or for hosting).

But if you avoid "double" file names, then this is more or less taste.

A naming scheme like this one at http://localhost/application/edit/user/form.htm shows individual words better and may be easier to parse somehow with the "user".

+1
source

I do not find camel skin very attractive. Although this convention is for Java, and we must follow it when executing java, we do not need to attribute other things.

Not that we find it tedious to insert a separator between every two words, but the underline is really hard to type, it requires two pinky fingers. Unfortunately, underlining is preferred by language designers in identifiers.

Whoever invents the following programming language, use '/' as the namespace delimiter and '.' as a word separator, so instead

 java.beans.beancontext.BeanContext.getResourceAsStream() 

we have

 java/beans/bean.context/Bean.Context/get.resource.as.stream() 

wait ... '/' is already used for division. never mind.

+1
source

All Articles