On 31/08/2012 19:09, Stephen Booth wrote:
Regarding the slug.  Why do you feel it important to have something
readable in the URL? How often do you look at the URL?

Human-readable URLs are very important for SEO purposes, and are helpful to humans when viewed in, say, an email or Usenet posting as they give an indication of what's the other end of the link.

My view (I'm a
former Database Administrator and designer so this is based on bitter
experience) is that an identifier you can guarentee is unique is more
importtant than a human readable one.  This is particular important
where you might have tools not under your direct control inserting and
updating the data (this is also why I always recommend that business
rules should be as close to the data as possible, if they're in the
app layer then you risk another tool/app bypassing them).

There's also a very good argument that the URL should be mapped to the unique ID by the abstraction layer, so that if you ever change one or the other you don't need to change both. If Jane Smith gets married and becomes Jane Jones, then /person/jane-smith can change to /person/jane-jones without affecting the underlying data structure (and the former URL can 301 redirect to the latter so that there's no link-rot). Equally, if you need to change the data structure so that, say, unique IDs become alphanumerics instead if integers, then that's completely transparant to the users who only ever see the friendly URLs.

Mark

_______________________________________________
developers-public mailing list
[email protected]
https://secure.mysociety.org/admin/lists/mailman/listinfo/developers-public

Unsubscribe: 
https://secure.mysociety.org/admin/lists/mailman/options/developers-public/archive%40mail-archive.com

Reply via email to