eZ Community » Learn » eZ Publish » An Introduction to eZ Publish Concepts

An Introduction to eZ Publish Concepts

Tuesday 22 May 2007 10:00:00 am

  • Currently 3 out of 5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

What is object-orientation?

The eZ Publish content structure is based on ideas borrowed from object-oriented programming languages like Java and C++. Superficially, object-oriented (OO) means looking at the world in terms of objects. In real life, people are surrounded by many objects, such as furniture, cars, pets, and other people. Each of these objects have traits. This is also the way content is described and managed within eZ Publish - with objects and attributes (traits).

eZ Publish supports various types of content, such as images, articles, multimedia files, forums and feedback forms. A content type is called a content class (or "class" for short), while a specific piece of content is called a content object (or "object" for short).

A data structure is defined by a content class, and a content class is made up of attributes. An attribute can be thought of as a field. The characteristics of the attributes are determined by the datatypes. The following illustration summarizes and shows the relation between datatypes, attributes, content classes and content objects. The content objects are instances of the same content class, which means that they are of the same type but contain different data.

Content class

A content class can be thought of as a structural blueprint for a particular type of content. The properties of that content are referred to as attributes. For example, the Article content class contains attributes like title, name of author, introduction text and the text of the article.

A datatype describes the type of value that can be stored in an attribute and is the smallest possible entity of storage. It determines how a specific type of information should be validated, stored and retrieved.

Datatypes, attributes, a content class and objects

Content object

It is important to understand that a content class is just a definition of an arbitrary structure. In other words, the class itself does not store any actual data. Once a content class has been defined, it is possible to create instances of that class. An instance of a content class is called a content object. Actual content is stored inside objects (for example, folders, articles, comments, employees and members) in attributes.

Versions and translations

A content object consists of at least one version. Every time you save changes to an object, a version is saved. If it the first time you save changes (compared to how the object displays on the website), a new version is created. Otherwise, an existing version will simply be updated. This additional layer makes it possible to have different versions of the same content. Each version further consists of at least one translation. The translation layer makes it possible to represent the same version of the same content in multiple languages. It is this final translation layer that holds the attributes of an object.

36 542 Users on board!

Tutorial menu

Printable

Printer Friendly version of the full article on one page with plain styles

Author(s)

Proudly Developed with from