home " subscribe " advertise " customer service " back issues " " contacts

Linux Magazine / June 1999 / REVIEWS
A Whirlwind Tour of Zope
 
       page 01 02   next >>

PRODUCT REVIEW
A Whirlwind Tour of Zope
by Jonathan Corbet

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.

       page 01 02   next >>
 
Linux Magazine / June 1999 / REVIEWS
A Whirlwind Tour of Zope

" " printer-friendly version "

home " subscribe " advertise " customer service " back issues " " contacts