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

Fernando Correa Neto fcdoth at gmail.com
Tue Mar 13 10:25:16 EDT 2007


On 3/13/07, Martijn Faassen <faassen at startifact.com> wrote:
> Martijn Faassen wrote:
> > Tim Terlegård wrote:
> [snip]
> >> Yes, you can do this. Is anyone ever going to make a site that
> >> doesn't contain any objects? I guess people will always have to
> >> change grok.Model to grok.Container in app.py. Couldn't we make
> >> this the default?
> >
> > You can still make a site contain objects and not be a container if
> > you use custom traversers.
> >
> > 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.
> What do people think?

I agree with that. I can't see more scenarios for other kind of
applications now but this two cover most cases.
For a content management system for example, things are done per
folder and the constraints are done per folder as well. Think on how
would you implement a plone site with all the contained types,
utilities etc.
On the other hand, for a simple aplication that excutes a given task,
say a flicker search or a web app to manage an email system for
example, you can have a grok.ModelApplication as a site with a site
manager container in case you want to create views to control the app.
Personally I see the last as a utility app that executes a given task
tho....not a huge app.


> Regards,
> Martijn
> _______________________________________________
> Grok-dev mailing list
> Grok-dev at zope.org
> http://mail.zope.org/mailman/listinfo/grok-dev

More information about the Grok-dev mailing list