Content management - a fresh approach…

Fri Sep 15

Further to my article on the power of the niche I read this interesting article by highly acclaimed uber-geek Eric Sink. In it he describes how, when writing a computer application at least, going for a small portion of a large market may not be the best idea.

He’s absolutely right. I have a tendency to “open my mind” far too often when forming ideas for an app.I start thinking about related features, additional uses for the app, plugins, new markets, additional functions. And before I know it, instead of the streamlined sportscar I originally started out with, I have a double-decker bus.

And that’s a problem. A huge problem. Because I can’t please all the people all of the time, not even close, so why should I bother. If I try to do too many things I’ll end up failing at all of them, but if I just do a handful of things really, really well then I have a good chance of getting it right.

So I’ve been thinking of the smallest market I could possibly go for, the narrowest niche I could develop a product for. And, of course, that market is me. just me. No-one else. I just need to do something that does what I need it to do, and ignore those voices in my head that shout about making “a viable business opportunity”. Instead I should just do something that fits my needs perfectly.

So, what am I going to make? Well, there’s just one thing that I really need at the moment, and that’s a decent piece of software for managing my websites more easily. While I could use one of the many content management systems already out there, the fact is I want to do things in a particular way.

For one thing I don’t want there to the any difference between a page and a folder. As I am fanatical about clean URLs this makes sense. Consider these examples:

mysite.com/my-page
mysite.com/my-page/more-info

Now some people would say that “my-page” is a folder, when that folder is accessed in a web browser an index page is shown. However I don’t agree, because it can be accessed directly and it has it’s own content. Therefore it’s just a page which happens to have a child (”more-info”). And “more-info” is just a page, whether it has any children or not.

Strange though it may seem for people used to using more traditional CMSs, it’s actually pretty easy to visualise if you think of it in database terms. Here’s my table with some sample data:

ItemID ParentID ItemName Content Permalink
1 1 Homepage Welcome to the homepage homepage
2 1 My Page Welcome to my page my-page
3 2 More Infomation Some more infomation more-info

So you can see I have three items in my database. The first item is the website homepage, cunningly called “homepage”. The next item is a child of the homepage - notice it has a ParentID of 1? That means the ID of the parent of that item is the item with the ID 1. If that sentence makes sense to you you’re doing very well. The next item has a ParentID of 2, because it is a child of the “My Page” item.

One thing to note is the Permalink colum. That stores a URL-safe version of the page name, and is the bit that will appear in the address bar of the browser when each page is loaded, for example “mysite.com/my-page/more-info”.

Using this system I can have as many pages as I want, all with a logical relationship to each other. I can easily set the content of each page, change the title (and the permalink if I want) but know that my menu system will always know where each page is and how to get to it. Fantastic.

However I want more. Much more. For example, I want to be able to create an image gallery anywhere I want in my website, with different sizes available for each image. I want to be able to create a wiki if I want, or a forum, or a blog. And that means I need to set the type of each item, like this:

ItemID ParentID ItemType ItemName Content Permalink
1 1 Page Homepage Welcome to the homepage homepage
2 1 Page My Page Welcome to my page my-page
3 2 Gallery My Pictures Here are some holiday snaps my-pictures
4 1 Blog Bloggity blog Welcome to my blog blog

So now I have the following site:

mysite.com/ (site homepage)
mysite.com/my-page (a normal page)
mysite.com/my-page/my-pictures (an image gallery)
mysite.com/blog (a blog)

You might be thinking why would I want to do that? Well, I just do. Remember this is for me, no-one else. It’s my app and I’ll code what I like :0)

So now my system knows what type each item is I can do all manner of things. In my administration system I can load the correct forms and functions - so where the item is a gallery it would allow me to upload images and create photosets, for instance, or for a blog it would allow me to create a new entry that would automatically be added to a date-specific archive. And on the public pages I could do what I want too, like load some JavaScript just for gallery pages that allows me to use a lightbox.

Obviously there’s a lot more floating round my head than just that. However if I get something that does exactly what I want it to, and works exactly how I want it to, then that would be great. The only problem is, if I’m developing this just for myself, who’s going to tell me when to stop?

Stastically speaking…

Thu Sep 14

For the last few months I’ve been getting more and more interested in website statistics program. While one of my clients uses the excellent Mint it’s not the right answer for everyone. For instance, it doesn’t handle storing multiple sets of stats for diffeent domains in the same database therefore making it useless for the Wiblog system.

So, last January, I did what I usually do in these situations and ‘rolled my own’. So part of the new Wiblog system is a pretty tasty stats package that shows you not just the usual stuff (number of visitors by day, wekk, month, favourite pages, number of comments per month etc) but some other interesting stats such as popular search terms that brought people to your Wiblog, and even the ability to follow a particular users travels around your Wiblog.

But that’s not enough for me. Oh nosirree. I want to offer the power of usable statistics to my clients. So I’m developing a centralised statistics server that will gather data from all the websites I work on, and send regular reports.

The problem is that Javascript, which is the technology I use to do this cross-site stuff, has limits on how you can share data between different sites. While there are some solutions for these security limitations they aren’t quite ehat I’m looking for. So, again, I’m rolling my own. I’ll post the answer here when I’ve finalised it. In the meantime if anyone else has his the cross-site XMLHTTPRequest problem (you’ll know what it means if you’re geeky like me) then please add a comment with details of how you fixed it.

Ugly mug…

Tue Sep 12

Several times I have read that having your picture on your website increases peoples trust and confidence in you. As if seeing a picture will somehow make you more real and approachable. Although whether someone would find this chap approachable based on the evidence of his photo I find somewhat unbelievable.

However, I have succumbed. And why my choice of picture is perhaps more … informal than some would say is best for a serious web developer, it does convey some playfulness. I think.

Or perhaps that’s just manic lunacy, I always get confused between those two expressions.

Out and about (11:39 am)…

Tue Sep 12

All the world's a stage, but most people have lost the plot :0)

Distributed backups to friends…

Mon Sep 11

This is pretty old in internet terms, but it’s a great idea. If you need a safe method to backup your data, and you have friends you trust, why not pool your technical resources.