This document outlines the architecture developed for ccPublisher 2.x. At this point it is still considered a draft and subject to change. No applications based on the ccP 2.x codebase have been released. ccPublisher 2.0 will be the first application released using this code base, probably in February 2006.
The following are goals we've attempted to meet while developing ccPublisher 2.x:
The following are considered non-goals:
The core of ccPublisher 2 is the P6 library, a set of common code intended to be used as a whole to perform core actions. P6 Applications consist of two phases: declaration and configuration. Declaration is the development of objects, event listeners and other code. Configuration consists of instantiating and connecting that code.
Configuration is handled through the use of ZCML, the Zope Configuration Markup Language. The ZCML directives configure adapters, event listeners and objects to instantiate. It also defines metadata fields to include in the uploaded package. Finally, the configuration can be arbitrarily extended using 3rd-party ZCML snippets to register new functionality. One example of this might be a blog pinging extension which posts a blog entry when new content is uploaded using a P6 Application. Note that depending on the registration mechanism used, it is possible to add content to all P6 Applications installed on a user's system.
In addition to ZCML, P6 uses the Interface and Component model from the Zope3 project. We maintain a snapshot in the CC Tools CVS Repository.
The P6 package forms the core functionality of ccPublisher 2 and related applications. This section provides an overview of the sub-packages and modules developers should be aware of. For more detailed documentation of specific items, see the Epydoc documentation at http://mirrors.creativecommons.org/developer/doc/p6/current/. Note that some subpackages, such as p6.configure and p6.zcmlsupport, only provide internal support for bootstrapping applications.
The p6.api module provides a sub-set of functionality from other p6 sub-packages. The api module is intended to provide a simple way to import commonly needed functionality.
The p6.app package collects application-level functionality, including top-level window classes. This may be merged into p6.ui in a future release.
A core piece of functionality for P6 applications is the collection of metadata. The p6.metadata package provides interfaces for encapsulates metadata fields and metadata groups. A metadata field is a single piece of information, such as artist or title. A metadata group provides a logical grouping for one or more fields. A metadata group may also be associated with a particular type of item or interface. The p6.ui package introspect this information for generating a user interface.
The p6.storage package encapsulates the interfaces used for Works, Items, and backend "storage" providers. The current implementation includes generic interfaces, interfaces for file-based items, and a generic No-Op storage provider. For an example of a custom storage provider, see the ArchiveStorage class in the ccPublisher distribution.
The p6.ui package provides three primary pieces of functionality: user interface generation for metadata groups and fields, stock wizard pages, and interfaces for custom wizard pages. It also includes a sample, custom page in the form of the license selector wizard page (license.py).