Skip to content

Zope 3 rocks and rolls

April 18, 2008

I’ve had two real-world experiences with Zope 3 recently, which is a nice change from Plone. One of the basic rules of any development is “don’t fight the framework”, because most frameworks will continue to try to trip you over if you try to go around it. But in one of the projects which I’m involved in, the main developer doesn’t want to do things the Zope way. So we are not using the ZODB, and not using an ORM, although it still is supposed to be object-oriented and hierarchical in use. Of course we end up producing LOADS of code that could be avoided by either an ORM, or even better, by using the ZODB. If we used the ZODB we could probably throw out 90% of the code. The system would probably be faster too. But the thing is, it works. It’s a lot of work and a lot of code, but Zope 3 just gently steps a side and sais “OK, fine, if you don’t want to do it my way, then that’s you problem”. Zope 3 has all the features you need, but the design with aspect-oriented components, is flexible enough to let you not use the features you don’t want. Zope 3 rocks!

So, for another project, a community site, we looked into using Zope3, rather than Plone. There wasn’t that much content management needed, and Plone 3 doesn’t have many community features, so we were looking at not using so much of Plone, and implementing a lot ourselves. Sounded like a candidate for Zope 3. But we did want some basic CMS features, and didn’t want to implement them. So we looked at z3ext, a CMS written in Zope 3.

z3ext turned out to be a bit buggy. We simply couldn’t get the buildout to work. We fixed a couple of bugs locally, but after two-three bugs fixed it still wouldn’t work, and we gave up. The bugs were fixed by the z3ext guys a couple of days later, so don’t let that stop you, from checking it out, but it stopped us…

So we then tried using just some of the (non-buggy) modules of z3ext. I of course wanted to use Grok to speed up Zope3 development. The scaffolding code needed in Zope 3 is especially problematic in the beginning of a project, to get basic things up and running. Turned out that wasn’t possible. z3ext often uses things in modules that requires you to use the latest version of all Zope 3 modules even when those features really doesn’t add any features. If you use z3ext, you have to live on the bleeding edge of Zope 3. Grok, on the other hand, prefers stability. Grok has had problems with that changes to Zope 3 modules breaks all of Grok, so Grok is based on one of the pre-releases of 3.4. Of course, this means you can’t use the z3ext modules with Grok, which is really, really bad.

This is a symptom of one of the major current issues with Zope 3. The basic problem is of course that Zope 3.4 hasn’t been released in a final version. The eggifying of Zope means that some people are basically writing Zope 3.5 before 3.4 has even been released, and that’s a really bad situation. So we gave up on z3ext. I also do not want to live on the bleeding edge where I have to constantly keep track of which exactly which version of works with my project. I want a set of modules that is a proper version of Zope, and only switch one module out if there are bugs in it.

So then we fokused on using Grok, and tried to look for useful modules. First we tried lovey.tag. It was nicely documented, with a doctest README, which I started to read, and follow. After a while I realized I should ignore the start of the doctest, and then I came as far as tagging things. But I couldn’t make the tags persistent. I couldn’t figure out how to do that, and the documentation practically avoided to mention this.

And here is another major problem in the Zope 3 world: Religious doctesting. Doctests are great. For testing documentation. They are NOT good for testing the internals of your module. Especially not in a file called README.txt. Please use README.txt (and preferably also other docests) as a documentation on how to use your module, not how it works internally.

The result? We dropped Zope 3 and switched to Plone. Zope 3 is ready for primetime of you like to write everything yourself. It’s not ready of you want to reuse other peoples modules. And that’s not a problem with Zope 3, but the Zope 3 community. We need to work more together, talk more together and figure out common ways of keeping our modules working together and useful for others. And we really need to release a 3.4 final. Now. Stop caring if there are obscure bugs. People are using Zope 3.4 eggs and have been for a long time. It’s stable enough.


From → grok, plone, python, zope, zope3

  1. Thanks for the writeup, Lennart. Many things you write about are spot-on (religious doctesting, etc.)

    However… I know it’s easy for me to say, but it feels like you gave up a bit too early here. Let’s be honest, you’re one of our community’s rock stars. It takes people like you to go the last mile and figure out how to make lovely.tag work in Grok. It should work, you know :). And it’s not like there aren’t mailinglists where the authors, say Lovely Systems, don’t hang out. Yes, you’re right, currently you have to write a lot of stuff yourself still and the documentation may be confusing, but you didn’t change anything about that either, right? Because if we don’t do anything about it, Zope 3 and Grok will always remain pioneer territory. And Plone will always be the easy way out (which is fine for certain projects, not so fine for others).

    Regarding Zope 3.4, it’s difficult for me to understand what your problem is. Why exactly do we need a final Zope 3.4 tarball now? All the eggs are final and stable, as you say yourself. Pretty much everybody (including Grok) is using Zope 3 from eggs now. We have a known-good set. Where’s the problem?

  2. Martijn Faassen permalink

    I’ve written a lot more about this in my own blog: http://faassen.n–

    Philipp, Grok isn’t using the eggs from the known-good set. We are using an older version of dependencies, meaning you can’t use eggs that depend on newer versions. A release of an integrated Zope 3 set of eggs is a promise to the world that this is a stable base to build on, and the promise has so far not been made strongly enough. Instead we get a somewhat half-hearted promise in the betas. I agree though that this is a problem that’s more one for Grok to fix than Zope 3; we should at least start using the more recent list.

  3. Martijn, agreed, we need more commitment to a stable set of versions, both from Zope 3 and Grok. As you say, Grok could at least use the KGS 3.4 list. We should check this out at the Grokkerdam Sprint. Too bad you’re not coming, Lennart, this would be a good step away from the pioneering pains you’ve had.

  4. “Let’s be honest, you’re one of our community’s rock stars. It takes people like you to go the last mile and figure out how to make lovely.tag work in Grok. It should work, you know :)”

    Sure. But it’s the customer that is paying for it in the end, and when it looks like most of the budget is going to getting started, I agreed with the others on the project that Zope3 wasn’t the way to go in this case.

    “but you didn’t change anything about that either, right?”

    Well, if I both have to figure out why the documentation doesn’t tell me what it should, and then figure out what it should tell me, and then fix the doctests so it does tell me this for most of the modules I use, then I have to get much richer customers than I have now. 🙂

    “We have a known-good set. Where’s the problem?”

    Mainly that this know-good-set is not called 3.4.0, so there is no reason to use it compared to any other arbitrary set of eggs.

    “Too bad you’re not coming, Lennart, this would be a good step away from the pioneering pains you’ve had.”

    I really wanted to come, but alas, life did not turn out that way.

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: