[WEB4LIB] Zope Experiences?

TMGB bennettt at am.appstate.edu
Mon Oct 9 13:22:06 EDT 2000


Read this only if your interested on Zope, its long. :-)


I am regularly using Zope.  I started by experimenting with it on a
pentium 75 under WIN NT SP5 as a stand alone http server with MySQL as
the database server.  This was after having a successful interest and
use with python.  In Peter's case, it makes a good point in that,  if
you are PERL school than you will probably be better off with PHP and
Apache.  On the other hand, if you catch on to OOP in a scripting
language that was built as OO from its beginning and work well with
Python, then you will probably have better success with Zope.  I don't
see Zope as a replacement for PHP because my lack of familiarity with
PHP but Zope IS a contender with Cold Fusion.

Zope can run as a stand alone server or as a cgi server for apache or
other http servers.  I run it standalone and it does very well.  I am
now running Zope on a Dell PowerEdge with dual 400mhz processors and
Linux RH6.1 as the platform.  I have also changed to the PostgreSQL 
database server on the same box, an OO database.  In general, Linux has
been 98.9% more stable than either of my two NT boxes, the other NT is
an Alpha 2100A with dual 200mhz processors which will be loaded with
Linux at the end of this semester or next.

The support for both Python and Zope is from the Listserve for each of
them.  The Zope list has been very helpful for "newbies" and "bleeding
edge" alike.  eGroups maintains an archive of the Zope lists.   The
lists and links to eGroup can be found at www.zope.org and
www.python.org

Zope is written in C++ and Python.  The most stable Python version to my
knowledge is 1.52, 1.6 is available but there has been some problems
using it with Zope and Python 2.0 (when finished) is a total rewrite of
the Python language and probably won't be compatible at all with Zope
unless Digital Creations ( http://www.digicool.com ), the authors of
Zope, update Zope to use 2.x.  

I use Zope for our Ask-A-Librarian database.  A patron submits the
webform data which is put into a postgresql database.  When a librarian
goes to the Responder web page on the Zope server he/she sets
his/herself as the responder to that question and this sets that
librarian as the responder in the responder field on that record in the
database.  The librarian then goes to his/her page which lists
unanswered questions from the database.  When the librarian answers a
question, it is emailed to the person asking the question and the answer
field in the database is updated with that answer.  All of this is
through the use of WEB Forms and Zope.  In Zope you define objects and
one you can define is an Email Server.  I am working on completing a
Helpdesk form which submits to the database and emails the proper
computer support people in the library.  I have also set up some forms
to search some databases which is limited to just full text search right
now.

The first major problem I had was with single apostrophes and it wasn't
really a problem with Zope.  This is how the PostgreSQL database
delimited strings and it was double quotes for MySQL.  Zope utilizes
"External Methods".  These are scripts you can write in Python to add
functionality where you wish Zope had already done it.  This short
script escapes the single apostrophe so that the text in a submission is
not terminated early where a word like "don't" would terminate the
string and only "don" would be the last word in that field.

#! /usr/local/bin/python
#  This script is specifically written to read in  text  
#  from a Zope variable <dtml-var varname> from the dtml method
#  so that ' can be changed to \' so it can be stored
#  in a PostgreSQL database
#	VARIABLES USED
#       text            form object containing text
#       text2           temporary variable and return object
#	line		line read in from source

import string

def qf(self,text):
   text2=""
   for line in text:
      line = string.replace(line,"\'","\\\'")
      text2 = text2 + string.join(line,"")
   return text2 


Line indention is part of the Python syntax so semicolons, braces, and
such are not necessary.

Well, I guess enough is too much, although if you have any questions
please email me.

Thomas


pverhagen at sapl.ab.ca wrote:
> 
> Any Library SysAdmins out there have any experiences with Zope that they
> would like to share? Any problems encountered? Any differences when
> running on platforms (unix verses NT/2000)? Anyone know anything about
> Zope that no-one else would tell?
> 
> I've been thinking about developing a database driven website for some
> time, and I'd been toying with Mandrake+PHP3/4+APACHE on an old
> Pentium 90. But, since I hate "re-inventing the wheel", I am curious to know
> of any experiences with the product { SEQ CHAPTER \h \r 1}(especially when they can be found for
> free).
> 
> For those who don't know anything about Zope, the Zope web site calls it
> "the leading Open Source web application server". You can check it out at
> http://www.zope.org.
> 
> Thanks in advance,
> 
> Peter Verhagen
> Library Systems Administrator
> St. Albert Public Library
> St. Albert Place
> #5 St. Anne Street,
> St. Albert, AB, T8N 3Z9
> EMAIL: pverhagen at sapl.ab.ca
> PHONE: (780) 459-1534

-- 
--------------------------------------------------------------------
                      Rock and Rule
             Zope Rocks -- http://www.zope.org
           Python Rules  -- http://www.python.org    
--------------------------------------------------------------------
Thomas McMillan Grant Bennett      Appalachian State University
Computer Consultant III            University Library
bennettt at am.appstate.edu          
http://www.library.appstate.edu/webmaster/
Voice:  828 262 6587	           FAX:    828 262 3001

Windows 95 is a 32-bit extension to a 16-bit patch for an 8-bit
operating system that was originally coded for a 4-bit microprocessor.
 - Chris Dunphy     Boot Magazine


More information about the Web4lib mailing list