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. 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? 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.
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
On Sun, 2002-02-03 at 13:15, Gary Learned wrote:
...
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.
What I was referring to is if I want to monitor two ports for Http traffic, do I have two instances running? I understand I Have an http and an ftp port for the service.
You can run completely separate (multiple) instances of zope on different ports.
Ok, this answers my question, thanks.
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.
Thanks Adam, I understand the acquisition parts, and your diagram makes perfect sense. It does raise one other question though...In order to have www.specificwebsite.xxx equate to /websites/specificwebsite/baseofsite/ I need to have an external proxy or redirector, true? As I understand it, there is no way to have zope itself do this.
On Sun, 2002-02-03 at 14:32, Gary Learned wrote:
Thanks Adam, I understand the acquisition parts, and your diagram makes perfect sense. It does raise one other question though...In order to have www.specificwebsite.xxx equate to /websites/specificwebsite/baseofsite/ I need to have an external proxy or redirector, true? As I understand it, there is no way to have zope itself do this.
I won't say there is no way but yes the best way seems to be to use Apache on port 80 to redirect to the Zope server (9673 in my case). Here's an example from my Apache httpd.conf configuration file: <VirtualHost *> ServerName www.consulting.net.nz DocumentRoot /var/www/consulting/ <IfModule mod_rewrite.c> RewriteEngine On RewriteLog /var/log/apache/rewrite_log RewriteLogLevel 0 RewriteRule ^/(.*) http://www.consulting.net.nz:9673/consulting/site/VirtualHostBase/http/www.c... [P] </IfModule> </VirtualHost> You will see that the the website root is currently in /consulting/site/ on the Zope web server. The trick is to use add a "Virtual Host Monster" in this subdirectory. Then everything works. This is a far better way than adding a "SiteRoot" which can lead to lots of annoying problems: Add SiteRoot This will change URLs generated by all objects within the same container as the SiteRoot. If a Base is specified (or a SiteRootBASE value can be found) then it will replace the host:port/script portion of generated URLs. If a Path is specified (or a SiteRootPATH value can be found) then it will replace the remainder of each URL. Values affected include DTML variables starting with URL or BASE, and the absolute_url() methods of objects. If Base is not set, the SiteRoot will first attempt to acquire SiteRootBASE and then search the REQUEST for it. The same holds for Path and SiteRootPATH. Base (if specified) should always start with "http://" Regards, Adam
On Sat, Feb 02, 2002 at 06:15:03PM -0600, Gary Learned wrote:
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.
There's no command-line switch to simply use a different data.fs location. However, I suspect that using INSTANCE_HOME is what you want. See: http://www.zope.org/Members/4am/instancehome
2. In the book, it mentions that Zope Templates have to be total and complete html documents.
You're talking about ZPT (Page Templates), right? They do, but...
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.
Yes you can. The "completeness" of a template is just so you can see what it looks like on its own with (optionally) some dummy content where dynamic stuff goes. You can then use just the relevant stuff in another page, without pulling in the header or any other stuff you don't want. Look at these until you understand them. http://dev.zope.org/Wikis/DevSite/Projects/ZPT/Examples
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?
Don't know, sorry. z2.py just mentions running multiple servers on different ports, using (I assume) the same data.fs.
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.
It makes it easier to back up and/or move your work, because you can export (or import) your entire site just by exporting that one folder. If you have a bunch of stuff in your top-level zope directory, backups are a lot more annoying because you have to export each item separately. -- paul winkler home: http://www.slinkp.com music: http://www.reacharms.com calendars: http://www.calendargalaxy.com
participants (3)
-
Adam Warner -
Gary Learned -
Paul Winkler