|
eZ publish is an open source content management system and development framework, written in PHP and created by Norwegian company eZ systems. Now with over 1,000,000 downloads, eZ publish is a very powerful, sometimes mysterious, application; in this article we will take a quick tour of the basic concepts and paradigms of content handling in eZ publish, looking first at how eZ publish structures content and then displays content. The prime objective of eZ publish is web-based content management. With the powerful, flexible content object model, it is easy to map any kind of structured information into a collection of attributes. The basic architecture of eZ publish includes version management, multi-language possibilities, relations between pieces of information, and all kinds of interactions and manipulations defined and offered by standard or custom-built modules. The first step is to create a design or architecture for your content. This is done before you start with the implementation, but the powerful and sometimes unique features of eZ publish may influence your design decisions. Structuring Content
How to structure your site depends a lot on the types of content you want to serve, the audience, and how you want clients to interact with the site content. There are no fixed rules on how you should design the structure of a site, only some good practices that you can borrow from people who create taxonomies for document collections. Node Tree (Content Object Tree)
Once you have determined the global structure, you will find that a direct reflection of such a structure is given by a node tree. The following diagram gives an example of a simple structure implemented in an eZ publish node tree:
It includes a document structure, ordered galleries, and a forum branch. The node tree is a structured way of placing content objects (the real information). This distinction in eZ publish is important because content objects can have more than one placement (node). A single node is in fact the placement of a collection of object versions and translations sharing the same object ID (a number in the eZ publish database implementation). Sections
Sections are virtual collections of nodes that belong together, either conceptually or functionally. They are used as a mechanism in role-based permission management and are also design parameters. Once a node is assigned to a certain section, newly created child nodes inherit this section information by default. There is always at least one section for content objects that is assigned by default. In the role-based permission system, sections can be used to control access and the type of actions users or user groups can perform. In their bare essence, sections categorize your content to enable an additional layer of presentation logic; for example, you could use a special navigation panel for each section or even change the entire page layout. Content Classes
Content classes define the way content is structured for a certain content object type. This flexible system?where any number of base datatypes (called content class attributes) can be used for structuring information into workable units of information?is one of the prime features of eZ publish. Content Class Attributes
Content class attributes are the lowest level of information 'typing', although some of them are already powerful compound datatypes. eZ publish contains a rich set of 30 datatypes. Content Object
Content objects are simply instances of certain content classes. The content elements are therefore specified by the class attributes. The following diagram shows an example object after creation. Besides the attributes defined in the corresponding cass, there are a number of generic properties such as an object ID, name, and creation date among others. The name of a content object is usually bound to one or more of the content object attributes, such as a title.
Content Object Version
A content object in eZ publish is always under version control. The versioning can be controlled to maintain only a certain number of versions, possibly only one. Older versions of objects are kept within the limits of the version history settings. This means objects older than the current 'published' version are set into an 'archive' state. When there is more than one user editing objects, it could so occur that there are still a few draft versions lingering around in the underlying database tables between the archived versions. eZ publish allows you to revert to an older version of an object by copying the older version to a new draft and publishing it again. The history of objects is always preserved within the limits of version history as described earlier. This can be of importance if you should use eZ publish as a document management system, where quality systems impose the maintenance of document versions. Displaying Content
As eZ publish is mainly a web-based CMS, you will want to format the content in a clear and attractive way for display inside a web browser. eZ publish enables you to do so by way of the built in template engine that transforms your content in a manner of your choice for delivery; by default, it transforms it as XHTML output. Separation between Content and Presentation
One of the fundamental architectural properties of eZ publish is the separation between content, application logic (to manipulate content), and the content presentation for either a browser or other output media such as PDF files. Site Structure versus Page Layout and Content Views
In principle, the structure of your site (node tree) is independent of the page layout and content views (introduced in the next section). However, by carefully planning your sites in the design stage, you may come up with a solid model that can equally be used for parts of the page layout. One such example is the navigation and menu structures used. You can, for instance, use the top nodes as top menu or navigation entries and second-level nodes as entries for further navigation. Overall Page Layout and Content Views
In the paradigm that eZ publish uses, there are two main 'areas' where content is delivered: the overall pagelayout and content views. Navigational elements are mainly bound to the page layout templates, and the main content views are normally placed inside the global page layout. The following figure gives an overview of this simple concept. The parts marked P are generated in the page layout template(s), while the part marked C is generated with content view templates.
SummaryIn this article we've had a quick look at how eZ publish handles and displays content. This has only been a brief introduction to the bare concepts; in Packt Publishing's book, Learning eZ publish 3, the first book showing developers how to get the most from this outstanding system, there is more coverage of these concepts, and how to actually create an eZ publish site; customize and then extend the application for your own custom functionality. To find out more about eZ publish, visit the home of eZ publish at www.ez.no, and to find out more about the book, visit http://www.packtpub.com/view_book/isbn/1904811019. If you are interested in seeing a more complex discussion of an eZ publish implementation, you will find one of the chapters from the book online at http://www.packtpub.com/files/1019_sample_chapter_08.pdf; this chapter is a detailed "implementation case study". About the author
Paul Borgermans holds a Masters degree in Science and a PhD in Applied Physics. He became involved with high-performance computing from the start of the 90s while doing plasma physics research. From then on, computing has always been an important part of his job, which gradually involved the integration of large databases, computations, and operational management in R&D. The birth of the World Wide Web also marked the start of projects around intranet developments. Recently, he started a knowledge-management program with his current employer, the Belgian Nuclear Research Center. In this program, eZ publish is used as a cornerstone for developing support tools to capture and preserve knowledge in the long term. Paul Borgermans is co-author on the Packt Publishing book ?Learning eZ publish 3 : Building content management solutions.? For more information about Packt Publishing: www.PacktPub.com |






