Why Would You Write Your Own CMS?

With all the debate going back and forth on which is the best CMS, I’d like to take some time to put the case for writing your own.

I realised almost a year ago that my site was getting old in the tooth. It needs to be updated, and not just the design, but the whole functional basis of how content is created, managed and published. It’s getting too big and complex, so I need a CMS — and almost as soon as I realised that, I decided to write my own.

Why I Chose To Write My Own

The first and clearest reason why I chose to write my own, is that I had a very specific idea of what it should do, and how it should work. For example, I wanted to minimize dynamic page creation, so that pages with dynamic content, like category-navigation and tag-lists, are built in advance by admin functions and not as part of the page-view. That’s obviously not always possible, as some things can only be done on-the-fly, but I had a very particular idea of where the split between static and dynamic should be, and I wasn’t confident that any existing CMS would give me precise enough control.

I also wanted a site where every page could be syndicated, either as JSON meta-data or content-only HTML, and so that all the user has to do to get that API content is add ".json" or ".html" to the page URLs. As far as I know, no existing system can do this without extensive modification.

I’ve worked with WordPress a lot, and I’ve also had a good poke around inside the install that SitePoint uses — and it takes a lot of plugins and custom code to make it all work. I’d rather spend that time writing something new, not least of all because I like building stuff myself.

I also hate browser-based edit boxes, and even the most advanced of them can’t compare with the power and flexibility of a proper text-editor like BBEdit or TextPad. When it comes to every-day maintenance and updates, I have a way of working and tools that help me to be productive, and almost all the browser-based tools I’ve used get in the way of that. My experience with WordPress certainly hasn’t helped, as it constantly frustrates and annoys me by parsing my markup destructively, changing elements, adding breaks, making nice HTML go bad. I don’t want to have to deal with that. I want a system that works with normal text-files which aren’t parsed at all, that don’t have to be sanitized as they’re not stored in a database.

The overhead of using a database at all seems like overkill for a site like mine, when the vast majority of most of the pages is static HTML. I suspect the same is true for a great many blogs — it’s wasteful to make a database query just for a chunk of markup. It may be convenient for developers and managers, but it’s not what’s best for users.

And user-centric thinking brings me to my last, probably most important point, which is that I wanted a strong focus on accessibility in all the client-side code it produces. Content Management Systems are, inevitably, server-side applications, and when a group of developers have such a strong server focus, the client-side often wants for the same attention to detail. I’ve seen it so many times with almost every CMS and forum package I’ve used — when it comes down to a conflict between what’s convenient to build on the server, and what’s the best client-side code to produce — the server always wins.

I wanted to shift that focus so that clean, robust and accessible client-side code would always take priority over what’s easy for the server to generate. And that meant not just a change in priorities for how the server-side is written, but a shift in emphasis away from dynamic pages, to building them in advance.

This is how the SitePoint Reference works — complex, detailed pages are generated from XML, but all of that runs in advance to produce essentially static pages, and that’s what the user retrieves. I don’t know of any CMS that works this way, and the SitePoint Reference itself was a custom solution (primarily developed by Kevin Yank).

The Benefits of Writing Your Own

This is one of those cases where small things have a big impact. Frankly, there aren’t that many benefits to writing your own CMS, but those that there are, are very significant.

The reasons I chose to write my own can all be summarized in a single benefit, that writing a custom solution means you can have exactly the system you want, that does everything you want it to and nothing that you don’t.

And when it comes to actually using the system on a day-to-day basis, writing your own means there’s no additional learning curve. I already know every in-and-out of how my admin interface works, because I wrote it to be intuitive to me. The same is true for updating and improving the system itself, and if I need to add new features later or change the way something works, I’ll already know exactly where to add or change the code.

Using a custom solution also means that you’ll never be a victim of mass security exploits. I used to run a forum powered by phpBB, but it fell victim to a security exploit and was hacked to its knees overnight. I’d spent weeks modifying the back-end and templates to spit-out accessible code, and all of that work was ultimately wasted.

When you use an open-source system, it’s only right and polite to credit the developers, usually with a copyright notice and link at the bottom of the page. Credits like this are great Google juice, but they’re also treasure maps, for any hacker looking for sites with just the right version of just the right package to fall to the exploit they know.

