[Grok-dev] What is an application?
Tim Terlegård
tim at se.linux.org
Mon Mar 12 04:14:09 EDT 2007
> Application: yes, is a site but also marks the content as a grok
> application for the grok registry. ie is addable in the grok admin
> screen.
So it is that simple? Good :)
But I guess an application doesn't have to be the root of your site. If
I write a blog and make it an application and then write a wiki and make
that an application, I can still use them on the same site (the common
word, not the zope concept) with /blog and /wiki being subdirectories of
root which I treat as my actual site. Hmm, but I can't access the "super"
root object using grok, can I?
So an application is the root of your site and you are supposed to
have apache rewrite somesite.com to /myapplication?
I also thought that the application looks a bit like a controller in Ruby
on Rails. But a rails site can have loads of these controllers, but
there should only be one application for each site, right?
Maybe we should have a glossary?
> Site: Not a container as you found, but is initiated with a site manager
> container (++etc++) - where local utilities are placed by convention.
>
> To make a site a container:
>
> class MySiteIsAContainer(grok.Application, grok.Container):
> pass
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?
In zope3 I can get the site object and adapt it fo a folder. How come
the application which is a site object isn't adaptable to IFolder?
Tim
More information about the Grok-dev
mailing list