Grok in zope 2 - Kit Blake and Sylvain Viollon (plone gebruikersdag 2008)ΒΆ

Tags: plone, plonegebruikersdag2008

Grok is a pretty technical subject, but Kit Blake (infrae) will stay on a higher level.

Zope2 is an application server, on which frameworks are built. One is plone (with an intermediary layer called CMF), another one is Silva (made by infrae). Zope is already pretty old, as it started in 1996. Zope2 is robust, scalable, well-known by the developers.

Zope3 is not an evolution of zope2: it has a completely different architecture. New concepts (software patterns). It does, however, reuse all zope2 knowledge. And it is not backwards compatible. Only the underlying database has been kept.

It is still an application server, but it has a component architecture: a toolbox with more and more components. Zope3 is packaged with zope2: you can use zope3 components in your zope2 code. An important point: zope3 technology is better maintainable.

Kit Blake

Management-wise code is a liability. The code you own is your responsibility. The less code you have, the less liability. With zope3 you have less and cleaner code, so less risk.

So: the more zope3 code usage when running on zope2, the better. 2+3=5, so Five was born. A project that is now part of core zope2 that allows you as much zope3-isms as possible in zope2-using code.

Drawback: zope3 is complex. Zope2 had some mistakes, which zope3 tried to fix (with perhaps some overreaction). One of the reactions was to do nothing unless it was declared in configuration. Lots of configuration. Lots of boring configuration. And good programmers are lazy, so lots of good programmers disliked all the explicit configuration.

So Martijn Faassen started Grok in 2006. Grok removes the need for lots of explicit declaration by establishing sensible defaults. A simple application should be simple to write.

Grok is now also usable in zope2: five.grok.

(Demo by Sylvain). Sylvain showed the same simple content type inside plain grok and inside zope2 (silva and also plone). The plone version required some more boilerplate than the silva one, but the basic grok content type was well-recognizable. And no zcml explicit registration in sight! And very little code. logo

About me

My name is Reinout van Rees and I work a lot with Python (programming language) and Django (website framework). I live in The Netherlands and I'm happily married to Annie van Rees-Kooiman.

Weblog feeds

Most of my website content is in my weblog. You can keep up to date by subscribing to the automatic feeds (for instance with Google reader):