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

Martijn Faassen faassen at startifact.com
Wed Mar 14 03:00:38 EDT 2007


Tim Terlegård wrote:
>>> 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?

Good point, I hadn't considered that most people's entry point would be 
grokproject, and that people will typically only be creating a few 
applications relative to other things.

Okay, let's then propose that grokproject by default creates a class 
that subclasses from grok.Application and grok.Container, as opposed to 
grok.Model.

Regards,

Martijn



More information about the Grok-dev mailing list