The management and processing of content is the key component of Content Management Systems. An Enterprise Content Management framework such as eZ Publish is required to offer an even broader approach, in order to be extensible and to meet users' needs.
When content is stored in a relational database in an object-oriented system, one might think of the well-known active record pattern, where each table in the relational database is mapped to a class in your application. This normally means that an object of this class represents a single row in the database table. The active record pattern is used in web-centric applications like Ruby On Rails and many PHP frameworks.
However, the active record pattern can have undesirable implications, as listed below, if you try to map complex content structures to a database.
eZ Publish uses an implementation of the active record pattern – more precisely a Table Data Gateway – but only as a database abstraction layer, not to directly map content into the database schema. To map content to the database, eZ Publish uses an object-oriented model, as shown in the illustration below.
Simplified eZ Publish database model
As the simplified illustration above shows, the structure is separated into three main parts: content classes, instances and metadata. The developer of an application can use pre-defined classes and create new content classes. Just like a PHP class, each content class has a number of attributes of different datatypes. The actual content is represented as instances of classes and is mapped to the database in a way that facilitates the easy maintenance of different versions, statuses and languages. Both the content class structure and the actual content can be modified at any time without having to change the database structure. A simple “Article” object might have a “Title” attribute of the “string” datatype, as well as a “Body” attribute of the “XML block” datatype. Objects for e-commerce have special “Price” attributes, so that a user can purchase, and pay through payment gateways, products that are assigned different taxes and discounts.
When you want to create a new “Article” object, eZ Publish automatically creates a form for the content, with the proper input fields for the respective datatypes, such as the Online Editor for “XML block” fields. The Online Editor is a WYSIWYG editor, with functions similar to those found in common word processors:
WYSIWYG Online Editor
When you submit data in the content creation form, a new content object is created, which means a new row is added to the table for content objects, associated with the language selected by the user as the first version of the object. Each attribute's contents are stored in a separate data table.
The back-end Administration Interface can be used to create content objects. For the editors of a web application, it is often more convenient if they can modify content directly while viewing the public page. With the Website Interface, content manipulation and creation is directly integrated with the front-end view of the website.
Another convenient way to edit content is by navigating a file system structure offered by a WebDAV client, where all content objects are represented by folders and files. These files can then be manipulated or created with OpenOffice.org Writer or Microsoft Word and uploaded back to the site. All content uploaded this way is handled by the normal publishing process, and the mapping of the uploaded documents to content classes can be defined by site developers.
With the unified, clearly-structured model that eZ Publish uses to store content in the database, it is simple to structure the data. Basically, each node in the tree structure encapsulates one content object. A single content object can be referenced by multiple nodes, so that one article can appear at multiple locations on the site. This clear separation between structure and content keeps your changes synchronized throughout the entire website.
Each content class can be configured so that its objects' nodes can or cannot be assigned children nodes.
With the permission system, you can also configure which users or groups of users can create, view, or modify certain types of content. Therefore, you can specify that editors can write new articles in an area not visible to anonymous users, while an editor-in-chief publishes such articles to the public area. An editor could then be allowed to correct an already-published article. It is also possible to allow anonymous users to create comments below articles, or to require payment in order to access articles in an archive. This kind of workflow is configurable and extensible.
This article gave an overview of the eZ content model. A more detailed overview of eZ Publish's features is also available.
Extensions to the model include standard extensions from eZ Systems, such as eZ Newsletter (a professional newsletter solution), eZ Flow (a dynamic site layout planning tool tailored for the media industry) and eZ Find (an extension for the integration of corporation-wide search results), as well as adapters such as LDAP and Lotus Notes and ERP systems like SAP and Microsoft Dynamics. The eZ community has also created many extensions.