Introduction to the Cadre CMS

Cadre is a content management system built, primarily, on wiki-like principles. If we were to tear the code apart, the design principles would be somewhere between Google Wave and MUMPS—if that sounds scary or like a bad idea, you're in the right place.

Put on your script kiddie hat for a moment, and imagine you're staring at a database specification for a wiki, or a forum, or a CMS. You're probably going to notice that there are a lot of things in common amongst them: the central object is the humble entry, which may or may not be organised into some formal structure like a thread, may or may not be editable, usually has a title, and so on. There are also users, who can have rights to entries given to them and taken away by other users, or by the governing code responsible for new entry creation, or whatever. These users may be organised into groups, to make it possible for these groups to have powers assigned to them, too. Sometimes the differences in power between users might be dramatic—say, on a blog, where one class of users can post entries, and the other can only comment.

This is, of course, standard fare for a file system or a wiki, but forums and CMSes and blogs have proven to be even more popular than wikis for running sites (despite obvious exceptions), which are confined to what they were intended for (encyclopediae.) Despite this, almost all of these systems are fundamentally similar; even e-mail and instant messaging services fit in this category if you have the right method of checking for updates.

What matters in the success of these systems is the perspectives and filters that data in the 'base is piped through. Each system uses some manner of template to grant structure to the information we're looking at ('edit post' might be one such template, as might 'view thread' or 'list threads') and these are essentially decorated database queries. The whole selling point of a CMS, blog, wiki, or whatever, consists of a unique mixture of these templates (and their features), and although the database back-end may be openly licensed, it will probably never be reused in another project simply due to the overhead of extracting and repurposing it.

So Cadre is an experiment in doing the counter-intuitive: moving templates into the database, and focusing on this act as a primary development activity. No page on this site is being fetched from the database directly, but filtered through a sandboxed script that can manipulate its presentation—add links to related pages, perform search-and-replace tasks, mess with formatting—and every entry in the structure has a parent post, an author ID, a group ID, and permissions not totally unlike the traditional Unix access control system.

Actual templates, no longer special scripts, are just citizens of this entry-centric structure, and can be viewed and edited by anyone with the appropriate permissions, just like in a file system.

This may prove to be a miserable case of second-system effect, but we've done this by putting computer operating systems in their own file systems for decades, and actual computer programs in their own address spaces for even longer, thanks to Von Neumann. Why should the web be any different?

Okay, you say: but clearly there's a reason that structure-specific site frameworks have thrived where general ones haven't. That's fair. But Cadre can still appeal to developers as a prototyping tool: it can let us build those specific systems on top of it, and experiment when we think we have a new model or mechanic that might prove worth exploring. By providing a robust database interaction layer and a comprehensive permissions system, we can ensure that such prototypes are created and explored in a quick and secure manner.


  1. About Eumorphia
  2. About Paralogue