One person can destroy a hundred vulnerable sites in an evening. But you’ll never have an issue like that with a self-written CMS.

You’ll also never have to think about licensing or copyright. Once I’ve got my CMS I can do what I like with it, never having to think about whether this or that use is restricted. And who knows, maybe one day I’ll even have a saleable product!

The Drawbacks of Writing Your Own

There’s a flip-side to the security benefit I mentioned a moment ago, which is that a self-written CMS can still be the victim of a security exploit, in fact it’s more likely to be. More likely because the major cause of all security flaws is programming errors. There might be bugs in my code that expose security holes, and I don’t have the benefit of a community of people looking over the code, making improvements, helping to isolate and remove such potential problems.

Community in general is a very strong reason to favour an existing CMS. Whatever I want my CMS to do, I’ll have to write myself, and there might come a time when that in itself becomes a practical issue. Maybe I just won’t have the time to add the feature I need, something I could have solved in half a day with a WordPress plugin.

Even a simple CMS takes a very long time to build. I knew it would never be a trivial task, but I didn’t predict at the start just how much of my time would be spent writing admin functions. With hindsight, it should have been obvious, that building the admin tools would be (and was) about 90% of the work. On and off, this system has taken me half the year to develop, and I’d be lying if I said I was thoroughly motivated for all that time!

And because of that, and also as a result of the emphasis I placed on client-side output, some of my server-side admin processes are incredibly obtuse. This doesn’t affect the users of course — when it comes to actual page views, I’ve made those processes as slick and efficient as possible. But some of the admin functionality is slow, inelegant code, that I didn’t enjoy writing and just wanted to be done. If I were actually releasing this code for other people to use, I would never accept it. It’s only because it’s just for me, and only actually affects me, that I can choose to ignore such things.

Conclusion

When all is said and done, the main reason I chose to write my own CMS is because I wanted to. The main benefit is that it’s precisely what I need, and the main drawback is that it took ages to build.

Looking at that in a task-focused way, it simply wasn’t a cost-effective and efficient use of my time, and if my original thinking had been driven by the needs of a client, I would never have made this choice. It’s probably only because it was just for me, that I had the freedom to write my own CMS.

But then, there’s an adage in software development, that the best ideas are the ones which solve your own problems, and most of the scripts and tools I’ve written — and all of the most successful — have started from exactly this premise.

If you enjoyed reading this post, you’ll love Learnable; the place to learn fresh skills and techniques from the masters. Members get instant access to all of SitePoint’s ebooks and interactive online courses, like The Beginner’s Guide to Web Design with WordPress.

Thumbnail credit: Mike Procario

Free book: Jump Start HTML5 Basics

