May 12 2008
URIs – Don’t Go Overboard
Why Am I Ranting?
It amazes me how often stale topics are rehashed into new concepts simply because:
- Everyone was too lazy or simply unwilling to adopt it.
- It was not clearly explained or properly reinforced.
- Someone has a stroke of (stale) genius and does something great with it.
We first saw this happen in the last couple of years with the “Web 2.0″ and AJAX concepts that were by no means a new concept or even a new technology.
So what exactly is so terribly thrilling about this article that discusses using “awesome URLs?”
It is quite simple really. Users love easy interfaces. And that is really all that matters when we talk about usable structured URI schemes. Simple, easy, and affectionate URLs.
Affectionate URLs?
Yep, affectionate URLs. By this we mean the kind of URLs that ANYONE can remember. Let’s take a few examples of some simple and extreme examples.
http://www.developerfusion.co.uk/show/3821/
This lovely URL is simple and very intuitive. But intuitive to who? To people who know about Developer Fusion? Those who work on the back-end of Developer Fusion? Programmers in general? Web Developers?
Does that not cut out a LOT of possible users? Granted, we are not talking about major application-threatening obstacles here — but it is the overall approach that sweetens the interface, not the complete disregard for these subtleties.
http://www.roscripts.com/Pretty_URLs_-_a_guide_to_URL_rewriting-168.html
OK. Let me take a step back here and truly see where this URL went wrong.
The first thing that springs to mind is what in the world was the author of this particular page thinking? How exactly does one set out to write a mod_rewrite article on “pretty URLs” and end up with a URL like the one above?
It actually is not THAT bad. The problem comes in with the “168.” What is that for? What does it tell me?
If I want to share that URL with a co-worker from memory, how do I do it? The naming is fairly straightforward, you just need to remember spaces are underscores.
And there is the “dashNNN.” *shrugs* I can only assume that “168″ is the unique identification number of the article specified in a database. Still a mystery as to why it’s tacked on to the end of the URL though. Anyway… moving on.
http://www.somecoders.com/2006/07/pretty-urls-using-htaccess/
All right, now we are talking! Because let’s be honest with ourselves, there is only so many unique names someone can come up with. And depending on the mechanism you utilize to serve these URLs, it can become quite messy.
This is why your application should ALWAYS manage its own URLs.
So simply remembering an article from July of 2006 called “Pretty URLs Using htaccess” is all there is to it. Everything be lowercase makes it that much more simple.
Is that really as clean and affectionate as we can get it though? I recall reading somewhere among my 1,000+ list of feeds where someone was extremely impressed with their URL scheme. Sadly, I have forgotten the article so I will have to wing it a bit here. The point is that I was extremely impressed with their idea, although it was nothing groundbreaking, nor even that innovative.
http://show.me/the/money/stocks
http://show.me/the/money/bonds
http://show.me/the/money/taxes
…
http://show.me/the/programming/perl/regular_expressions/
This is the official trump of all URI schemes — ever. Well, if *.me was a valid TLD that is.
The point is the more you make a URL stick in someone’s mind, the more affectionate that URL becomes. The kind of URL that just warms your heart knowing that it is simple, effective, and you do not have to look like an idiot (like I just did) when you cannot remember a particular URL.
The prospect of designing an effective mechanism by which to deliver URLs is definitely beyond the scope of this meager article. Just remember — this is but one step of many.
EDIT: It may seem redundant, especially in lieu of this article’s focus on “old material,” but I just had to add http://www.w3.org/Provider/Style/URI.
No responses yet
Create a free edublog to get your own comment avatar (and more!)