[Zope] University Website with Zope

Michel Pelletier michel@digicool.com
Thu, 10 Jun 1999 09:45:54 -0400


> -----Original Message-----
> From: Troy Shurtleff [mailto:troy@mav.net]
> Sent: Wednesday, June 09, 1999 10:20 PM
> To: zope@zope.org
> Subject: [Zope] University Website with Zope
> 
> 
> I a working on a more effective way to manage the website for a public
> university in North Carolina.  Lately I have been considering 
> Zope as a
> possible solution.  I have spent some time using Zope and 
> seeing what I
> can do with it.
> 
> There are two features that are a priority in the web site...
> 
> 1.  We need to have a search feature where users from the web 
> can enter
> a value in a search field and find documents that contain that
> text.....a fairly simple operation. 

Not as simple as you think.  What is searchable content?  You may just
want to search through Documents, but how should Methods be handled?
Should the title be indexed seperately?  Should the author be indexed?
In a system which involves such concepts as acquisition and Methods
rendering Documents, what exactly get indexed?  The contentes with the
DTML striped?  The rendered contents of the Document?  Since almost all
rendering depends on the context of the request, how should the indexer
set up the context?  What if different contexts define wildly different
content?  What happens when a Document renders a method that calls
another method that uses a ZSQL method?  Obviously, you don't want to
render information that will change on every request (like, show me the
latests ten records in my write-busy SQL database).

It wouldn't be too hard to write something that bute force searches
through your objects (ala grep and find, in fact we have this find
machinery in Zope), but this of course would be prohibitvely expensive
and it would wake up your entire object heirarchy.

So the solution is to build indexes.  Zope comes with all the indexing
machinery necesary to do this, it's just all in Python.  So to get
indexing benefits you must write a product in python to take advantage
of this.

Luckily, we are working on this concept right now.  We have an in house
product called Catalog that will do just that, Catalog your objects in
various indexes acording to a managable schema.  We are taking our time
with it because it is a complex beast which has bitten us before (we
have done plenty of searching/indexing jobs before).

> 
> I tried experimenting with the find feature in the Zope management
> interface.  I was able to get close to what I want.  I had to give
> anonymous users permision to view management screens.  after 
> some search
> criteria was entered a list of DTML Documents would appear that
> contained the text that I searched for.  When I clicked on 
> the documents
> it took me to the management screen for that document....from there i
> could view it.
> 

'find' is pretty much a managment function for you to find an object in
the heirarchy.  I wouldn't suggest making it public, it is expensive as
it recursivly walks it way down your whole tree, seaching awake objects,
and waking up and searching (and then putting back to sleep) sleeping
objects.

> I would like to be able to better control the appearance of the output
> after a user does a search and I would like the user to be 
> sent directly
> to a document listed in the search results.....without going 
> through the
> management screen.
> 

This is something the catalog will do, albeit in a much cheaper fasion.

> 2.  We would like to have a dynamically generated site 
> map....this will
> probably only be avalible to administrators but possibly 
> outside users. 
> With the site map I would like to see what is linked to what...and if
> there are any broken links.  I tried using the tree tag but nothing
> showed up.  
> 	<!--#tree--> 
> 	<!--#var id--> 
> 	<!--#/tree-->
> is there something wrong with it?  a tree view may be sufficient.
> 

Once again, the catalog can help you here.  The Catalog is designed to
be flexible in making a Directory of your indexed objects (Caveat: your
objects must conform to a certain schema, so you will have to define
ZClasses and use those objects in your site, not painful, just more
work).  You specify in the schema of your object say, a keyword
argument, and then build a tree of objects based on those keywords.
This is nice because your objects don't actually have to be laid out in
a heirarchical fasion in the object database, they just *look* that way.
So you can have objects strewn all overthe place and still have your
site look very pretty.

Directories will probably be in a later release of the portal tool kit.

> I am currently running...
> Zope 1.10.2 (binary release, python 1.5.1, win32-x86), on Python 1.5.1
> (#0, Nov 18 1998, 12:17:58) [MSC 32 bit (Intel)] on win32.
> 
> Eventually we plan on installing Zope on our primary academic
> machine....unix....that is if we can implement the features we want.
> 
> Any help would be greatly appreciated.
> 
> Feel free to respond to this via e-mail to troy@mav.net
> 
> Thanks
> Troy
> -- 
> Troy Shurtleff
> troy@mav.net
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://www.zope.org/mailman/listinfo/zope
> 
> (For developer-specific issues, use the companion list,
> zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
>