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

Martijn Pieters mj@antraciet.nl
Mon, 15 Mar 1999 09:46:56 +0100


At 23:38 14/03/99 , Robert Wentworth wrote:
>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
>

There is little reason to avoid naming your objects with the extension
built into the ID, like everywhere.html. You can then simply refer to the
object using that ID, which to a not so smart indexing bot will look like
an HTML file (but it should *really* look at the MIME-type...). The only
problem would be referencing the object, as you have to take precautions to
make sure Python doesn't try to reference the attribute named 'html' on the
object 'everywhere'.

So, as long as you name your DTML Documents that are to be indexed with the
.html extension, everything should go fine.


>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?
>

No, Zope has no Session tracking facilities at this moment. DC is however
working on this. At the moment you will find a 'Session' object in your
Zope distribution, but this is a different concept altogether, and will be
renamed to 'Version' when client session objects appear.

>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...?

DC can be hired to help out... and as Zope is now Open Source, a growing
number of people can help out.


--
M.J. Pieters, Web Developer
| Antraciet http://www.antraciet.nl
| Tel: +31-35-6254545 Fax: +31-35-6254555
| mailto:mj@antraciet.nl http://www.antraciet.nl/~mj
| PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149
------------------------------------------