Simulating static URLs, end-user session management
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)
Robert Wentworth wrote:
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, I'm only going to address your last point, but it's something I feel strongly about. Let's ignore the technical issues, except to mention that only you can judge is Zope is appropriate for your situation. Fortunately, you have an excellent opportunity to discover its relative strengths and weaknesses. One of the important secondary issues (some would claim the primary) about Open Source is that it protects your business against the "What happens if Robert gets hit by a bus?" scenario. Digital Creations is in the business of providing support to organizations that use its products. Heck, in this sense it's even superior to key man insurance. Furthermore, because of DC's courageous decision to release Zope as Open Source, not only is your company protected against *your* untimely demise, but it's even secure against the day Hadar decides to transfer all the company assets into hedge funds. Best regards, Jeff Bauer Rubicon, Inc.
[excellent answer from Jeff Bauer snipped]
Furthermore, because of DC's courageous decision to release Zope as Open Source, not only is your company protected against *your* untimely demise, but it's even secure against the day Hadar decides to transfer all the company assets into hedge funds.
OUCH. My plan is now unveiled to the world prematurely. That settles it. Jeff, I'm taking back your shares in the hedge fund for telling :-)
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
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 ------------------------------------------
Martijn Pieters wrote:
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?
...
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...).
Perhaps I'm failing to understand something. Looking at pages on zope.org and some obviously dynamic pages on other sites, they all return a MIME-type of "text/html". Which I think means that a smart indexing bot should *not* simply look at the MIME-type. As I understand it, most search engine robots try to exclude dynamic content because of the justifiable fear that once they start exploring a web of dynamic content they could get lost in an infinite or near-infinite search space. I've read that as a result of this, search engine robots do things like refuse to index any URL with "cgi-bin" in the path, or which do not end in an approved recognized file extension. Do you have a different perception of search engine robot policies/strategies?
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'.
Guess I'm going to need to experiment. I'm a little fuzzy on how this would work (but then I'm a little fuzzy in general at this point).
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. ... 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.
Are there any projections available re the timing of this? I'm wondering about how much effort to spend on ad-hoc interrim measures. FWIW, in my mind an ideal client session scheme would allow multiple strategies. In most cases using cookies works out for the best, but I would like to be able to accommodate anti-cookie zealots as necessary. On the other hand, I don't want to clutter URLs with session-id's if I don't need to. (I suppose having authenticated users is yet another strategy, and one that Zope currently seems oriented towards. Fine if users really want or need to get into your site or need to perform authorized operations, but not so good if you're trying to entice them in.) Robert Wentworth
participants (4)
-
Hadar Pedhazur -
Jeff Bauer -
Martijn Pieters -
Robert Wentworth