How not to build an in-house CMS

It’s so easy to create a content managed website these days that it’s often equally easy to be paralysed by choice. This journal runs on WordPress, and uses a modified version of a theme by MidMo Web Design. It took all of 20 minutes from download to test-posting into this theme.

Picking the engine itself, though, has taken about 2 years, and was based on one thing: immediacy.

Choices, choices

Choice is good, right? Competition is even better. I’ve recently become jaded with my own erstwhile approach to site management systems. That approach could be boiled down to two simple statements:

  • Content Management Systems are simple
  • Given enough projects, I can incrementally build my own while getting paid for it

The implication being that “my own” will be inherently better than any of the off-the-shelf systems that are already out there, because I’ll understand it from the ground up.

What really happens can be summed up by these parallel statements:

  • CMS is as “simple” as word processing: easy to describe, easy to prototype, hard to perfect
  • Clients are not software designers, and I’m a scorched-earth perfectionist

All of which results in me, having idealised the first two statements, but followed the second two, writing this post two years later.

Build it in increments -> (step 2) -> profit!

If you are planning on building an in-house CMS, I’m assuming that you’ve already come up with all the rationalising arguments about why it will be “better” than off-the-shelf. It doesn’t matter whether you’ve convinced yourself that the client’s requirements are beyond the scope of any existing system, or whether you’re just full of “Not Invented Here” Kool-aid, the point is that you and your team are committed to delivering a CMS to fulfil your client’s spec.

Of course, what I’ve just described is a bespoke CMS for a single client. Everyone knows that’s not scalable to larger projects, so how do we get around that?

All together now:

We write the core of the CMS for this client, and build it modularly so that we can just give them what they asked for, but reuse the core on the next project!

Bingo. Sounds great, doesn’t it? You make a bit of a time loss on this project, but it’s an investment, because next time around you’ll be mainly writing modules for the next client’s functionality. If the next client has the same spec as this client, it’s instant profit! What can go wrong?

This is where reality creeps in. You build your CMS nice and modularly for the first two weeks. You then realise that you’re not quite finished the core yet, and you’ve only got two weeks left to implement the various bits of functionality as modules. You panic. You know what modules you need, so you start building the remainder of the core with those modules in mind. You maybe even start building some modules into the core, promising to refactor them out on the next project, because you finally remembered your Pragmatic Programmer, and suddenly it’s all about “just get it working”.

You complete the project on time, and what do you have? A half-bespoke, half-modular monster that is going to require a serious refactoring job to make usable for the next project.

However, you’ve learned a lot. This is a key realisation, and often missed. You’ve learned a hell of a lot, and this is where the rot starts. You’ve learned so much that you convince yourself that, on the next project, it would be insanity to try to reuse any of what you’ve just coded. What you decide to do instead is to reuse the knowledge. Oh yeah, baby – we salvaged something after all!

So you start coding again from scratch. This time it will be better, you say, since you know how it all went wrong last time, and you’ve come up with five great new ways of modularising from the get-go. Then client number 2 rolls along.

One of these kids is kinda different

So with your newfound “I get it now!” knowledge, you start implementing The Plan again. Client 1 was a false start – client 2 is the real deal. Now you know how to make it modular, you’ll do it right this time.

Except the same thing happens. This time, because you’re having so much fun coding, and because you’ve convinced yourself that last time you caved and started coupling the core to the modules too early, you hold out to week three to produce the core CMS. But again, week three rolls around and you’re still not done. With only one week left to implement the functionality that took you two weeks last time, you start panicking and even more coupling happens. Worse, your project runs over time and is late.

So far, with two projects in the bag, you’ve overserviced both, pissed off one of the clients by being late, given each a rushed bespoke system (with all the attendant maintenance overheads), and have precisely zero reusable code. Not exactly the outcome you’d hoped for.

So what went wrong?

Addiction is curable

What went wrong is that you failed to notice that your stated goals were not really your goals. Worse, you actually got what you wanted all along.

Huh?

Your implicit goal in building an in-house CMS was to reduce the amount of work you do. You’ve noticed that servicing your clients is boring, because you’re constantly writing the same stuff. To fix that, you decide to consciously write that stuff in a way that you can reuse next time.

The logical next step of that is to write an entire system that you can reuse next time. This is where the logic breaks down, because there already are systems that you can reuse. Right now. You can download MODx right now and be at precisely the point you say you want to be at in four weeks.

So why didn’t you? You didn’t because your goal isn’t to reduce the amount of work you do, it’s to increase it. What you secretly want to do is build a bespoke CMS for every one of your clients. You hope that maybe, one day, you might hit upon a pattern that you can reuse, but you don’t really care about that. You love coding, you love tweaking and refining and burning it down and starting again. You love it, and you got it.

Step zero is realising you’re addicted

So what are you addicted to? Coding? No – you’re addicted to the knowledge you’re learning, to the experience, to “figuring it out”. That’s why it’s so difficult to locate the source of the problem. When I said “you wanted to increase your workload”, you balked, because to you the work is becoming more and more painful.

The knowledge isn’t, though. You’re putting up with the pain for the rush of having refined your perfect plan for next time.

And the truth is that your CMS prototypes are getting better all the time. After 5 or 6 more clients, you might have a really solid platform.

Too bad for your first half-dozen alpha and beta testing clients, though.

Where’s the exit?

So how do you break this cycle? You decide which of these is more important to you right now. Do you want to:

  • Build a CMS; or
  • Streamline your client servicing?

You don’t get both, not right now. If you want to build an in-house CMS, you’re going to have to commit 6 to 9 months of development time to it, and the client has to be your company, not some real-world project you’re using to guinea-pig your sketches on. You need to take yourself (and perhaps another developer) off paid work and become software developers, with the attendant investment and payoff cycles that don’t exist in direct-to-client sales.

That’s the price. Once you have your CMS, you can start flogging it to people. At that point you can start to “Streamline your client servicing”.

Of course, by then, I’ll be in your sector, stealin’ your clients, because I chose to “Streamline my client servicing” straight up using WordPress and Expression Engine, with MODx in there for the really tricky stuff, and have been having a whale of a time developing modules, plugins and extras for those mature platforms you’re only starting to catch up with.

Your CMS had better do something unique.

3 Comments

3 Responses to “How not to build an in-house CMS”

  1. Brad 1st February 2009 at 10:33 pm #

    This article was the truest thing I’ve read in a long time. You’ve just described the last few months of my life in almost frightening precision. While simultaneously working at a 9-5, I’ve taken a few stabs now at a homegrown CMS on the side, much to the dismay of myself as well as my clients, for the exact reasons you describe. Until the opportunity arises to build something unique, we just have to get work done.

  2. jonathan 2nd February 2009 at 9:40 am #

    I think this article reflects the real world as a lot of independent and small-team web developers live it, even if they don’t see it.

    I can’t actually think of a single colleague who hasn’t been through this, and the sad fact is that the majority (including myself on many occasions) are still there.

  3. John 6th March 2009 at 6:45 pm #

    What this article describes is the way most companies go about producing a CMS. Build a horrible foundation and just patch the crap out of it along the way. Companies just don’t want any old CMS, and if they do they’ll end up just wanting something else in the end, they want a business relationship with the CMS provider. Building a solid foundation isn’t tough, it’s actually finding the time to do so. And the only way to do that is been through the hellish process you mention. In the end, this article seems more about scaring people off to limit the competition for WordPress than anything else.

Leave a Reply