Digital Creation's Zope brings a unique approach to the management and publication of information on the web.

Experienced webmasters understand well the sorts of problems that can come up as
a Web site grows. A consistent look becomes hard to maintain as the number of
pages increases. Users must have different types of access to the site. Some of
them will likely need to modify parts of the site but cannot necessarily be
trusted with access to other parts. Content needs to be increasingly dynamic,
perhaps involving access to databases hosted elsewhere in the organization. And
all of this needs to remain coherent and maintainable while being changed on a
daily basis.

Z Object Publishing Environment (Zope),
v1.10.2 (v2.0 by 6/99)

Digital Creations, www.digicool.com

Can be downloaded free of charge

Enter the “Z Object Publishing Environment” (Zope). Zope is an Open Source
Web application platform which is being aggressively pushed by Digital Creations
as a free alternative to products like Allaire’s Cold Fusion. Zope brings a
unique approach to the management and publication of information in an
object-oriented mode. It addresses all of the above-mentioned problems and is
worth a look for anybody who is charged with keeping a Web site running.

Zope started as a number of separate products from Digital Creations. One of
these, “Bobo”, was a freely-available object publishing system. Others, such as
the “Principia” object database and the “Aqueduct” relational database access
system, were proprietary code used by Digital Creations in its consulting
business. These tools were well regarded, but their proprietary nature limited
the extent to which they were adopted on the net.

Zope Management 1
Coping With Zope: A typical Zope management screen.

When Digital Creations went to the Verticality Investment Group for an
infusion of venture capital, they got an interesting suggestion: Why not make
Principia and the rest into an integrated Open Source system? If the new system
could establish itself as the definitive Open Source Web application platform,
Digital Creations should have a bright future as the creators of the system. When
venture capitalists are suggesting that the source be freed, you know that Open
Source is going mainstream.

Digital Creations jumped on the idea quickly. The new integrated system,
including Bobo, Principia, Aqueduct, and more, was released late last year under
an Open Source license and a new name: Zope. Zope’s license is quite liberal in
what it allows. It requests that attribution appear on Zope-powered sites and
that modifications be distributed as patches, but neither is required.

A Zope-powered Web site is not the typical file system full of HTML files.
Instead, it is a hierarchy of Web-callable objects. These objects can vary from
simple things like documents (which can be thought of as a wrapper around an HTML
file) to more complicated things like conferencing systems, database interfaces,
calendars, etc. Each object can have a number of “methods,” or ways in which the
object can be accessed.

The default “view” method asks the object to render itself in HTML for a
browser; this is the most common way in which Zope objects are invoked. Other
methods can be used to edit the object, change its security settings, or perform
any number of object-specific functions. A conferencing object, for example,
would have a method to add a new posting to a discussion.

One of the more useful features of Zope is its security model. A vital part
of this is its user authentication system. In Zope, users and roles are treated
as objects. Users are simply people; everybody who accesses a Zope-powered site
has an associated user account. The default “anonymous” user requires no
authentication and, as a general rule, can only view objects. Higher levels of
access generally require authenticating one’s self to the Zope system as a named
user. Users, in turn, are associated with one or more “Roles,” which define the
level of access they have to each object in the system.

Another important feature of Zope is that document objects need not be static
HTML pages. Instead, Zope implements the “Document Template Markup Language” or
DTML. DTML is a high-level programming language for document templates. It
extends HTML with a server-side scripting language along the lines of PHP, but
with many features tied into the Zope environment. It provides variables, control
structures, and so on.

One common use of DTML is to implement a standard “look and feel” for a Web
site. Suppose each page on a site should have the same background and navigation
menu at the top. In DTML this look would typically be implemented by starting
each page with a line like:

<!–#var standard_html_ header –>

Note that all DTML commands start with <!–#, and
thus look like HTML comments to the browser. This particular command simply
substitutes the contents of the variable

standard_html_header into the document at this point. This
header would contain all of the boilerplate HTML needs to set up a page according
to the Web site’s design.

But what if one subtree of the site needs to look a little different? Zope
allows this via a mechanism known as “acquisition.” The administrator for the
subtree in question needs simply to redefine the standard_html_header variable at the top of that tree and every page from there on
down will use the new version.

Acquisition can be thought of as the run-time inheritance of variables and
other Zope attributes, using the first definition found in an upward search of
the web tree. Acquisition is a powerful concept which allows for global control
of a Web site while simultaneously allowing for local differences when

