NAME
MKDoc::Article::Overview - Overview of MKDoc::Framework
SUMMARY
This is an article, not a module.
HISTORY
Webarchitects is a partnership in the UK. We have been doing a lot of governmental websites. Our objectives have always been to advance and promote standards information architecture and online learning technologies.
This research has led us to produce our own content management system over the years through MKDoc Ltd.
MKDoc CMS is now a mature products but all the code lives in one big CVS repository. Each time we add a feature, the codebase increases a bit more. Separation between various system components is sometimes a bit blurry. Although MKDoc CMS is not at the stage of "unworkable spaghetti code that needs to be thrown away", there is quite a fair bit of cleanup / refactoring to do.
MKDoc is part of a double effort:
OVERVIEW
MKDoc is a mod_perl friendly system in which web applications can be written.
Rather than re-writing MKDoc from scratch, we have extracted it from our existing content management system. Here is the process which has been used to do so:
- Strip all functionality
- See what is remaining
- Refactor & make minor improvements
- Document thoroughly
What Remains? You might ask. Well, let's see...
Install scripts
MKDoc comes with MKDoc, an easily subclassable module which provides a standard installation procedure.
Most open source server-side software is simply impossible to install. Ever tried to install RT, Slash or DMOZ? MKDoc MKDoc aims at being merely a nightmare to install - but certainly possible.
A pluggable chain of responsiblity.
MKDoc offers a 'chain of responsibility' design pattern to handle incoming HTTP requests. There is a predefined list of handlers which are called plugins in MKDoc jargon. Each plugin can choose to process the request or not.
At the end of the plugin chain, there is always the MKDoc plugin which always processes the request when everything else has failed. It displays a '404 Not Found' page.
A multi website system
MKDoc has been designed to run multiple sites - and MKDoc::FrameWork reflects that.
When you install MKDoc, you create a master repository which contains an empty httpd.conf file. You just need to include this file in your apache config. Unless you have specific requirements, you should not have to mess with Apache config files.
The way it works is that whenever you install a new site, it creates httpd.conf files in the site directory which are included the the master directory's httpd.conf file. All you need to do once you install a new site is restart apache.
A customization system
By default plugin use Petal templates which are stored along with the code somewhere in @INC/MKDoc/templates.
When you install MKDoc, you have to create a master directory in which you can define server-wide defaults for all your MKDoc sites. For example you can redefine a template in the MKDoc::Framework master directory and all your MKDoc sites will use this default.
When you install an MKDoc site, you can customize further at the site level (as opposed to server-wide level). This means that MKDoc products offer three degrees of customization:
Multi-lingual support (optional)
By default MKDoc::Plugin class coupled with MKDoc::Language will choose the appropriate template based on content negotiation. Other mechanisms than content negotiation can be used through subclassing.
Some optional libraries
- MKDoc::Plugin
-
By default MKDoc::Plugin uses MKDoc::Error for easy error reporting - which is especially useful with forms / user input validation.
It is also coupled with MKDoc::Language to provide your web application with multi-lingual capabilities.
- MKDoc::HTTP::Request
-
A subclass of CGI.pm coupled with a per-request singleton design pattern. Features minor bugfixes and extra methods over CGI.pm.
- MKDoc::HTTP::Response
-
Counterpart of MKDoc::HTTP::Request, you can use MKDoc::HTTP::Response to easily and correctly format your HTTP responses.
CAVEAT
MKDoc on its own does nothing.
However we are in the process of un-entangling our code base, which over time will provide the following components:
MKDoc::Authenticate
This MKDoc product will provide:
- User management facilities
- User signup / signout with customizable email confirmation
- Apache authentication handlers
- Possibly remote authentication mechanisms & handlers
MKDoc::Authorize
This MKDoc product will provide:
MKDoc::Forum
This MKDoc product will provide IMAP based, threaded discussion forums.
MKDoc::CMS
This MKDoc product will provide the functionality presently offered by MKDoc 1.6, our commercial content management system. Minus MKDoc::Forum which will be a separate product.
See http://mkdoc.com/ for details.
AUTHOR
Copyright 2003 - MKDoc Holdings Ltd.
Author: Jean-Michel Hiver <jhiver@mkdoc.com>
This module is free software and is distributed under the same license as Perl itself. Use it at your own risk.
SEE ALSO
Petal: http://search.cpan.org/author/JHIVER/Petal/
MKDoc: http://www.mkdoc.com/
Help us open-source MKDoc. Join the mkdoc-modules mailing list:
mkdoc-modules@lists.webarch.co.uk