Wednesday, November 02, 2005

Top ten things I hate about maintaining old Zope sites

Just to let off some steam from my almost exploding head, I have created the following list of Zope anti-patterns. The sad thing is that I have found lots of sites that have seven or more of these problems. Maybe I have incredibly bad luck finding these maintenance jobs or maybe this is the result of many Zope programmers getting stuck at the half point of the famed z-shaped learning curve and sticking to what worked for them from the beginning. Either way, it's not pretty.

  1. 800 line long python scripts that clearly should be products.
  2. Except clauses without defined exceptions in Python scripts. This is not just a Zope thing, but try finding an error in any of a dozen participating python scripts when all of them use this mechanism.
  3. Scripts that loop over the results of an object manager's objectValues comparing object properties to some other value to find matching objects. This is amazingly slow when the folder has many items. Why do so many Zope developers seem to be unaware of ZCatalogs?
  4. DTML Spaghetti code. Just try understanding a page with a bunch of nested dtml-if/dtml-else statements.
  5. One thousand ZPT pages that each repeat all headers, javascript menus and presentation tags. What should be the very simple task of modifying, for example, the company name, becomes an arduous chore. What is so complicated about define-macro and use-macro?
  6. Having one single ZSQL Method named generic_query or sql or some other name handle all SQL calls. The content of this method: <dtml-var query>.
  7. ZPT pages that have more python code than XHTML tags. Business logic should be in Python scripts.
  8. Folders littered with dozens of objects named copy_of_xxx or xxx.OLD and similar names which indicate the objects where copied to test some change or something of the sort and then never erased afterwards.
  9. All those damn .zexp files that need to be passed back and forth when the whole site is contained in a folder in the ZODB.
  10. Relative links that do not take acquisition into account, leading to URLs in the location field of the browser that look like:


At 3:44 PM, Anonymous Anonymous said...

That's a good list. I looked over it to make sure I wasn't slipping on any of them. #9 (ZEXP files) is still a problem, except on my own site, where Ape transparently turns a CVS checkout into a Zope database.

Your list illustrates the number of technologies developers have to know fluently in order to apply the best practices in Zope 2. Zope 3 has some solutions:

1. Zope 3 uses normal Python modules instead of Python scripts and products. (Products are Python modules, but they depend deeply on Zope.)

3. I expect that the catalog is more accessible now that it's a simpler Python module.

4. ZPT is now encouraged much more than DTML.

7. Zope 3 uses views more often than lone page templates. Views have both a Python script and a page template.

8. copy_of_xxx is an artifact of through-the-web (TTW) development, which Zope 3 does not encourage as much as Zope 2 did.

9. .zexp remains useful for backups, but I don't think it will be needed anymore for normal development.

10. Implicit acquisition is gone. :-)

Shane Hathaway

At 12:30 PM, Blogger Carlos de la Guardia said...

Shane, thanks for your comment. I also think that Zope 3 can provide a solution to most of this problems, and I've been meaning to give it a more profound look, but right now the stuff that I list here is taking a lot of my time.

At 9:57 AM, Anonymous Anonymous said...

Carlos de la Guardia, I loved this post, too! I have taken it as my own. Matter of fact, I used it on granny today. That one sentence could replace most of the contradictory books written by the so-called top 100 baby names experts.

At 12:48 AM, Anonymous Anonymous said...


I've created a new resource for indian baby girl name you can with lots of information and links related to indian baby girl name
Now I've finished I thought I look around for other indian baby girl name sites and see what everyone else is talking about, you know get ome more indian baby girl name ideas etc...
This blog looks pretty good, though I'm not sure my indian baby girl name site will get this many visitors - ah well, can only but try ;)
If you have a spare moment please visit my indian baby girl name site and let me know what you think, I'll check back here again later.


At 1:08 PM, Anonymous unique baby names said...

Hey Carlos de la Guardia,

Your blog "Top ten things I hate about maintaining old Zope sites", leads me to believe you will find my information on baby names and other baby subjects to be beneficial.

You are also welcome to publish your own experiences on babies in my free directory ... sharing your knowledge will help others and you also get the benefit of recognition and a valuable backlink to your own blog. If you have a few minutes to spare, please have a look at my articles on babies names and baby stuff now!

Best Wishes


Post a Comment

<< Home