[Zope] Newbie Questions

Adam Warner lists@consulting.net.nz
03 Feb 2002 14:11:20 +1300


On Sun, 2002-02-03 at 13:15, Gary Learned wrote:
> Ok, I've just read the New Riders Zope Web Application Development &
> Content Management book, and I've got some questions I hope some kind
> soul out there will help me with. From what I can see, Zope is just what
> I've been wishing for. I only  hope I have enough brain cells left to
> learn these 'new tricks'.
> 
> 1. I have Zope installed in a Windows XP environment. Is it possible to
> move the data.fs file to a location other than the program executable
> 'var' directory. Our executables are under a different backup schedule
> than data files. My other option would be to move the entire zope
> directory over to a data drive.
> 
> 2. In the book, it mentions that Zope Templates have to be total and
> complete html documents. If I want to create separate items like banners
> and navbars that will get sucked into all pages, I assume that means
> they have to be methods that are somehow included into a template? In
> other words, you can't have a portion of a page defined as a template as
> I understand this.

I'll leave the first two questions because I (a) don't use Windows XP as
a Zope server OS (b) haven't played with Zope Templates yet (still using
DTML).
 
> 3. The book talks about creating a zope on a particular port. Does this
> mean that I have multiple zope services running, or is it possible to
> have a single service monitor multiple ports?

You have two services running. The Zope web server on one port and the
Zope FTP server on another.

You can run completely separate (multiple) instances of zope on
different ports.
 
> 4. In the application case study, the book said that experience has
> shown that it's best to have a folder at the root before the top level
> folder of your site, as follows:
> 
> 	/ (root)
> 		Top/ Top Level Folder
> 			SiteRoot/ (Actual Site Root Folder)
> 
> Can someone explain the value of that one additional folder layer? I'm
> not seeing it yet and I'm pretty sure it's just because I am missing
> something.

Due to database corruption and an inability to upgrade from 2.5.0 beta 3
to 2.5.0 beta 4 or 2.5.0 final (Zope just fails to start even when
working through two different sets of manual upgrade instructions) I'm
migrating all my content over by running two copies of zope (one 2.5.0
beta 3, the other 2.5.0 final), starting with a clean database and using
import/export.

While I'm doing this I'm creating _another_ level of folders. This is to
harness acquisition better and keep lots of junk out of the root (/)
folder.

Here's why:

Root folder (/):
Here are system wide configuration scripts/data. Little has to go in
this folder. You don't want this folder filling up. It will do if you
miss an additional folder layer.

/websites/
In this folder are any scripts/data that are used by _all_ my web sites.

/websites/specificwebsite/
In this folder are any scripts/data used by a specific web site. If they
have the same name they will override the general scripts above.

/websites/specificwebsite/baseofsite/
This folder is the base of the actual web site. This is where you will
end up if you type www.specificwebsite.xxx/

Once you understand acquistion better the benefits will become clearer.

The additional folder /websites will also allow me to create a totally
different set of websites (say /websites2) without running out of a
parent directory for acquisition to work.

Regards,
Adam