Forum OpenACS Q&A: Coming here from Zope land.

Posted by Kevin Dangoor on
I find it interesting to have stumbled across this thread. We've been using Zope for about a year ( It did take a little time, but now that I grok Zope, I think it is a very powerful tool.

Why am I here? Without spiralling too far from the point of this thread: 1) Zope is still relatively immature in terms of prepackaged solutions (like commerce, sessions and user profiles), 2) though benchmarks show relatively good performance, and we've had fine performance so far, I do wonder about scalability, and 3) I've always got an eye out for other tools. One comment about scalability: their going to release their replication engine (ZEO) as Open Source in May. Getting bogged down? Throw another machine at it! Granted, this in and of itself does not solve issues with python's thread safety, or the fact that the TCL interpreter is likely to be faster than python's.

The existing templating capability in Zope is pretty powerful. There has been discussion of new extensions lately to try to make it play better with page editing tools like Dreamweaver.

One powerful feature of Zope is called "acquisition". Everything in Zope is an object, stored in the ZODB. (Currently, ZODB is a single file that gets appended to with each change. It is possible to store the ZODB in a relational database, but no one has done this yet.) Every object in Zope can be traversed to directly via a URL, and methods can be called on that object by simply adding the method to the end of the URL. The ZODB itself is hierarchical. Acquisition lets objects that are farther down in the hierarchy access objects that belong to its parents.

What does all of this mean, practically? Most documents in Zope do a <dtml-var standard_html_header>, which will call the method standard_html_header. You can define one of these at the top of your site, and everything underneath will access it. If you feel like having a different design in a different part of your site, just define a new standard_html_header there.

Another thing that I really like about Zope that has content management implications is that objects can contain other objects. So, the catalog item objects on my site can contain any number of images, and I can easily iterate over the images to display them.

Though the ZODB is hierarchical, Zope has an indexing system called ZCatalog. This allows you to index data on whatever properties you choose and do (relatively simplistic) searches on that data. This is a way that you can get at data regardless of where it lives in the hierachy. On, each member can author how-tos in their own space. After review, their how-to becomes visible in the main documentation area of the site (and to site-wide searches, etc).

DTML has its shortfalls, but it also has pluses... like <dtml-in>, which can iterate over objects easily. It can iterate over subobjects, SQL results from an RDB, ZCatalog search results, lists from python, etc.

I'm not trying to do Zope advocacy here or anything. I just thought I would toss out a few bits about how Zope does its thing. I do agree that Zope has a bit of a learning curve... if there's anything you're curious about, feel free to ask.