Bookmark and Share

Worse Is Better Content Management System

An essay on what leads a programmer-by-accident and not-really-a-web-developer to create yet another CMS, called Worse Is Better Content Management System.

As Linus Torvalds puts it, we all “scratch our own itches”. For a long time I had had several (small) websites to maintain. Those were mostly Dreamweaver-style, quite modest sites that usually required just small updates — like upcoming event listings — every now and then. Such small edits are easy enough to put directly into the HTML with any code editor. However, big changes would have been quite awkward, and therefore the sites stayed kind of dead; the same year after year.

On top of that, I wanted to make my own “blog” or home pages to collect various stuff and thoughts. I definitely needed a smart way to handle simple website creation.

So I tested a number of PHP+MySQL based Content Management Systems, since they seemed to be what everybody else was using, and that combination of technologies would work out of box on most web hosts. There were numerous quite attractive ones, but each one of them felt way overkill for my needs. Besides, being relatively complex systems, all of them were full of security holes that would have required frequent updating in order to even keep the site working — definitely a pain in the ass. And of course, old-school “university home page” web hosts have hardly even heard about PHP or MySQL. Static HTML is the only way to go sometimes. Besides, in terms of security and speed, it’s superior to any dynamic solution.

I was also wondering why do most content management systems store texts in databases while storing all other content (images etc.) in separate physical files? The distinction is quite artificial, IMHO, and probably just a result of blindly following textbook examples and everybody else, without stopping to think about alternatives. Wouldn’t it make sense to store especially the texts in plain files, so that they could be edited with a text editor? Yes, it would! See DokuWiki’s FAQ and PmWiki’s documentation for further discussion on the virtues of flat file storage.

Then I stumbled upon Markdown. Markdown is a text formatting syntax and a text to HTML conversion tool for web writers. What makes it special is that its syntax doesn’t look like syntax at all. As Markdown’s own introduction puts it: The idea is that a Markdown-formatted document should be publishable as-is, as plain text, without looking like it’s been marked up with tags or formatting instructions. It succeeds in this original goal admirably well. Plus, it has a further improved implementation in PHP available, called PHP Markdown Extra.

Markdown can be used as a module in WordPress, among others. But if you

  1. Prefer storing your writings in plain files instead of databases,

  2. Dislike too much automation, but also dislike completely hand-coding your site,

  3. Are looking for something lighter than Drupal or WordPress,

then we have something in common.

PHP Markdown Extra was already 50 % or more of what I needed. What remained to be made was some simple and elegant way to represent the site structure, to create navigation into a HTML template, and to put the whole thing together. WIB CMS does just that: it creates the site navigation according to a simple, monolithic TOC file. You can use your favorite text editor to edit your articles and TOC, and everything is stored in good ol’ plain files. Navigation is a tree structure of unlimited depth (although you probably don’t want to use more than two or three levels). Everything is easy and simple and just works out of the box.

That said, WIB is a bit of a programmer’s CMS: it doesn’t have any graphical front-end at all, and all editing etc. is done via the file system rather than with the web browser. However, you don’t have to be a programmer to use it. You just have to be or get comfortable with a text editor of your choice, some means of transferring files back and worth with the web server, and maybe some version control system (many consider Mercurial to be the best no-nonsense choice). If you dare to take those steps, you might never look back at “easy to use Web 2.0” systems again.

WIB CMS. Because worse is better.

Worse is better

“Worse is better” is obviously similar to the better-known minimalist motto “less is more”, but with an additional ironic twist. It was originally conceived by the programmer guru Richard P. Gabriel to describe that software quality does not necessarily increase with functionality. I’ve had this philosophy in mind while making my CMS, hence the name.

The phrase is, according to Wikipedia, formed to appear ironically illogical while resonating with truth at a deeper level of understanding. Cool, huh?

In programming context it means to make the right trade-offs so that everything is as intuitive and simple as reasonably possible, even if it may lead to ambiguities or limitations in special cases. When in doubt, err towards simpler solution. Prefer convention over configuration; everything should be preset so that it will just work as expected, with no need to adjust a thousand parameters first. Special cases are rare, usual cases are frequent, so the latter is what matters (According to this epistemology; however, it’s just one of the possible ways of thinking, not an universal truth. Also be aware of Black Swans.)

Last modified: 2009-10-25 17:03 +0200

blog comments powered by Disqus