MoinMoin is a popular and powerful wiki engine in Python.

The talk will give an introduction to the MoinMoin core source code, extension concepts and extension development. We will use the current development branch (1.6) to do this, but most stuff also applies to 1.5 (production releases).

Shortly, we will present the flexibility of MoinMoin and how the user base (Python, Apache, Ubuntu, ...) looks like.

We will give an architecture overview as well as explain some code and show how you can write your own.

Slideshow

MoinMoin - Introduction for developers

http://moinmoin.wikiwikiweb.de/EuroPython2006

Held by

Thomas Waldmann

Alexander Schremmer

Introduction

Some historical data

Date

Version

SLOC

Comment

2000-07

0.1

470

Jürgen Hermann's fork of Martin Pool's PikiPiki 1.62

2002-05

1.0

15300

Team development started

2003-11

1.1

23500

2004-02

1.2

14700

Moved contrib stuff to wiki, removed some python libs we had included

2004-12

1.3.0

20100

Introduced MoinMoin DesktopEdition

2006-07

1.5.4

47000

Latest released version

2006-07

1.6dev

47500

Development branch: Lupy search replaced by Xapian, bigger refactorings

Data was generated by sloccount

User base

There are various groups using the MoinMoin wiki. For example:

How development is done / Communication

T

Architecture Overview

MoinMoin distribution code is some (more or less modular) core code plus a set of (built-in) plugins.

Plugins

MoinMoin uses a lot of plugin types:

action
Process the request, "controller"
formatter
Define the target format (HTML, Docbook, XML, ...)
parser
Parse parts of the page (calls the formatter)
macro
Calls to Python code in the page
xmlrpc
XMLRPC plugins can be easily called remotely
filter
Make the fulltext search engine understand various attachment types
theme
Change the skin of the wiki

Other modular stuff

No plugins, but meant to be extended by using the clear interfaces.

Request classes

Page/PageEditor

/!\ Directly accessing the file system is not necessarily upwards compatible.

A

User object

action Plugins

parser / formatter Plugins

parser / formatter Plugins

parser / formatter Plugins

Syntax sample:

{‌{{#!rst
This is *reStructured text*!

*Really*
}‌}}

(!) So keep in mind:

T

macro Plugins

macro plugins

(!) So keep in mind that macros:

theme Plugins

xmlrpc Plugins

MoinMoin implements Wiki XMLRPC:

Usages include:

A

filter Plugins

Filters are simple plugins that help the moin search indexer to index different types of documents:

We currently have filters for:

auth Modules

MoinMoin uses a configurable list of auth methods and calls one auth method after the other at the beginning of request processing.

An auth module gets this as input:

And returns:

converter Modules

Currently there is only one converter module: text_html_text_moin_wiki.

Used together with FCKEditor:

T

Future

Moin2 / Google Summer of Code

Refactoring

We want a more OO-like design of MoinMoin core:

Refactoring - MimeType approach

We will not have pages and attachments any more, but a hierarchy of mime-type item classes:

Storage

Search

We will have a better search using the Xapian search engine:

A

Wiki Synchronisation

Your contribution

Thanks for your attention!


Removed

A walk through the code (optional)

Core Code

Stuff like Page, PageEditor, wikiutil, wikiacl, user, etc. (most stuff located directly under the MoinMoin module) is currently considered core code, as well as some packages distributed within the distribution archive.

Other modules

i18n
translations of the system texts to different languages (we use gettext to make *.mo from *.po files) and some i18n related tools
logfile
access the log files (writing entries, parsing entries, ...)
mail
some mail processing (notify as well as mail import)
stats
making access statistics, text or graphics
support
some stuff we include for convenience, like fixed versions of Python stdlib modules, support for cgi tracebacks or Xapian wrappers

wikiutil

As the name suggests, this is a collection of misc. utility functions, which are used all over the place:

MoinMoin: EuroPython2006/SlideShow (last edited 2007-10-29 19:11:32 by localhost)