[Grok-dev] Re: What is an application?

Tim Terlegård tim at se.linux.org
Tue Mar 13 18:42:14 EDT 2007


> >It's a good point though; in most cases I imagine people will use the
> > container model for an application as that tends to be more
> >convenient. If you need control panels for utilities, you'd probably
> >prefer to place the utilities directly in the container as well.
> 
> I've thought about this some more, and I think we should consider making
> grok.Application be a container by default for the reasons stated above.
> 
> For the special case where the application should *not* be a container, 
> we should provide a grok.ModelApplication base class or something like that.

grokproject produces an app.py with a class like:

    class myproject(grok.Application, grok.Model):
        pass

Do you suggest to use single inheritance here instead? It is possible to
make the application a container by just replacing grok.Model with
grok.Container. What would be the advantages with what you suggest?

Tim


More information about the Grok-dev mailing list