• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL



What is Zope? Although this sounds like a simple question that could be answered in a line or two, it is inadequate to say that it is an open-source application server or that it is a content management system. Both of these descriptions are true, but they really put a limit on Zope that simply does not exist. So, before we look at a more complete definition of Zope, let's discuss some of the solutions Zope has been used for.

As mentioned previously, many people use Zope as a content management system (CMS). CMSs are usually Web-based (browser-managed) systems. Basically, a user can manage the content of a page through a set of web forms, workflows, and editing tools. However, people have also used Zope for an entirely different CMS genre. Some companies, such as struktur AG, have successfully used Zope to interface with the XML database Tamino (from software AG).

Zope is also commonly used as a Web application server, in which case it is used to build web-based applications, such as online shops or project management tools. Of course, Zope is also suitable for regular websites.

Zope can also be employed as a reliable back-end server, to help manage the logistics of a company's operations. In fact, bluedynamics.com in Austria built a logistic software program based on Zope 2 ZClasses and a relational database that was able to handle hundreds of thousands of transactions each day, from taking credit card information and billing the customer to ordering products from the warehouse, using XML-RPC. This is the true strength of Zope because it allows Zope to work with not only web-familiar protocols but also any other network protocol you can imagine. Zope 3, with its component architecture, excels even more in this area, because third-party add-on packages can be easily plugged in or even replace some of the existing defaults. For example, the Twisted framework can replace all of ZServer (the Zope server components).

Now that you know about some of the uses of Zope, we can use the following more formal definition of Zope: Zope is an application and back-end server framework that allows developers to quickly implement protocols, build applications (usually web-based), and function as glue among other Internet-enabled services.

Before it developed Zope, Zope Corporation reviewed many possible programming languages for developing the framework, such as Java, C/C++, Perl, and Python. After extensive research, the developers of Zope found that only Python would give them a competitive advantage compared to the other large framework providers, such as IBM and BEA.

Powerful Python

Python is a high-level, object-oriented scripting language that produces—by design—clean code through mandatory indentation. Although Perl is also an interpreted scripting language, it lacks the cleanness and object-orientation of Python. Java, on the other hand, provides a nice object-oriented approach, but it fails to provide powerful tools to build applications quickly. So it is not surprising that Python is used in a wide variety of real-world situations, such as by NASA, which uses Python to interpret simulation data and connect various small C/C++ programs. Also, Mailman, the well-known mailing list manager, was developed using Python. Academics use this easy-to-learn language for their introductory programming courses.

Because Python is such an integral part of the understanding of Zope, you should know it well. If you are looking for some introductory documentation, you should start with the tutorial that is available at the Python home page, www.python.org/doc/current/tut/tut.html. Also, there are a wide variety of books on Python, including Python Web Programming by Steve Holden, Python Programming Patterns by Thomas Christopher, and Python How to Program by Harvey Deitel, et al.

In the Beginning There Was…

Zope's is a classic open-source story, and knowing this story gives some background on why the software behaves the way it does.

Before Zope was born, Zope Corporation (which was originally named Digital Creations) developed and distributed three separate products, called Bobo, Principia, and Aqueduct. Bobo was an object publisher written in Python, which allowed a developer to publish objects as pages on the Web. It also served as an object database and an object request broker (ORB), converting URLs into object paths. Most of this base was implemented by Jim Fulton in 1996, after he gave a frustrating Python CGI tutorial at the International Python Conference. Even though Bobo was licensed under a “free” license, it was not totally open-source, and Principia was its commercial big brother.

In 1998, Hadar Pedhazur, a well-known venture capitalist, convinced Digital Creations to open up its commercial products and publish them as open source under the name Zope. Zope stands for “Z Object Publishing Environment.” The first Zope release was 1.7, and it came out in December 1998. Paul Everitt, former CEO, and all the other people at Zope Corporation, converted their product company into a successful consultant firm.

