Before we can dig into the topic, we need some definitions of the key terms. These terms will follow us through the book.
CMS stands for Content Management System. It is a general term covering several types of software intended to store, manage, and provide digital data. Digital data that is managed by a CMS is referred to as content.
There are several types of content management systems: Document management systems, Digital Records Management systems, Electronic Content Management systems, web-based content management systems, and others.
Plone is a classic web-based CMS. Editing and viewing of the content is completely done through the Web. Although there are other means of feeding Plone with data and getting it in and out again, the web browser is the main interface for the interaction of humans with Plone.
In the book, we will see alternative methods for interacting with Plone.
The ZCA is the Zope Component Architecture. It was introduced with Zope 3 and is now part of Zope 2, and therefore of Plone with the help of the Five product (2+3).
This strategy, which shares many ideas with the Mozilla Component Architecture, allows us the use of adapters and utilities.
With adapters, we can do so-called aspect oriented programming. An adapter represents a certain aspect of a context object. A simple example of an adapter is a size adapter that calculates the size of an object. How this is done depends on the nature of the context. It can be as simple as calling the len
method on the context, or there can be a complex function behind it. A simple adapter call (without the definition and the registration) looks like this:
>>> ISize(context) >>> 587
Adapters can have more than one context. These adapters are called multi-adapters. One example is a BrowserView, which takes a content object and the request as context. BrowserViews are certain aspects of the content in a publishing situation.
Utilities are methods or classes (Callables) stored in a registry and, therefore, easy to acquire. An example of a utility is a vocabulary. The underlying method returns an iterator of term objects. These term objects may be used for choice or selection widgets.
Note
A good introduction to the ZCA can be found in Philipp von Weitershausen's book Web Component Development with Zope 3. The book is slightly outdated, but still a good source for learning the ZCA with examples.
In this book we will focus on products utilizing the ZCA, if possible. These products are more flexible, and overriding an adapter for custom purposes is easier and better than monkey patching.
The WWW (World Wide Web) is the playground of Plone. Many web pages use the domain name "www", but this is not meant here.
What is meant here is the sum of all web pages and portals that are reachable with a web browser. Technically speaking, this is everything with an URL. Usually URLs accessible with a web browser utilize HTTP (HyperText Transfer Protocol) or FTP (File Transfer Protocol).
The term buildout is used for two things: a piece of software, correctly spelled as zc.buildout
, and a concept for configuring software using zc.buildout
.
Since version 3.0, Plone is distributed with a buildout. In the common use of the term, buildout refers to one or more files used for configuration. This file is usually called buildout.cfg
and contains all the necessary bits and pieces for fetching the Plone application from online resources and configuring it. This file can be extended to install and configure arbitrary add-on products.
There are ready available buildouts for special use cases such as publication management with Plone, a video suite for Plone, and a newsletter application with Plone; or they can be put together with ZopeSkel templates.
Possibly, the shortest buildout for setting up Plone 3.3.3 is this:
[buildout] parts = zope2 instance extends = http://dist.plone.org/release/3.3.3/versions.cfg versions = versions [zope2] recipe = plone.recipe.zope2install url = ${versions:zope2-url} [instance] recipe = plone.recipe.zope2instance zope2-location = ${zope2:location} user = admin:admin http-address = 8080 eggs = Plone
The code examples in this book are available together with readymade buildouts, which set up Plone and the necessary multimedia parts.