ccPublisher 2:
Architecture & Design

Nathan R. Yergler

Software Engineer,
Creative Commons

Overview

[any material that should appear in print but not on the slide]

The Year Behind Us

[any material that should appear in print but not on the slide]

Goals for ccPublisher 2

In the development of ccPublisher 2, I actually did a partial implementation which implemented a strongly-separated MVC architecture. While this worked, a customizer observed (and I am forced to agree) that he thought 50% of the overhead could be removed without harming the readability or flexibility of the code. So we want to deliniate different functions within the code, but we don't want to impose so much of a burden on the implementor or developer that they have to be aware of the entire system to customize it.

The P6 Architecture

As I'm using the P6 library I'm finding places where the intermingling (that seemed logical at the time) doesn't make sense, so some refactoring is ongoing.

The P6 Package

[any material that should appear in print but not on the slide]

Implementation: Terminology

Implementation: Configuration

[any material that should appear in print but not on the slide]

app.zcml

<configure xmlns="http://namespaces.zope.org/zope"
           xmlns:i18n="http://namespaces.zope.org/i18n"
           i18n_domain="p6">

  <!-- ccPublisher Application Configuration          
       (c) 2005, Nathan R. Yergler, Creative Commons  
       licensed under the GNU GPL 2                   -->

  <!-- P6 package must be included in order to support app configuration -->
  <include package="p6" />

  <!-- Application specific configuration -->
  <include package="ccpublisher" />
[any material that should appear in print but not on the slide]

app.zcml: Storage Registration

  <storage
     name="NoOp Storage"
     factory="p6.storage.basic.BasicStorage"
     />
[any material that should appear in print but not on the slide]

app.zcml: Metadata Declaration

  <metadatagroup
     id="workinfo"
     title="Tell Us About Your Files"
     description="Test description."
     for="p6.storage.interfaces.IWork"
     >

     <field id="holder"
            label="Copyright Holder"
            type="p6.metadata.types.ITextField"
            />
[any material that should appear in print but not on the slide]

app.zcml: Metadata Field Options

     <field id="title"
            label="Title of Work"
            type="p6.metadata.types.ITextField"
            validator="ccpublisher.validators.validateTitle"
            />

     <field id="format"
            label="Work Format"
            type="p6.metadata.types.ISelectionField"
            choices="Other Audio Video Image Text Interactive"
            />
[any material that should appear in print but not on the slide]

app.zcml: UI Assembly

[any material that should appear in print but not on the slide]

app.zcml: The pages, xrcpage directive

  <pages appid="ccpublisher">

    <xrcpage
        title="Welcome"
        xrcfile="resources/wizard.xrc"
        xrcid="CCTAG_WELCOME"
        />
[any material that should appear in print but not on the slide]

app.zcml: Stock Page Directives

    <fileselector />

    <metadatapages 
	for="p6.storage.interfaces.IWork
             p6.storage.interfaces.IWorkItem
             p6.storage.interfaces.IStorage"  />

    <storepage  />
[any material that should appear in print but not on the slide]

Still In Flux

[any material that should appear in print but not on the slide]

In Conclusion...

[any material that should appear in print but not on the slide]

Thanks!

Questions?

[any material that should appear in print but not on the slide]