Closely tied to DTML is a capability known as “SQL methods.” Zope contains a
database-independent layer which allows for easy access to relational databases.
Lower-level “database adapters” provide interfaces to specific database systems,
but the DTML level need never know about them. Instead, a DTML document invokes
an SQL method when it needs to make a database query.

SQL methods are generally implemented separately from the DTML document(s)
which use them. This separation encapsulates the access to the database, with
some useful results. SQL methods implemented in this way immediately become
available to multiple documents if need be, so a change in the SQL method does
not require a change in every document that uses it.

SQL methods also can be set up by a database administrator. This person can
therefore concentrate on getting the data out without worrying about how it will
be presented. Meanwhile, the DTML author can take care of the details of
presentation without needing to be a database expert. (See sidebar at right for
an example of an SQL method and a DTML template that uses it.)

Zope’s SQL methods create and use persistent connections to the database to
enhance performance. Unlike CGI-based systems, SQL methods do not have to pay the
overhead of connecting to the server for each Web

Zope also includes facilities for integrating information from multiple,
heterogeneous database systems distributed over a network. Zope’s ability to
easily create dynamic content from an organization’s existing database systems is
one of its most powerful features.

Zope’s built-in object database is fully transactional. There are some
interesting implications resulting from this transactional nature. Every
administrator of a busy site knows that sweaty-hands feeling that comes from
having put in a change that breaks a site somehow. Trying to fix a mistake in a
hurry while the error log grows and e-mail starts pouring in is not much fun.

An administrator of a Zope-powered site can simply pull up the “undo” screen,
select the changes to back out, and click on a button. The site is instantly
restored to its previous state, and a better-considered change can be worked out
at leisure.

Even nicer, though, is the “sessions” capability. A “session” can be thought
of as an alternate version of a part of the site, only visible to those who ask
for it explicitly. Multiple changes can be incorporated into a session. When the
changes are complete and everything is verified to be working properly, a single
“commit” operation makes all of the changes “live” in a single transaction.

Sessions thus can eliminate the need for the “staging site” used by a few Web
sites. Rather than implementing changes and updates on a separate site (which is
invariably a little different from the production site), these changes can be
done on the production site itself. There is no need to copy changes over and hope
they still work.

Finally, it’s worth pointing out that all of the administration of a
Zope-powered site is done via a Web browser. Web site operations can thus be done
on any client system anywhere on the Net. Users can be given access to Zope
without any need for any other sort of access to the Web server system. The
result is a highly flexible and secure Web site administration scheme.

All is not perfect with Zope, of course. Zope’s documentation leaves quite a
bit to be desired at this point; Digital Creations is working hard to fix this
problem, but they have some ground to cover yet. In addition, Zope does not have
any sort of graphical page design tool. It can work with Netscape’s Composer, but
the fit between the two tools is poor. WebDAV support for Zope is already
available in a beta form, and in the long run, WebDAV should make graphical tools

Zope also has some scalability problems — requests are handled sequentially.
This means that Zope cannot really take advantage of multiprocessor systems.
Sequential operation also means that if any request is blocked (on access to a
remote database server, for example), the entire Web site stops. A Zope object
database is also somewhat of a stand alone thing; it is not easy to replicate a
Zope-powered site across multiple servers.

Despite its shortcomings, Zope is
a powerful Web application system which deserves consideration by anybody running
a serious Web site. If, as its creators hope, Zope is able to establish itself as
the Open Source Web application platform, we should be seeing a lot more of it in
the near future.

The current stable release of Zope is 1.10.2. A 2.0 release is expected by
summertime. For more information, or to download a copy of Zope, checkout
http://www.zope.org. Digital Creations can be found at http://www.digicool.com.

How DTML uses an SQL

A typical SQL method (taken from the Zope documentation) will look something

SELECT * from PlutoniaEmployees WHERE
department = ‘<!–#var department–>’

A DTML template that uses this method could be:

         <!–#var standard_html_header–>
<h3>Personnel Report</h3>
Plutonia Company – Marketing
Department personnel listing:

<table border=”1″>
<th>Employee Number</th>

<–#in qryAllEmployees–>

<td><!–#var employee_id–></td>
<td><!–#var last_name–></td>
<td><!–#var department–></td>



Jonathan Corbet is President of Eklektix, Inc. Eklektix provides free-software
based services and consulting, and publishes the
Linux Weekly News,found at http://lwn.net. He can be reached at

Comments are closed.