The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

MKDoc::Core::Article::Overview - Overview of MKDoc::Core

SUMMARY

This is an article, not a module.

HISTORY

MKDoc is a mature, feature-rich web content management system which promotes standards compliance, accessibility, usability and information architecture.

However, MKDoc code lives in one big CVS repository. Each time a feature is added, the codebase increases a bit more.

Separation between various system components is sometimes a bit blurry.

Although MKDoc is not at the stage of "unworkable spaghetti code which needs to be thrown away", there is quite a fair bit of cleanup / refactoring to be done.

The two main goals of MKDoc::Core are to:

Cleanup / Refactor MKDoc
Open-source MKDoc

OVERVIEW

MKDoc::Core is a mod_perl friendly application framework in which web applications can be written.

Rather than writing MKDoc::Core from scratch, the following has been done:

Take the existing MKDoc code
Remove all user functionality
See what is remaining
Refactor & make minor improvements
Document thoroughly

What Remains? You might ask. Well, let's see...

Install scripts

MKDoc::Core comes with MKDoc::Core::Setup, an easily subclassable module which provides a standard installation procedure for MKDoc software packages.

MKDoc::Core aims at providing an easy installation procedure - or at least easier than other server-side OSS packages such as RT, Slash or Bugzilla. Well. Maybe :)

A pluggable chain of responsiblity.

MKDoc::Core 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::Core::Not_Found 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::Core reflects that.

When you install MKDoc::Core, 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 fiddle around too much 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 do once you have installed 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::Core, you have to create a master directory in which you can define server-wide defaults for all your MKDoc::Core sites. For example you can redefine a template in the MKDoc::Core master directory and all your MKDoc::Core sites will use this default.

When you install an MKDoc::Core site, you can customize further at the site level (as opposed to server-wide level). This means that MKDoc::Core products offer three degrees of customization:

"Factory defaults"
Server wide
Site wide

Multi-lingual support (optional)

By default MKDoc::Core::Plugin class coupled with MKDoc::Core::Language will choose the appropriate template based on content negotiation. Other mechanisms than content negotiation can be used through subclassing.

Some optional libraries

MKDoc::Core::Plugin

By default MKDoc::Core::Plugin uses MKDoc::Core::Error for easy error reporting - which is especially useful with forms / user input validation.

It is also coupled with MKDoc::Core::Language to provide your web application with multi-lingual capabilities.

MKDoc::Core::Request

A subclass of CGI.pm coupled with a per-request singleton design pattern. Features minor bugfixes and extra methods over CGI.pm.

MKDoc::Core::Response

Counterpart of MKDoc::Core::Request, you can use MKDoc::Core::Response to easily and correctly format your HTTP responses.

CAVEAT

MKDoc::Core on its own does nuthin'

The following products have been written completed:

MKDoc::Auth

This MKDoc product provides:

User signup / signout with customizable email confirmation
Apache authentication handlers
Login / Logout / Log as somebody else

MKDoc::Forum

This MKDoc product provides IMAP based, threaded discussion forums. It can be used with any authentication mechanisms and works "out of the box" with MKDoc::Auth.

The following products need doing:

MKDoc::Authz

This MKDoc product will provide:

ACL based authorization facilities
Apache authentication handlers
Some kind of web interface for administration

MKDoc::CMS

This MKDoc product will provide the functionality presently offered by MKDoc 1.6, our proprietary content management system - Minus MKDoc::Forum which is now a separate product.

See http://mkdoc.com/ for details.