URL design is important. For this reason I’ve put a lot of thought into the URLs used by demiblog.
demiblog has a PHP object SiteURLSpace that maps between URLs and data queries. This means that demiblog’s URLs don’t necessarily have to bear much resemblence to its code structure. It’s also pretty easy to completely replace the object, and thus restructure demiblog’s URL space. (Except for a few cases like feeds and enclosures.)
Firstly, demiblog can be installed anywhere on your server. If your domain name is example.com, then you could theoretically give demiblog URLs like any of these:
This makes it easy to have demiblog power your whole site, or just a part of it.
Now let’s look at some of the URLs within demiblog…
demiblog articles may be tagged. This is a loose form of categorisation. Tag listings are available at http://DEMIBLOG-INSTALLATION/tag/example/. This URL complies with the rel tag microformat and follows the same URL scheme as Technorati.
All articles and comments in demiblog belong to a user. Each user has their own page which lists their name and contact details. In future versions it is likely to also list recent articles and comments published by that user. The URL format for this page is http://DEMIBLOG-INSTALLATION/~example/ which follows the standard Unix home directory syntax.
In a nod to Jukka, these pages are also available at an alternative URL: http://DEMIBLOG-INSTALLATION/user/example/. This is incidentally the same scheme used by YouTube and The Well.
Plain old bits of content have a URL like http://DEMIBLOG-INSTALLATION/article/example/ where “example” is some meaningful identifier. This is the same scheme used by SitePoint.
Blog entries take URLs of the form http://DEMIBLOG-INSTALLATION/YYYY/MM/DD/example/. This is the same scheme of URLs used by many installations of WordPress, including its biggest: WordPress.com.
Look forward to more articles on the architecture of demiblog…