Blog May 2008

Avatar

The pound shop website

Just to clarify for non-UK readers, by “pound shop” I mean a shop where every item costs £1.

I went for an interview with a firm based in Broad Street last week. Professional decency prevents me from revealing the company’s name or website, but they’re a technology business who own, amongst other things an Indian TV station and a price comparison site.

The website I was to be working on should I have accepted the post was a social networking site, but to compare this site with the likes of MySpace or Facebook would be like comparing a £1 lightbulb to the lighting rig for a prog rock show.

This kind of “knock-off” website is the result of a passionectamy. At some stage someone has sucked the passion for the web out of the decission makers in the company, and left them with no soul but one hand permenantly aloft and a little voice saying “me too”. In short, these guys give jumping on the bandwagon a bad name!

The company that built the site does not care about social media - in fact the MD asked me what social media was [he wasn’t testing my response: he literally thought it was a jargon term] - and so cannot hope to produce an effective “object in social space” (to coin a Peteism), so needless to say I didn’t accept the position.

I used the phrase “pound shop website” because, what you find in shops where everything costs £1 is not an innovation in value but rather a lesson in how you can take a good idea, remove every hallmark of quality and sell it for a tenth of the price of the original idea. Products that sell in pound shops are never ahead of the curve but just within reaching distance of it, so as to take advantage of it without ever taking the risk that originality brings.

Pound shops exist because there is a market for them. I buy stuff from them because if you want something cheap and disposable you can get hold of it fairly easily, so is there a market for it?

Beware the underdog

Whilst watching the replay of Ronnie O’Sullivan vs Stephen Hendry today I was reminded of a conversation I’d had with Kevin Rapley, Daniel Davies and Danny Smith at the last Birmingham blogmeet. Cor, name-dropper me.

Dan Davies (who, to lessen confusion shall henceforth be known by his web-name as Danux) was quizzing me over a post I’d written about open source web technologies, upon which he’d already commented. At this point I was set upon by both Daniels and accosted. Danny Smith wanted to know why I couldn’t get behind the open source ethos and posited the theory that it’s all about the underdog, a concept we Brits love. (I can hear the Great Escape theme in my head as I type.)

This was a viewpoint I could understand, and it was the first time anyone had tried to intelligently explain why open source has value, apart from the financial benefits of not having to pay for your software. This helped me understand why I have the utmost respect for the open source ethos but will always choose the best solution to a problem (ie: the problem of finding a good web browser) based on technical factors rather than a shared communal empathy.

I don’t mean to belittle the idea at all, and I can completely understand it. People like to see others “sticking it to the man”, including me, but for whatever reason that doesn’t translate to my digital world. I choose software based on how good it looks (I equate this with an idea of “build quality”), how good the support seems to be, how compatible it is with my current system, and of course the price.

Because most open source applications are developed for the love of programming rather than to fulfil a commercial requirement, the UX element can slip. Plus most open source programs are built to be compatible with other open source programs, which really means Linux.

What interested me more is the idea of the underdog in a wider digital sense, and how it can affect other choices we make online. My friend Dave wrote a post entitled Apple is Totally Anti-competitive and got what can only be described as a barrage of abuse in comment form. Some of it was down to a few accidental factoids, but a good deal of it was down to the fact that Dave had simply dared to pour scorn on the mighty Apple.

People love Apple in a way that they don’t love any other company. People love Google but who loves Yahoo? They’ve all propagated evil, but because we think of them as the underdogs, this stuff gets automatically edited out by our subconscious. Microsoft are no more anti-competitive than Apple, but it’s Bill Gates’ wrists that get slapped when he tries to bundle software together, so when Steve Jobs makes iTunes the only way to sync your iPod without it breaking or distributes Safari under the guise of a software update, the technology community raises an eyebrow and that’s it.

I’m neither an Apple fanboy nor a Microsoft...er...lover, but the quite obvious double standards that exist around technology and intellectual property boggle my noggin.

So why the Ronnie reference? Well, here’s a man who has been playing professional snooker since ’92, has had nine 147 breaks and was the highest ranked 2002, ’04 and ’05 (get all the stats at snooker.org), but because he has a history of mental problems and has been known to crack under pressure, and because we know he’s capable of so much more, he’s always the one the crowds flock to the Crucible to see. Although no-one would call Ronnie the underdog, we attach the same romanticism to him as we would with any fresh new talent.

And that’s the case with the likes of Apple and Google. Their fans have a romantic link with these corporations in much the same way as open source developers do with the platforms they use, but what confuses me is when Apple talk about chasing three blokes in Miami for opening up the OSX platform or MySQL sells for $1 billion, this does nothing to curb the romance.