In the summer of 1999, Zope Corporation published version 2.0, which is currently the stable release, expected to be replaced by Zope 3.0 in the next year. Zope gained a lot of popularity with the 2.x series; it is now included in all major Linux distributions, and many books have been written about it. Originally this was going to be a book on the Zope 2.x API, but with the beginning of the Zope 3.x development in late 2001, it seemed much more useful to do the documentation right and write an API book parallel to the development itself. In fact, when these words were originally written (in 2001), there was no Zope Management Interface (ZMI), and the initial security had just been recently implemented. Currently, the first stable version of Zope 3, X3.0.0, has just been released, and by the time you read this book, Zope X3.1 might already exist.

Zope 3 Components

Zope 3 makes use of many of the latest and hottest development patterns and technologies, with “a twist,” as Jim Fulton likes to say. But Zope 3 also reuses some of the parts that were developed for previous versions. Users will be glad to find that Acquisition (but in a very different form) is available again, as are Zope page templates (ZPT) and Document Template Markup Language (DTML), although with less emphasis. Also, Zope 3 contains a ZMI, but this ZMI has been completely developed from scratch in a modular fashion so that components can be reused and the entire GUI can also be altered as desired.

But DTML, ZPT, and Acquisition are not the only components to receive a new face in Zope 3; external data handling has also been totally reworked to make external data play better together with the internal persistence framework, so that the system can take advantage of transactions and event channels. Furthermore, the various external data sources are now handled much more generically and are therefore more transparent to the developer. But which external data sources are supported? By default, Zope 3 comes with a database adapter for Gadfly; additional adapters for PostGreSQL and other databases already exist, and many others will follow. Data sources that support XML-RPC, such as the very scalable XML database Tamino, could also be seamlessly integrated. However, any other imaginable data source can be connected to Zope 3 by developing a couple Python modules, as described in various chapters throughout this book.

During the past five years (during the age of Zope 2), not only was Zope developed and improved, but many third-party products were written by members of the very active Zope community for their everyday need. These products range from hot fixes, database adapters, and Zope objects to a wide range of end-user software, such as e-commerce, content management, and e-learning systems. Some of these products have turned out to be very useful to a wide variety of people—so much so that their concepts have been incorporated into the Zope 3 core. The prime examples are the two localization and internationalization tools Localizer (by Juan David Ibáñez Palomar) and ZBabel (by Andrew K. Milton and Stephan Richter), whose existence significantly shaped the implementation of the localization and internationalization support of Zope 3. Another great product that has made it into the Zope 3 core, Formulator, was originally written by Martijn Faassen. Formulator allows the developer to define fields (representing some metadata of a piece of content) that represent data on the one side and HTML fields on the other. The developer can then combine fields in a form and have it displayed on the Web. Formulator was also provides a validator, which validates user-entered data on the server side. Formulator's concepts were modularized into schemas and forms/widgets and incorporated into Zope 3.

Altogether, the Zope framework is much cleaner now (and more Pythonic), and features that failed to make it into the Zope 2 core have been incorporated.

The Goals of This Book

The main target audience for this book is developers who would like to develop on top of the Zope 3 framework; this book refers to these people as Zope developers. Python programmers will also find many of the chapters of this book interesting because they introduce concepts that could be used in other Python applications besides Zope. Python programmers could also use this book as an introduction to Zope.

In general, this book is arranged in such a way that you can easily understand the Zope 3 structure. Part I, “Zope 3 from a User's Point of View,” gets you set up so that you can evaluate and develop with Zope 3. Part II, “The Ten-Thousand-Foot View,” consists of chapters that are meant as introductions to various important concepts of Zope 3. If you are a hands-on developer, you might want to skip this part until you have done some development. Parts III, “Content Components—The Basics,” and IV, “Content Components—Advanced Techniques,” are the heart of the book, where you develop a new content component that implements many features over the course of 12 chapters. When you understand how to develop content components, you can face Part V, “Other Components,” which introduces other components that might be important for your projects. Part VI, “Advanced Topics,” is intended for people who want to use Zope technologies outside Zope 3. Part VII, “Writing Tests,” is dedicated to various ways to write tests. The emphasis on testing is one of the most important philosophical transitions the Zope 3 development team has undergone.

This book should encourage you to start helping in the development of Zope 3. You might want to help enhance the Zope 3 core itself, or you might want to develop third-party packages, reaching from new content objects to entire applications, such as an e-commerce system. This book covers all the modules and packages required for you to start developing.

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint