Modularisation

Why Modularize?

Modules Types

Dependencies between modules will be layered in the obvious way. For example:

http://svn.apache.org/repos/asf/james/server/sandbox/design-doodles/modules/dependencies.png

Build Modules

Contains code for James modular build

Deployment Modules

Contains code required to deploy James in various container environments

Function Modules

Factors out function from container specific implementations

Library Modules

Factor out common library code reused by functional modules into library modules

API Module

Single module containing the core James API

Execution

Stage One - Prerequisites And Preparation

Before code can be moved out from the phoenix deployment, some prerequisites need to be completed. This will allow the code moves to be planned whilst these are executed. Space needs to be created in the subversion tree by pushing the existing code base down a level. A lightweight ant build framework will be needed to allow efficient creation of modules.

[COMPLETE] Phase 1

Make space for modules within james server trunk

[COMPLETE] Phase 2

Top level build

[COMPLETE] Phase 3

Upgrade build:

module builds

Phase 4

Create empty base module top to contain API interfaces

Stage Two - Factoring Code Into Modules

TBD :-)

Recommendations:


Module Planning Proposals

Deployment

Function

Library

API

Need to think about timing of mailet API move


Understanding The Modular Build

Master Build

Adopting some standard naming conventions allows the master build to automatically pick up all modules of a particular type. Subant can then be used to call the same target to all module build files of a particular type. This allows the modular build to automatically maintain the correct build order within needing to know about detailed relationships between modules.

Suggested conventions:

Module Builds

Minimal Requirements

Deployment Modules

The minimum requirement is for modules to provide an ant build file which:

Other Modules

The minimum requirement is for modules to provide an ant build file which:

Standard Module Builds

To reduce maintenance, standard builds will be provided for modules that want to adopt a standard module layout.


Unresolved Issues

Logging

JAMES uses the Avalon framework for logging via AbstractLogEnabled. This introduces a deep coupling between the container and components running in the container that requires resolution.


First Cut User Components

user-api:

domain-api:

user-library:

avalon-user-function:

jdbc-user-function:

Development/Modularisation (last edited 2009-09-20 22:58:44 by localhost)