[Zope] Simulating static URLs, end-user session management

Robert Wentworth rhww@erols.com
Sun, 14 Mar 1999 17:38:51 -0500


Hi.  I am very new to Zope, having spent the last day
(with only about two hours of sleep) excitedly pouring through
the documentation.  I still have a lot to digest, but
there are some questions I did want to ask at this stage:

A)  Are there reasonable ways of arranging to have
    the URLs for some/many Zope generated pages appear, as
    far as the outside world is concerned, to be URLs
    for static HTML pages?  

    The issue is one of indexing by search engine robots.
    I anticipate building a site where most of the 
    content will change fairly slowly, and where there 
    would be a standard set of views of the data which 
    would be essentially static at a logical level.  I 
    really want search engines to index those static 
    views.  (There would likely also be dynamically
    generated views which shouldn't be indexed.)

    So, I think the requirement is that there should be a
    way of getting to pages with a URL like:

	http://www.mydomain.com/here/there/everywhere.html

    as opposed to

	http://www.mydomain.com/here/there/everywhere

    or

	http://www.mydomain.com/here/there?everwhere

    I supect there are a number of ways of tricking Zope
    into accepting URLs in the first form, or perhaps
    into actually generating some static pages which would
    be served up directly by the HTTP server (though
    my quick check of the archives suggests this is an
    unresolved issue). My questions are:

    1) Has anyone already done something like this?

    2) What approaches could you suggest to accomplish
       this?

    3) Is trying to arrange this likely to be a big task
       or a little task (as subjective as that question is)?


B) On another topic entirely, I am wondering about the issue
of tracking sessions of end-users.  (Hmmm... maybe I should
have done more searching in the archives -- this must be
a common issue.)  Various application servers (e.g., for
Java servlets) that I've looked at provide facilities
for maintaining "session" information (not in the sense
of a transaction as used in Zope) about end users.   Typically
this would be done by setting a cookie or by incorporating
a session ID into dynamically generated URLs.  I haven't
noticed anything about this in the Zope documentation.
I'm guessing that perhaps that is because Zope is so
powerful that implementing something like this yourself
is regarded as trivial.  But thinking about it a bit,
I'm not sure what the Zope mindset would be about how
to do this.  Zope sends requests directly to objects.
But in order to manage a session cookie (or whatnot)
you need to add a certain functionality to every (or
most HTTP) requests.  You certainly don't want to have
every object explicitly worry about this.  Is there
a hook that would allow all requests to
pass through some sort of filter that extracts/manages
session information?  Or is there some other standard
solution to this problem?


For what it's worth, I am interested in using Zope
to build my second E-commerce site.   I built the
first site by using Python to generate static pages
from a data structure, combined with lots of JavaScript
and a little Perl CGI.  It worked, but I'm sure there
is a better way.  I was leaning towards a Java servlet
plus templating package solution, until I found Zope.
I've been a Python proponent for a while, but Zope is 
threatening to make my brain explode.  Talk about 
paradigm shifts. 

C) Despite my Python and OO background,
it's not easy to absorb it all at once.  This does
make me somewhat concerned, as my business partner,
who will be a content provider, has no OO experience.
I don't want to produce a system where it will be
hopeless for her (possibly with help from another
developer) to take over if I get hit by a bus.
Thoughts...?


Robert Wentworth
rhww@erols.com
(aka webmaster@tripplebrookfarm.com)