[Grok-dev] Re: letting Grok take over the site

Shane Hathaway shane.list.grok-dev at hathawaymix.org
Mon Sep 17 17:16:35 EDT 2007

Philipp von Weitershausen wrote:
> Brandon Craig Rhodes wrote:
>> PvW suggested this belongs in a separate thread, and I agree, since
>> there's an issue of terminology to settle as well.
>> There should be a simple way to create a Grok app that "owns the whole
>> Zope instance" that it runs inside.  People to whom I've shown Grok
>> are confused that, having written my app, I don't just get to access
>> it at the root "/" URL of my web site.  They don't understand why I
>> should have to then enter a GUI and instantiate my app.
> Yup. I would actually like it if Zope would take a particular 
> grok.Application class and use it to make the root object of my ZODB. So 
> that when I first start my Zope application, I get an instance of my 
> application instead of the root folder.
> This will have some problems, though:
> * You're bound to make persistent changes to your application class 
> which means you'll have to be able to evolve or delete it somehow. This 
> is possible to accomplish, but it'll require some surgery.
> * We'll need a way to tell Zope which application to use if you have 
> several installed. It also bears the question whether we should allow 
> several applications to be instantiated in one ZODB, just like we do now.

It would probably be much simpler and safer to modify traversal instead
of replace the ZODB root object.  Grok users should create application
instances, then select one of those instances as the application to make
visible at the root.  The traversal process for the root folder should
automatically traverse to the previously selected application even
though its name is not mentioned in the URL.

In fact, I half expected to find a button to select the root application
when I first saw the admin UI.  Moreover, the Grok admin UI should be
one of the applications that users can select from.  Finally, there must
be some alternate entry method (a different port?) that lets users visit
other application instances even after one has been selected for the root.

> Amen brother. I have preached and preached against Zope3's weird use of 
> the name "site". What it really means is "place where components are 
> registered". We should perhaps at least call it "component site" which 
> is sort of a compromise. Last time I suggested that, it got shot down, 
> though.

The Zope world is full of misnomers, but we've succeeded at fixing them
in the past.  Keep at it.

I might replace site with "configurable location", because most (all?)
containers are also locations and the only thing that distinguishes a
site from a container is that a site is able to modify configuration
parameters.  AFAIK.


More information about the Grok-dev mailing list