ramblings on PHP, SQL, the web, politics, ultimate frisbee and what else is on in my life


I was just reading through the various blog posts on this topic on the tram (yeah catching up from a long frisbee weekend). So this blog post is essentially an idea I actually wanted to implement in a recent project, which unfortunately the client did not prioritize high enough to make it out of the product backlog (scrum lingo). Anyways it seems to offer a solution to the problem at hand as well.

Essentially we used ID's in the URLs of our phonebook application mainly because we wanted the URL's to be really short and because names tend to overlap and the client had other priorities than have us work up a solution (and yes I can quickly think of several). One was to stick with the short ID based url's we currently have and then simply stick another "parameter" that is never used at the end that contains human readable information. Of course this ID could be anything in theory (not necessarily an integer .. in our case it was an employee ID, which does have some meaning). So essentially the idea would be to just use short URL's and append the human friendly stuff at the end.

The good part is that if you paste the long URL into an email, you still have the more descriptive long text, but it does not matter when it gets broken up from the actual short URL. I guess that could be a workable solution, though of course some people might want to have the long human compatible, a long integer ID based and a super short URL, with everything being mapped to the long integer ID based URL before things even enter their framework .. or maybe I should just go to sleep.


Re: rev=canonical

While URLs with human readable parts append are more viewer freindly, they are still hard to remember due to the ID part in them.

Re: rev=canonical

Well its impossible to remember the human readable URLs as well. What would be possible to remember are well defined acronyms and nothing in the above prevents one to use this. Again all I am saying is, use your preferred short URL and append to it whatever you think is more human readable. In most examples I have seen the short URL + the human readable part is still shorter than the full canonical URL. But bah .. I wanted to be in bed and hour ago .. so there ..

Re: rev=canonical

Wouldn't it be more usable if just had the human readable part, and performed a search ?


If the search returned one result then go direct to displaying "Bob Smiths" details.

Re: rev=canonical

Well the point is that you want to have a short URL that will not break in emails and can be placed in an SMS for example where the number of characters are relevant.

The thing with search is of course also interesting. If the short URL does one day break, having the long part as a search term to fallback upon is of course also convenient and something I had in mind with my proposal I made to our client.

Re: rev=canonical

Eli White just announced the same short URL syntax for Zend DevZone articles. See http://devzone.zend.com/article/4470 :)

Before you can post a comment please solve the following captcha.
your name