Grab a free copy of one our latest ebooks! Packed with hints and tips on HTML5's most powerful new features.

  • http://www.jguiss.fr Julien

    I’ll love to do it but i have not the skills… I tried to make one with PHP framework but again not enought skills :( So i use WordPress :)

  • http://www.webontwerper.com Hussam Hadi

    Nice one James.
    I too like very much the approach of writing your own code.
    However in the past 10 months I was introduced to web frameworks and dived into Django/Python. I was very much pleased with the security, possibilities and eventually ease of coding with this framework.
    It saves alot of time to spend some days learning such a framework. I find coding within a framework usually more robust, stable and safe.

  • Bernard Smith

    Do you have a demo/screenshots of what you’ve made?

  • http://www.dasaev.com Dasaev Cerqueda Pérez

    Totally agree, there are sometimes when writing your own CMS is better than using an existing one. Another example that I would mention is when the CMS is not the main part of the system, for example, when you have an application that needs some updates from the user about the content, trying to integrate an existing CMS can be a headache because you need to know about redirections, custom url handlers, user permissions stuff, etc.

  • http://yaadev.com jeff shields

    You might want to check out CMSBuilder by Interactive Tools. Provides the admin interface, create your own tables, generate the basic php.

  • http://fadamakis.com Fotis

    The only reason that makes sense to me in developing your own CMS is preventing the customer from moving to another company after you deliver the website.
    You have to convince him to agree in a supporting fee thought.

  • http://www.autograff.com Richard Merrill

    Very interesting article, nice summary of the joys and pitfalls.

    Cascade Server works the way you have said, using XML to build pages dynamically, then publishing flat html to the web. It’s absolutely great for SEO, but it’s quite price-y ($40k to start) because it’s enterprise-scale. Some universities publish 10s of thousands of pages with it. Not realistic for normal web development, obviously.

    Thanks for the story and the insights.

    • http://www.xoogu.com/ Dave

      You make an interesting point. If James could tweak his CMS and sell it for 40k a pop, then its hardly half a year wasted in writing the CMS.

      I’ve never written a real CMS, but another positive about writing your own code is learning new techniques. I often find I have to learn something new to solve a problem I come up against when writing my own code.

  • Brian K

    One should not forget scale. For a simple “site”, like a half-dozen pages, and a handful of photos, maybe the CMS should / could be the content creator.

    I fear too many think managing content on any network requires an application. Does that mean I require an application to manage my checkbook?

    I guess we only hear about what has market or media value, ie. the more complicated stuff. Like five course haut cuisine catered banquets, and not granma’s homemade apple pie.

    • http://www.brothercake.com/ brothercake

      For a site that only has half a dozen pages, you don’t need any kind of system — just static HTML pages. When there’s so little of it, you can just copy-and-paste repeating elements, or maybe have simple PHP includes.

  • http://www.pngised.net Federico

    Nice reading.
    If you don’t know, maybe you can take a look at symphony Cms. It is an XML driven CMS.

    • http://www.pngised.net Federico

      I used it in my site also. And it works well

  • Phil Freelancer

    Interesting post. If you spend all your time working with a CMS (or CMS’s) you can fall victim to golden hammer syndrome. Certainly for many sites where content, from the consumers’ point of view, is essentially static, a large application stack to generate this content for every page view is overkill.

    There is some interesting work being done in this space, see projects like https://github.com/mojombo/jekyll

    Do you have any plans to share your source?

    • http://www.brothercake.com/ brothercake

      Yeah eventually, but still a couple of months away from being finished (so many things … so little time!)

  • http://quran.2index.net Said Bakr

    Well done and congratulations. Now I expect the next article, I think that, you should write it. Why Would You Write Your Own Framework? I consider the same benefits of writing cms may be applied to a framework plus the wide scope of applications that developer able to do.

  • http://www.alexfraundorf.com Alex Fraundorf

    Excellent article itemizing the pros and cons of writing-your-own.
    I write almost all of my own modules myself for the same reasons you mentioned above. It takes a lot more work on the front end, but I like knowing HOW everything works, which makes customization for existing and future clients easier in the long run, at least I think so.
    Thanks for sharing!

  • http://rdksoftware.com Dave Keays

    My approach is to create a gray-labeled CMS for my own use.

    I see my job similar to that of a general building contractor since I am putting together pre-built solutions and doing my own custom work when necessary. I choose what kind of wall I want for insulation, air-flow, etc. but I usually only make minor alterations.

    As far as security, you hit the nail on the head. The two most common security flaws in a web application are Cross-Site-Scripting and an SQL injection. In both cases, the crux of the flaw is that input that wasn’t properly sanitized was displayed. By reinventing the wheel, you are exposing yourself to an elevated level of security risk. FOSS has its flaws but one of the benefits is the magnitude of eyes that will lay on your code and verify that it is alright.

  • http://www.tyssendesign.com.au John Faulds

    Probably a bit late now because it sounds like you’ve already done it, but it seems that http://statamic.com/ covers some of your requirements in terms of being able to create content in a text editor and being database-less.

  • http://faqoff.eu Nikolaos Beligiannis

    Great post. I agree with you 500% .

  • http://sunriseweb.ca Brad Trivers

    I wrote my own CMS back in 2005 and it’s still in use by several clients, but as you point out it is the amount of time to build desired features that made me move to WordPress in 2010 when I started developing websites full time (and quit my lucrative day-contract). There is no way 99% of my clients would pay for the time it takes to build a custom CMS solution. How can you justify the cost of building your own CMS? You must have clients with very deep pockets! :-)

    • http://www.brothercake.com/ brothercake

      As I said, I can’t, and wouldn’t dream of doing so for clients.

  • Jeff S

    Processwire makes no assumptions about how and what you want to display. It gives you all the functionality with a easy to use JQuery API syntax via PHP. Admin rocks. One look and you won’t even consider bothering a roll your own CMS.

  • http://ChiefAlchemist.com Mark Simchock

    ExpressionEngine is 299 $USD.

    If you think you can build that much CMS for that price then I can think of a gazillion people who would love to hire you.

    Build a CMS for kicks? Sure, why not. Build a CMS and spring it on a client? I’m not so sure that’s a good idea.

  • http://www.hadeninteractive.com Rebecca Haden

    As I read (and enjoyed!) this post, I couldn’t help but think of all the clients I’ve worked with who have a custom-built CMS built by someone who no longer works there. No one knows how to use it, nobody has any documentation, and the guy who built it cannot be contacted — often nobody can remember his name.
    These unfortunate folks have to pay someone like me to figure it out and then, as often as not, move their site into WordPress for them.
    So I guess that it’s a great idea to build it yourself — but have a plan if you ever leave!

    • http://www.brothercake.com/ brothercake

      Yeah I agree — the fact that I was building something just for myself was absolutely key to the decision to build my own.

  • Alex

    “I also wanted a site where every page could be syndicated, either as JSON meta-data or content-only HTML, and so that all the user has to do to get that API content is add “.json” or “.html” to the page URLS. As far as I know, no existing system can do this without extensive modification.”

    Umbraco – The open source ASP.NET CMS (http://umbraco.com/), allows you to do this without any modifications and you don’t need to add an extension to the page urls.

    • http://www.brothercake.com/ brothercake

      Okay that’s interesting.

      Making the API data available through added extensions was not a compromise or a forced solution — it’s the way I wanted it to work. How does Umbraco make those alternative views available?

      • Alex

        Every page in Umbraco contains “properties” or custom fields which you define. To make a page viewable, you assign it a template. An Umbraco template, allows you to pass in any of the pages properties directly to the template, alternatively you can add Umbraco “macros” as well as razor or c# code to the template as well.
        Umbraco macros can be either asp.net user controls, .cshtml/.vbhtml razor scripts or xslt scripts.
        The Umbraco API is available to all of the different types of macros i.e. user controls, .cshtml/.vbhtml razor scripts and xslt scripts.

        To make an alternative template available you just add “?altTemplate=name-of-template” as a querystring to the page url. Alternatively you can also just add “/name-of-template” to the page url and that will render the page using the alternative template.

        For example, the alternative template could be a JSON string that is generated from a macro that calls a razor script.

        It also means you can generate extension-less templates which are effectively .css, and .js files and use the pages’ properties to populate the values within those templates or use macros to render the content.

      • http://www.brothercake.com/ brothercake

        The file extensions are programmatic data flags, so an article’s normal URL would be “/whatever” then its JSON meta-data is “/whatever.json” and its content-only HTML is “/whatever.html”. I think that’s a far more elegant solution that using query-strings — from a clean URLs perspective “/whatever.json” is a much nicer URL than “/whatever?output=json”

        I’m not sure we’re really talking about the same thing anyway — the alternate views are not just different ways of formatting the same data, they’re completely different data. The process you’re describing probably could be leveraged to do the same thing, using macros to load additional server data, but it all adds up to quite a complicated abstraction, whereas all my system has to do is load a different static file.

      • Anonymous

        “… from a clean URLs perspective “/whatever.json” is a much nicer URL than “/whatever?output=json”.

        I agree, it is cleaner, however as I mentioned the other way of representing an alternative view/template is to not use the querystring option and instead you can output the url as in: /whatever/json.

        “…the alternate views are not just different ways of formatting the same data, they’re completely different data”.

        Not sure I understand what you mean here, can you elaborate?
        In this example url “/whatever/json”, the same dynamic properties of the page could be passed as parameters to the json template and then rendered as a JSON string, alternatively the JSON template could be whatever you want it to be.

        “…using macros to load additional server data, but it all adds up to quite a complicated abstraction, whereas all my system has to do is load a different static file.”

        The abstraction enables you the flexibility to respond to the constant demands of a client. For example, if the next request from the client is: “we need the whatever page to be displayed as an RSS feed”, you don’t need to reinvent the wheel, a template can be created, and the the url then becomes: “/whatever/rss” or “/whatever/xml”

      • http://www.brothercake.com/ brothercake

        Right yeah, I see what you’re getting at, and I understand the flexibility afforded by that kind of approach.

        My system doesn’t have that much flexibility, it’s simply that it was designed to work in this specific way. A normal article has two files — a JSON file with meta-data, and an HTML file with the main content. Standard page views are a combination of both, whereas the user can also just request one or the other, using the programmatic extensions.

  • Gary

    I tried my hands at my own CMS some years ago. It was far too time consuming. People need help trying to figure out simple content updates, uploading files etc. It was hard to manage multiple versions of code when the CMS was distributed to more than 2 to 3 clients, and the list goes on. I moved to WordPress last year. I think WordPress can do anything you want it and you don’t have to worry about wasting your time on the other plumbing, you can focus on the real custom needs of your clients, much more affordable for clients. When a team of people are actively developing products like WordPress, Drupal or Joomla etc, how can you go wrong, its a free dev team right at your fingertips. No to mention the millions that use WordPress, there is no need for you to waste your time testing new features that these products already do so well; and the public will already test these features free of charge.

  • http://www.do-my-site.net/ xmanhattan

    One of the best cms that I have ever used. These guys have put together a newer version that out does even Joomla. Why bother trying to solve all the security issues of writing a custom made cms when its already done includes seo.
    http://www.elxis.org/elxis-4-and-elxis-20093-comparison.html

  • Bas

    Most clients nowadays understand the downsides of using a custom CMS. From about 2009 it has become difficult to sell a custom CMS. A good development imho.

    You want full flexibility. But when you have enough xp with an open source CMS such as Drupal, you could probably build what you want in a much shorter time. It is your lack of xp that makes you think that you can’t do what you want with an open source CMS. Those CMS developers are also trying to achieve the most flexibility to solving common problems. Do you really think you can do better than those other developers?

    My advice. Change your way of thinking about web development and embrace open source. For your own and your clients sake: stop reinventing the wheel. I’ve also written my custom CMS in the past. Now I’m using Drupal with much better results. Instead of writing core custom CMS code, I’m writing custom modules. Contrary to what I was afraid for beforehand, It is more fun and pleasing work!

    • http://www.brothercake.com/ brothercake

      On the contrary, it’s precisely because I do have considerable experience that I know existing CMSs won’t do what I want. I might be able to find one that I could tweak to provide the core functionality, but not to provide the emphasis on accessibility that I think is important.

      Do I really think I can do better than those other developers? Yes, I do.

      The trouble with the maxim “don’t reinvent the wheel” is that it’s assumption that the existing wheel is good enough, or that a better wheel can’t be made. If everybody went by that premise, nothing would ever improve.

      I’m glad you have a methodology you like, but your conclusions are not mine.

      • Bas

        I do understand your remarks. I’ve also been criticised for making modules that had similar functionality but were not good enough imo. Every developer needs to find the right balance. Otherwise we would all have to create our own programming language as well ;-)

        Good luck with your CMS development!

      • Peter Lynch

        That’s the attitude! Reinventing the wheel may be futile, but wheels are wheels. Re-inventing that CM system, or that accounting system for that matter, is absolutely necessary unless you are happy to live with the limitations of those on offer.

      • http://www.brothercake.com/ brothercake

        Well exactly, there’s always a balance to be found, and every case is slightly different.

        And as Peter alludes to — the wheel is proven, ancient technology, but nothing in computing can compare to that. As far as computing goes — only binary itself is the wheel.

  • http://www.weekdayheroes.co.za RiaanP

    Could you clarify this paragraph a little more?
    “The overhead of using a database at all seems like overkill for a site like mine, when the vast majority of most of the pages is static HTML. I suspect the same is true for a great many blogs — it’s wasteful to make a database query just for a chunk of markup. It may be convenient for developers and managers, but it’s not what’s best for users.”

    The references that confuse me:
    “The overhead of using a database at all seems like overkill for a site like mine” – Are you referring to overhead on server space (for MySQL etc) or how long it takes to ‘mine’ the data from the DB? If the latter, I’m sure it’s negligible… if the former, that is also negligible.

    “it’s wasteful to make a database query just for a chunk of markup” – How is it wasteful? Databases are optimised for handling queries. If set up correctly it can do it lightning fast. To a DB it doesn’t matter if it is a SELECT * from or a join or count or whatever..

    Cataloging the data is one thing, but using structured query language really comes into its own right when you start using the built-in features for searching and making connections internally. Even for a small site that’s important. I’m not trying to shoot the idea down, but I think I would be (very) hard pressed to build any sort of data management system without employing a DB. Just my opinion. Thanks for taking the time to share your thoughts!

    • http://www.brothercake.com/ brothercake

      Compare the computational overhead of — connecting to a DB, querying the DB, and parsing the result — with just going include(data)

      How could the DB query possibly be faster than a simple include?

  • http://www.wpbrix.com Nico Julius

    I wrote a very light CMS a couple of years ago. I must say, I learned a LOT of it (programming skills), but I wouldn’t advise it to most users because it’s just too time-consuming, there is the security part and it’s just not that flexible. Today I use WordPress and that works fine for me (and my clients).

  • http://www.ingraphix.co.uk Steve Hartley

    Great article. Building your own custom applications is what web development is all about. Where’s the fun in downloading, installing and configuring someone else’s CMS?

    • http://www.brothercake.com/ brothercake

      Quite so :-)

      Though I stress that, when client needs are involved, the rules are different. I wouldn’t expect a client to pay me to spend 6 months writing something that could be 95% solved with an existing package. But when it’s just for myself, I would always rather spend the time writing something new, and then I’ll get that extra 5%!

    • Bas

      I find creating Drupal modules and learning about it at least as challenging and rewarding as pure application development!

  • http://www.autodevis.fr auto devis

    I am working on it right now but it does require a lot of fluency in the PHP language.

  • http://www.parthiansystems.co.uk/ Stuart McMartin

    One of the first websites I built as a freelance developer http://www.feonic.com/ was put together with Django – https://www.djangoproject.com/ . And I built my own CMS. Slightly mad in retrospect: first big website; first time using Django which I barely understood at the start and no experience in Python (Django is a Python Web Development Framework). A key feature is that Django builds the Admin interface for you. That’s hugely important, and helps with security.

    I’ve no doubt that attempting this without Django (or something very similar) would have been crazy (in terms of my experience and time/money efficiency).

  • http://www.neue.co.uk Mark Rushworth

    I completely agree… we’re mainly a .net solutions provider and theres no scope for a good CMS in .net without you desinging one. sure theres things like orchard but theyre so far off what wordpress is etc that its laughably bad… and dont even talk to me about umbraco…

  • http://www.johnmanoah.com John Manoah

    Starting from scratch could sometimes result in reinventing the wheel. I would may be first look for a foundational CMS that provides me the flexibility to customize its functionality and then build on top of it. FarCry was one such that I found very useful. The default one has a basic CMS but could be extended to any levels as it provides the flexibility. http://www.farcrycore.org/

    Just my two cents!!

  • http://www.integrawebdesign.co.uk Mike

    I have to agree with Rebecca Haden above regarding using a bespoke CMS from the client’s point if view.

    I have had a number of clients ask me to take over a website when their previous designer has disappeared/gone out of business/doesn’t want to know any more and they are left with a system no-one else knows. I don’t know enough to code in php although I can understand it and modify if necessary, but to work out a whole CMS would take far too much time; no client would pay what it would take. I end up fire-fighting and making small changes which don’t really solve underlying problems.

    At least, if you use an open source CMS there will always be someone who can take over who knows the system, and there will be plenty of developers monitoring and modifying the code.

  • http://www.dominical.biz Ben

    “When you use an open-source system, it’s only right and polite to credit the developers, usually with a copyright notice and link at the bottom of the page. Credits like this are great Google juice”

    Curious about the two points made in this statement. The moral one of it only being right and polite to credit the developers. Really not too hard to grasp but would like to hear your reasons for so stating.

    The second one about attribution being “great Google juice”. Really? What is your source for that?

    BTW, I use Drupal.

    • http://www.brothercake.com/ brothercake

      Well it’s obvious isn’t it? You put a link in the footer that says “Powered by Drupal” (or whatever it is) and that’s one more link-back from your site to wordpress, that improves their search rankings.

      The ethical point is simply — if you use somebody else’s work, you should give them due credit.

  • http://sebastiangreen.com Sebastian Green

    “The overhead of using a database at all seems like overkill for a site like mine, when the vast majority of most of the pages is static HTML. I suspect the same is true for a great many blogs — it’s wasteful to make a database query just for a chunk of markup. It may be convenient for developers and managers, but it’s not what’s best for users.”

    Use of caching can stop database queries and vastly improve site speed.

    Valid arguments why rolling your own is good, but as you said it was not cost effective. Why would a client pay you X amount to re-invent the wheel?

    • http://www.brothercake.com/ brothercake

      It depends. For the most part, they wouldn’t, but it depends on what they want.

      I have clients who come to me precisely because they want a custom solution, because nothing that exists will do what they want, and/or they trust me to produce something better. I had a client recently pay me a month’s development time to write a single client-side form control.

      A client would pay for that because they wanted it. But for sure — if a client says “I need a CMS” then I wouldn’t say “pay me to write one”, I’d say “use this one”.

  • Pierrot

    Interesting reading and comments !
    I took the option to buy (full rights on code) a CMS able to integrate extension easily.
    I worked with it and found it very easy to tailor and custom build depending on my need.
    All core functionalities (admin, right, sanitizing, …) is already done and packaged within powerful functions.
    Now I’m a happy camper with my swiss army knife. it’s the core for all my site (e-commerce, blogs, …) and will never change except someone points me to something similar, powerful and …. producing “modern” code ….. That’s the drawback : with ages, I have to maintain it to replace all “table based” design with modern layout, change javascript with more powerful jquery, replace outdated CSS directive …

  • John

    James, ma brother from another mother, you are absolutely right. I too prefer to write my own CMS as I don’t find it motivating to modify an existing CMS (wordpress, joomla) and make it work according to my needs. I prefer bespoke stuff and love doing it. Cheers.

  • http://www.nuresponse.com Mark

    This is a great article. I’ve wrestled with this exact same quandary many times before. I spend allot of time, writing plugins for WordPress that I use on my client sites, but many times the whole platform is overkill for what I really need.

    Great food for thought!

  • Xelions

    This article was a great read ;)

    “very specific idea of what it should do, and how it should work.”

    Even for basic client needs its surprising how most CMS solutions are just OTT.

    “And when it comes to actually using the system on a day-to-day basis, writing your own means there’s no additional learning curve.”

    And for developers/clients using your CMS theres nothing that well-written documentation can’t provide.

    “which is that a self-written CMS can still be the victim of a security exploit, in fact it’s more likely to be.”

    I tend to disagree with this, if the code is written well, its not a super-feature-packed CMS, all the input is verified and sanitized, then the only security issues would be with the server software and the client.

    Initially when you came up with the idea of developing your own CMS did you outline ALL the features you want? and have you added more features during development? as a percentage of the initial total how many more features have you added?

    • http://www.brothercake.com/ brothercake

      “And for developers/clients using your CMS theres nothing that well-written documentation can’t provide.”

      It’s not just documentation though, is it? It’s documentation, plus the time to read and understand it, and the time to practise and become familiar with it.

      “if the code is written well, its not a super-feature-packed CMS, all the input is verified and sanitized, then the only security issues would be with the server software and the client.”

      Sure, in an ideal world. In the real world however, mistakes are made. The point of having a community effort is more pairs of eyes, more people to spot those mistakes that one person working on their own could easily miss. Security errors are not just naive programmers who don’t know how to secure their data, they’re highly skilled and experienced programmers making typos.

      “Initially when you came up with the idea of developing your own CMS did you outline ALL the features you want”

      Yes, and the feature set didn’t change at all. I simply underestimated how complex it would be to program features that were so easy to describe.

      • Xelions

        “It’s documentation, plus the time to read and understand it, and the time to practise and become familiar with it.”

        That’s a given regardless of what CMS a client chooses, unless they are already familiar with the CMS and features they want.

        “Sure, in an ideal world.”

        There are some very talented programmers out there :)

        “In the real world however, mistakes are made. The point of having a community effort is more pairs of eyes, more people to spot those mistakes that one person working on their own could easily miss. Security errors are not just naive programmers who don’t know how to secure their data, they’re highly skilled and experienced programmers making typos.”

        The reason why a community effort is required for most CMSs, because they’re all trying to become the swiss army knife CMS. Granted, 2 or 3, or more on a project is better than 1, so they can all contribute and double and triple check code, even then some modules don’t even get a run over by another pair of eyes.

      • http://www.brothercake.com/ brothercake

        It doesn’t really matter how talented a programmer is — the best programmer in the world can make mistakes.

        I mean I’m not exactly drawn to collaborative development. I’m happy working in teams, sure, but generally happier working on my own. Even so, I wouldn’t try to deny that there are clear benefits to working with others, and this is a prime example of one of those benefits. Whichever way you slice it — a CMS that only one person worked on, is far more likely to contain one or more security flaws, than one where several people worked on the same features.

  • Markus

    there is only one answer – DRUPAL

  • http://www.titan21.co.uk Tim Smith

    I actually have created a custom CMS for a client and there were times that I wondered what the hell I was doing but I got a lot out of it – namely understanding PHP more (which was what the CMS was written in). It forced me to look at functions and libraries I had never had the chance or the inclination to look at before and to look at problems in different ways. I fall in and out of love with WordPress on a monthly basis (Globals? Any OOP guys?) and at that particular point, WordPress and I fell out!

    The old adage “why reinvent the wheel”? Why not? The first wheel was probably made out of stone and a stick (a la Fred Flintstone) – better wheels came along eventually…

  • http://www.josedeza.com Jose Deza

    Hi James,

    I believe that you should have a close look at MODx Revolution.

    Cheers

  • http://www.simplycious.co.uk Emma Davis

    I have always developed my own CMS for my clients (in fact, many years ago, it was how I learnt PHP) and will continue to do so as I then know that they have all the facilities they require to update the areas of their site they really need to (clients do not need to be able to update content on mainly static pages, for example the introduction text on the home page, or the text on the contact page). It also ensures that if any expansions need to be made to the CMS that I can go in and do it relatively quickly and easily as it is my own code that I am working with and understand.

    The comments in response to this post have really confirmed my fears that many people are professing to be website developers but actually have no idea what they are doing as they are just using pre-built systems and frameworks. For example, WordPress IS NOT a CMS (sorry I don’t care what anyone says), it is a blogging platform that you can add plugins to to convert it into a ‘type’ of CMS (ensuring unnecessary code bloat everywhere) but will not be absolutely fitted to the requirements of the client.

    Once you have made one or two CMS for clients yourself you can re-use elements in the future, so may be time consuming to begin with but in a sense you are making your own framework that you understand and can add to and re-use at any time in the future to ensure your clients get the CMS they need specific to their requirements.

    If you cannot code your own CMS then you shouldn’t be professing that you can provide this service to your clients – leave it to those of us who have taken the time and effort to learn the programming languages and can use them effectively and efficiently.

    Rant over!

    • http://www.brothercake.com/ brothercake

      I have a certain sympathy with your point of view, but I think you’re being a little harsh!

      It’s true that WordPress is very much a blogging-platform, and there are many things it can’t easily do, but that doesn’t mean it isn’t a CMS.

      And it’s true that there many developers who wouldn’t be able to write their own system, just as their are developers who can only implement client-side scripting using jQuery, but that doesn’t mean they’re not professionals, they simply serve a different market, than someone like you or I providing bespoke programming solutions.

      I don’t think anybody was suggesting that fitting clients with pre-built solutions is comparable to that, but then not all clients can afford that kind of service, or need that kind of precision.