All in the <head>

– Ponderings & code by Drew McLellan –

– Live from The Internets since 2003 –

About

About Drew McLellan

Photo of Drew McLellan

Drew McLellan has been hacking on the web since around 1996 following an unfortunate incident with a margarine tub. Since then he’s spread himself between both front- and back-end development projects, and now is Director and Senior Web Developer at edgeofmyseat.com in Maidenhead, UK (GEO: 51.5217, -0.7177). Prior to this, Drew was a Web Developer for Yahoo!, and before that primarily worked as a technical lead within design and branding agencies for clients such as Nissan, Goodyear Dunlop, Siemens/Bosch, Caburys, ICI Dulux and Virgin.net. Somewhere along the way, Drew managed to get himself embroiled with Dreamweaver and was made an early Macromedia Evangelist for that product. This lead to book deals, public appearances, fame, glory, and his eventual downfall.

Picking himself up again, Drew is now a strong advocate for best practises, and is currently Group Lead for The Web Standards Project. He has had articles published by A List Apart, Adobe, and O’Reilly Media’s XML.com, mostly due to mistaken identity. Drew is a proponent of the lower-case semantic web, and is currently expending energies in the direction of the microformats movement, with particular interests in making parsers an off-the-shelf commodity and developing simple UI conventions. He writes here at all in the head and, with a little help from his friends, at 24 ways.

Content Management Nightmares

3 days ago

I’ve come into contact with a lot of different content management systems over the years, from the off-the-shelf to the handmade by pixies varieties. Apart from the almost universal truth that everyone hates their content management system, I’ve found them all to be remarkably different. From the basic to the complex to the complex-but-should-have-been-basic they’re all out there and most of them are dangerous.

Whilst working in a design agency seven or eight years ago where I was building mainly ASP/VBScript projects, we were approached by a client to perform a redesign of their existing site. The site had originally been built by one of the very large design agencies who, as was quite common at the time, had offices all over the world. Part of the redesign necessitated some changes to their custom-built ASP content management system, so we set about requesting the source code from the original design agency.

Whilst our client was based at an office in London, their headquarters were in Norway, and it was the Norwegian division that had originally commissioned the site, which itself was all in English. (With me so far? Good.)

When I got hold of the source code, I was horrified. By that point I had been coding for few years, but on the whole wasn’t massively experienced in developing complex applications. With hindsight, I expect what I was looking at was an attempt to implement an architectural pattern like MVC or similar, but what I was faced with was an absolute rats nest of code. I say an attempt to implement because if you’ve ever worked with ASP and VBScript you’ll be familiar with its lack of basic features such as dynamic includes, optional function parameters and hash tables that make building a well structured application something of a challenge.

As an aside – because I still find this amusing to this day – ASP processed file includes before interpreting any of the script. On a first pass, ASP would recursively process any includes in the script, grabbing their contents and squirting it into the parse structure at the desired point. The entire thing would then be fully parsed and finally the VBScript interpreted. This meant that not only could you not decide in your script whether or not to include a file, but that those file names had to be static. There was no way to dynamically construct the file path based on runtime input. It was a joke, but like the worst joke you’ve ever heard, told by someone with the comic timing of a tax accountant. But I digress.

So there was I with my rats nest of ASP in something of an attempt at some architectural pattern or other, trying to figure out how best to make the changes I needed to make in order to have the CMS work with the new site design. Whilst not a massively pleasant job, that sort of task is usually reasonably bearable provided that the variables and functions are logically named and that the code is well commented.

Well, I could see that the code was heavily commented, but whether any of it was logical I couldn’t possibly tell you because every comment, variable and function name was in Norwegian.

That was my nightmare with a content management system. What’s been yours?

- Drew McLellan

Photographs

Work With Me

edgeofmyseat.com logo

At edgeofmyseat.com we build custom content management systems, ecommerce solutions and develop web apps.

Recent Links

@media 2008, Southbank Centre, London, 29-30 May 2008

Affiliation

  • Web Standards Project
  • Britpack
  • 24 ways