[Zope] organizational questions

John Eikenberry jae@kavi.com
Wed, 21 Apr 1999 12:05:44 -0700 (PDT)


On Wed, 21 Apr 1999, Martijn Faassen wrote:

> Scott Lewis wrote:
>  
> > i expect to have a number of DTML documents that are access
> > restricted. for organizational clarity and ease of managing the
> > permissions, i'd like to put them in a folder. but if i put them in a
> > folder in the centers folder, then they are parallel to the individual
> > centers and can't be acquired. does this mean i'm stuck putting
> > them all in the centers folder? any suggestions?
> 
> Probably some mild level of Zope Zen is needed to realize fully that
> *folders* are acquired by subfolders too -- recently I faced similar
> organizational issues as well, and used this to good effect.
>
> I had the same setup with a root folder and a number of sub folders, and
> common SQL methods in the root folder so that they were acquired. As I
> had quite a few SQL methods this started to get messy. So I made a
> subfolder called 'sql' and moved all SQL methods to that place. Now I
> have a nice and clean root folder.
>
> Zen: All the sub folders acquire this SQL folder.

I had the exact same situation and came up with another way to handle
it...

  Zen: Acquisition is dynamic (run-time) and can be redefined by the
       traversal path (URL).

That is, you don't need to change from...

> Of course I had to adapt my DTML documents in the subfolders from things
> like:
> 
> <!--#call "insert_whatever(REQUEST)"-->
 
to:
 
> <!--#call "sql.insert_whatever(REQUEST)"-->

You just place the 'sql' folder in the URL of pages that need it.

For example...

Site map:

/sql 	- all sql methods
/search - interfaces search database
/admin  - alter database
/browse - browse through database contents

All the URL's look something like this:

http://www.somesite.com/sql/search/findit/

Works great, with one caveat. The view tab doesn't work with the sql. This
doesn't bother me though, as I don't usually use the view tab.

---

John Eikenberry
[jae@kavi.com - http://taos.kavi.com/~jae/] 
______________________________________________________________
"A society that will trade a little liberty for a little order
 will deserve neither and lose both."
                                         --B. Franklin