Sunday, November 11, 2018

web app - Underscores vs. hyphens in URLs


I'm trying to come up with a page-naming convention so that each page in a web application I'm developing has the human-friendliest URL possible. The current URL structure of the web application is:


http://foo.example.com/webapp/pageName

The only part of the URL that I'll be changing is pageName. The application is a basic CRUD system and has a UI that consists mostly of forms and lists. There are both object- and task-oriented page names -- e.g. addEvent, eventManager, eventReview, imageUploader, editEvent, addItem, editItem, bulkAddItems, bulkEditItems, etc. Given those constraints, I'm weighing a few different URL styles for these page names:




  1. The current camelCase convention, which produces names like those listed above. This is simply a vestige from prior development; the pages were named like variables, without much thought given to their UX impact.

  2. Hyphenation, producing page names like:
    A. http://foo.example.com/webapp/add-event, http://foo.example.com/webapp/event-manager, or
    B. http://foo.example.com/webapp/Add-Event, http://foo.example.com/webapp/Event-Manager

  3. Using underscores, producing page names like:
    A. http://foo.example.com/webapp/add_event, http://foo.example.com/webapp/event_manager, or
    B. http://foo.example.com/webapp/Add_Event, http://foo.example.com/webapp/Event_Manager


Stack Exchange and Smashing Magazine use a style somewhat similar to 2A, e.g.:
- http://ux.stackexchange.com/questions/9093/senior-usability-and-navigation

- http://www.smashingmagazine.com/2011/07/25/email-is-still-important-and-here-is-why/


Wikipedia uses style 3B, e.g.:
- http://en.wikipedia.org/wiki/Extreme_Programming


I'm leaning toward style 3B. It emphasizes the page name with capitalization, and the underscore seems like a clearer and more intuitive word-delimiter than the hyphen.


What do others think? How much do these different URL styles lend themselves better to UX depending on what type of web application (blog, Q&A site, encyclopedia, what have you) they're being used for?




No comments:

Post a Comment

technique - How credible is wikipedia?

I understand that this question relates more to wikipedia than it does writing but... If I was going to use wikipedia for a source for a res...