Maybe I’m just an old stick-in-the mud. Yeah, that’s probably it.

Byron’s first stumbling block

On Thursday I started work on my new content management system for ASP.NET, called Byron. I wanted to make it both flexible and efficient and in doing so I’ve had my first setback, and it’s all to do with data.

ASP.NET has a great model for creating flexible applications that can be configured very easily and without having to write too much unnecessary code. The Provider module means that you can put all the logic for a set of functionality in one place, and worry about the nuts and bolts later.

For example, I started off with a DataProvider system. I created a base class with a load of functions for accessing information about users and their roles, so that I could build a login system for the admin area later down the road. I then built a MySqlDataProvider which inherited from the DataProvider class and which would actually handle the instructions that the DataProvider was being given.

So basically the user system says “reset this user’s password” and the DataProvider says ”OK. Oi, MySQL? Check this user’s password would you?” MySQL comes along, resets the user’s password and tells the user system it has done so. (A very simplistic description, but hopefully it makes sense.) That all works great because the MySqlDataProvider knows what data to access, in what table and what to do with it. Now comes the tricky part.

I want the system to be a framework or platform, more than a CMS. I want Byron to form the basis of all .NET sites I develop in the future, so that means the system needs to be flexible enough to deal with any type of content, be it a page, a blog post, a contact form or a news article. Because there are subtle differences between examples 1, 2 and 4, a catch-all system wouldn’t work, so total flexibility was what was needed.

So I built a ContentProvider and setup a whole load of stuff in the site’s configuration file so that new types of content could be created, understood and rendered. It all went swimmingly until I came to the point at which I’d have to access data for each page, post or article.

And that’s where the stumbling block came and whacked me square in the noggin. How do you access data from a database without knowing

  1. what the content will be used for, and crucially
  2. what form that data is held in?

It could conceivably be XML, a MySQL or MS SQL database or even - heaven forfend - a bunch of text files. If I wanted the system to be totally flexible it would have to cope with all of these, and more. And that’s actually OK as long as you know what data you need, but because the content system was dynamic too, I didn’t.

I knew that if I really knuckled down I could create a really fancy generic query system where the complexity of each query could be communicated and passed from the ContentProvider to the DataProvider and back again. But this would end up slowing the system down, and I’d have a foot-long white beard by the time I’d finished. So I had to make a compromise, and from now on, Byron will only support a MySQL database.

I wanted to allow the support of any database that can interpret SQL (a “programming” language for databases), but there are limitations which I won’t go into, so it’s MySQL or no SQL. Hey, if it’s good enough for WordPress it’s good enough for me!

Say hello to Byron

A few conversations, be they online or offline have lead me to think about whether I should be demonstrating my .NET skills through my own CMS. My priorities have shifted since I setup this site on WordPress, and now I think demonstration is more important than procrastinating.

My mate Kevin is already using version 2.0 of Bluemilkshake.ContentManagement on his site DigiKev, but it doesn’t give him everything a blogger needs. Yes he gets the basics: he can add new posts, add links, images, metadata and so on. But it doesn’t ping any servers when he updates his blog, and it doesn’t notify any posts to which he has linked.

Plus the system is not necessarily the most efficient. It was built on a module basis (a little like WordPress widgets, except those widgets don’t have to be stuck in a sidebar: they actually form the makeup of each post), so each block of text is one module, and an accompanying image is another.

It’s because of the issue above that I thought, rather than upgrade an existing system I should think about it from a new perspective, taking the things I love - and removing the things I hate - about WordPress. I should point out though that I’m not out to produce WordPress for ASP.NET, and I’m not creating a blogging platform. I want to create a content management system that implements a really solid blogging system.

So Byron is born. It’s an ASP.NET 2.0 application using a MySQL database. Why MySQL? Because Microsoft SQL Server is just too damned expensive. Why ASP.NET? It’s too long to go into, but it’s by far the more powerful language, at very little extra cost when looking at shared hosting. I’ll be writing it to support any form of database (or even a set of XML files), but this might not come till later in the development process.

I thought it’d be a great idea to blog the development process of this new project through from its conception to its first deployment and provide code snippets where they have value. If you’re not a programmer this will hopefully give you an idea of how a CMS is built, and if you’re a PHP developer this should show you that ASP.NET developers are real-world programmers.

I should point out that in an earlier post I extolled the virtues of systems like WordPress because of their “pick-up-and-go” style. That still stands. You can setup a new WordPress site in about five minutes from a standing start and that’s no mean feat, so I have nothing but respect for that system. It works too; really really well and the development community behind it is immense. I just think it’s important to put my skills on show on my own site.

Wish me luck!