Content Management SystemsThis entry was originally published at Ken Noland
I’m not a website developer, but in the course of writing this website, as well as the website for Whatif Productions, I’ve found an area of website development that is seriously lacking in any formal open source tools. Content Management Systems!
When I think of a website, I see pages, pictures, text, and everything all wrapped into a nice little package and I should be able to manage it all from one nice little user interface. This would traditionally be known as a Content Management System(or CMS for short). When I do a search for the most popular open sourced content management systems out there, I find Joomla, Drupal and a host of other hack and slashed tools out there.
When I first settled on using Mambo(the predecessor to Joomla), I found myself in what appeared to be heaven. The administrative panel looked nice and shiny, with all sorts of tools and widgets to allow me to tweak all sorts of things, but as I dug deeper into the source to develop a simple website I kept running into problems after problems.
The first problem that I ran into was that I couldn’t develop a hierarchy for the website. Sure, I could split things into categories and then into sections, but that only allows me a fixed depth to the website. That’s not what I wanted, and that seams incredibly shortsighted for a website to be fixed with just that level of depth. I had to rush to build my companies website. I knew Mambo the most, so I went with it.
I briefly took a look at Joomla, the successor to Mambo, but once again, time constraints put me in a crunch mode and I had to get Mambo up and running quick. Joomla was only at 1.5 at the moment and still had all the limitation of Mambo so I had to pass simply because I would rather fight the demons I know then to confront the unknown.
I was fixed to this concept that everything had to be contained within categories, and then further subdivided into sections. Fine, I’ll go ahead and set that up! When I did that, I noticed that links where automatically generated from the categories to the sections and from the sections all the way to the individual content items. What I noticed then was the display parameters, which is the individual options for how that page is to be displayed, is pulled from the main menu! What this means is that in order for me to hide and/or display certain features from within a page, I had to include it in a menu and set the viewing parameters from the menu… huh?
Okay, so that made no sense to me whatsoever. A page viewing parameters should come from the individual page, not the menu. Sure, you should be able to override the display properties from the menu or whatever page is linking to it, but it should not be the default display properties. You should be able to set how that page is displayed from within the page itself, and then if you want to change how that page is displayed, you should be able to override it in the link via display property templates, or something like that.
Okay, I’ve said enough about Mambo. Joomla is no better since it is derived from the same source base. Drupal didn’t have the support we were looking for and so that wasn’t an option. Once again, I’m cornered with a half assed solution and I’ve got to get it working!
After fighting with it for a little over a month, I finally got it working with all the bells and whistles I wanted. It has Gallery2 integration, RSS support, administration from one simple user interface and the ability to synchronize between our development site and our live site. With some magic, I was even able to fix the dependency on the menu links to set the viewing parameters… but that was a fair bit of work.
So here’s what I propose…
When I think of a Content Management System, I think of something akin to an operating system. The basis of an operating system is to be able to handle files, and those files are then read by programs and the programs interpret the data and spit out the necessary stuff to the output device(your monitor). Video games have complicated structures to allow for content management, such as dedicated resource managers, memory managers, file managers, and so forth, all custom tailored to work from within an OS that contains… you guessed it… files! Now, taking the example of a video game engine combined with an operating system and applying that to a website development platform, things become very interesting very fast.
If you consider that the basis of a website contains text and images, and if you save those text and images in folders then you have a structural hierarchy. Now those text and images can be opened via ‘applications’. I’ll get back to applications in a little bit, but first I want to talk a bit about text and images.
Text also needs to conform to locality, which is basically the translated version of the root text. You have a default language, and that is your primary text id, but what if you wanted English and Russian version of the same text. It wouldn’t make much sense to add another text item specifically for the Russian version and setup a separate structure, so a text object also contains all of its own translations as well, and the same goes for images. Passing in the locality is just a parameter to the text object.
Say we’ve setup our text and images into a nice little structure, but what now? All we have is just text and images. This is where the applications come in. The most common type of application is going to be the ‘Page Viewer’.
The Page Viewer application takes a page file, opens it, applies the template to the contents of the page file, and then spits the results back out to the client. Easy enough, see?
So now we introduce two new types of file; a page and a template. Lets discuss templates for a little bit.
Templates define general areas that text and images go. In the example of my website, I have a header, a sidebar, a footer, and a main text area where you are currently reading from. The header contains my name and a brief sentence about this website, as well as a menu that you can navigate to and from various pages on this website. The sidebar contains tools and widgets that the end user can use to navigate around my website. The footer doesn’t really contain much, just a link to Wordpress and the template designers. Let’s discuss this using my website as the example
Since a template defines areas, then the top area would point to a common text object that would appear on every page, otherwise known as a template static text region. This would be able to be edited via editing the template. The menu would be another area that the template defines. The menu is a separate application that opens a menu file and spits out the resulting menu in a manor that the template can understand and then translate into HTML. The same holds true for the sidebar widgets, which the template requests those applications and then translates that to display it.
What about scalability? What if I wanted to browse the site using my cell phone? The Page Viewer would then need to select the appropriate template per each page object, and each template will contain a list of supported browsers and necessary extensions to run that template.
Template areas can be predefined with default stuff for the different areas, but the page file should be able to override those and populate the template with further information if necessary. The same holds true for the HTML headers (the title, and other various meta data that some search engines utilize), the template manages that data as well, but the page can override or append any other additional information in the headers, according to the template rules.
So the page viewer can only open page files and these page files are contained within the predefined file system. The page also opens a template file which then can point to any other type of file, but the main section of the page is the text contained within. Text can link to images and tables and further text objects, so we start to see where things become dependent. Dependency mapping is marked inside the file system so that things can not be arbitrarily moved and deleted without the appropriate action being done on the dependent object list.
Revisioning is also important. Being able to revise an object and also see any previous revisions can also be handled by the file system, which also maintains the previous dependencies. Once in a while, it will be good to clear out all revisions, which is another process that the file system will be able to handle and re-link dependency mapping, which is a function of the file system.
Access control rights, or who owns what object and what access other people have to that object is also defined in the file system.
Now let’s talk about forms. In this example, I am running a blog. The Page Viewer then has a link to the Blog Viewer application to fill the main section of the area, but that only covers the display of text, but not the feedback and comments section. The page viewer treats those inputs as Forms. Forms are directly tied into the application that instantiated them and thus allowing two way communication from the website to the individual browsing the website.
I haven’t really talked about administration up until this point because I wanted you to get accustomed to the idea that everything is controlled via applications. You’ll notice that all applications we’ve discussed up until this point are all ‘viewers’, but administration is handled via ‘editors’, a separate class of applications that allow you to edit the components of your website. Likewise, when you see a ‘viewer’, there’s also an associated ‘editor’ and access to those editors is controlled via the file system access control list.
Conclusion
So this concludes my ideal website content management system. I don’t know if I’ll ever have the time to build something like this, but anyone with a couple weeks worth of free time is welcome to explore trying to implement something like this. As a video game programmer, I’m not going to branch off and try to take over a separate industry, only make observations and I hope these observations assist someone out there.
Thanks,
-Ken Noland