Skip to content

Personal tools
You are here: Home » Community » Sprint to grok Zope

Sprint to grok Zope

Wolfgang Schnerring, Philipp von Weitershausen, Christian Theune and Martijn Faassen are sprinting at gocept to make Zope 3 useable for cavemen.

In the current state of Zope 3 the component architecture works out very well. One fundamental prolem remains though: to get started, you need to repeat yourself very often and configure a lot of things mostly with ZCML. Those XML sit ups are a pain. The sprinters want to show that those exercises are superflous.

The idea behind grok is to provide a simple Python API for writing a web application with Zope 3 and to reduce the amount of API calls by providing explicit defaults. Consider the following example for creating a model class and a view for it:

import grok
class Mammoth(grok.Model):
pass

class CavePainting(grok.View):

def render(self):
return 'A cave painting of a mammoth'

That's all. The CavePainting view is automatically registered for the Mammoth class. The example shows the basic idea:

  • no ZCML at all
  • convention over configuration
  • configuration where required

It is also planned for grok to make creating forms and schemas, registration of adapters, creation of catalogs and much more much easier.

Created by zagy
Last modified 20.10.2006 08:35
 

Powered by Plone

This site conforms to the following standards: