Extensible Desktop Applications with Zope 3
Presented by Nathan Yergler, 27 July 2006 as part of the Open Source Convention (OSCON), Portland, Oregon.
Contents
Abstract
as submitted to the OSCON program committee, March, 2006
Creative Commons is currently in the process of developing ccPublisher2, a rewrite of the original application -- a rewrite was begun in order to address problems with extensibility and customization in the existing code base.
The new codebase relies upon the Zope 3 project to provide a loosely coupled architecture which can be extended at run time by code from mulitple developers. The Zope 3 infrastructure provides a system of interfaces, adapters, run-time application configuration and an event dispatch system. These allow developers to create extensions to ccPublisher without requiring complete, in depth knowledge of the application. In short, minor things are easy, major things are manageable.
The talk will discuss how we went about designing an application that would be easily modifiable and extensible by other developers, and in the process improved the maintainability and clarity of our own code. It will focus on using infrastructure pieces developed as part of the Zope 3 project for an application in a completely different domain (desktop v. web-based). Topics covered will include the use of high-level concepts such as adapters and subscribers to simplify code, and ways in which desktop applications can use events to bind pieces of code from different developers together.
Finally, we will provide brief coverage of packaging and distribution challenges which have arisen during development. These include bundling ZCML configuration with our Python code in a Py2Exe or Py2App bundle and boostrapping an application which is able to load 3rd party extensions from other developers.
Slides
Example Code
Additional Resources
Component-based Development
- Software Componentry (Wikipedia article)
- PEAK
- Zope 3 Developer Page in particular see the User Documentation; it's web-oriented, but good examples of using components
Packaging and Distribution
- py2exe Distributing Python Applications for Windows
- py2app Distributing Python Applications for Mac OS X
- Setuptools and related technologies
- Setuptools Building Python Eggs for extension deployment
- entry points