|
|
/ Hathaway Weblog / Zope 3 still has the same sweet spot |
The project I'm doing needs a web interface and the requirements are mounting. We need authentication, a consistent UI, and integration with ZODB and Twisted (since the application already uses them.) Zope 3 is surely the best tool for the job, so I'm finally working with Zope 3 again.
At first, I wanted to provide a whole web interface without changing any existing code. This turned out to be pretty difficult since the tutorials don't explain things this way. The tutorials make a couple of minimal assumptions: that your objects will be stored as descendants of the root folder, and that your objects will implement interfaces like IContainer and IContained.
Things fit together once I decided to make those concessions. So the sweet spot in Zope 3 is similar to Zope 2: it likes ZODB objects that implement interfaces known to Zope. It's a tremendous improvement over Zope 2, which requires you to subclass a very complex class that's inappropriately named SimpleItem.
At the same time, I'm updating Zope 3 as I go along. Whenever I diverge from the tutorials slightly, I uncover some case that breaks in odd ways. Yesterday I made it so "contents.html" functions properly for read-only containers. I even added a functional test to make sure no one breaks it again. :-)
