[Zope] soft references again

Jason Spisak 444@hiretechs.com
Tue, 16 May 2000 18:30:49 GMT


Jerome Alet writes:

> On Mon, 15 May 2000, Jason Spisak wrote:
> 
> > Jerome:
> > 
> > I am curious why you are creating folders for each year/month/day?
> > It sounds like a lot of work.
> 
> Yes, but I supposed, probably wrongly, that retrieving events all at the
> same place for all the dates would be very time consuming for Zope.
> 

It's not really all in the same folder. I have a different folder per user.
 Making a new folder for every quarter or so for manageability sake makes
sense, but it's not needed for searchability.  Trust me.  There is no
practical limit to the number of items you have in a folder.  The disk
usage hit when you add an item to a folder with 30,000 objects in it is
huge though.  ObjectManager isn't meant for that.  Also the management
interface would be a bit of a problem.  To manage larger folders I use a
ZCatalog interface anyway. 

> > I have a calendar here that has folders for each "user" and displays the
> > calendar of their events by having the Catalog search for the "day" on
> 
> OK, now I have to try to understand your code (I'm new to Zope, I mean I
> use it for five months but with only one hour or two per week
> unfortunately) and see how I can use it.

That's how I started too. :)

> 
> I'm afraid I'll have more objects to store than you because I want to
> store all our Medicine School events in the calendar (courses for each
> year, holidays, rooms planning, etc...), that's why I wanted to create
> several folders in order to diminish (sp?) Zope's search time.

The ZCatalog can return a search on hundreds of thousands of objects in
under a second.

> 
> > which the events occur.  For each object that I want to appear in the
> > calendar I have an external method that simply takes whatever date is the
> > "Calendar Date" and returns the integer day.  Then the Catalog does the
> > rest.
> > 
> > Here's the code to display it for month/week/day modes.
> 
> Can I reuse parts of your code ? (First I have to understand it ;-)

Please do.  That's what open source is all about.
If you tell me what specificc parts you are having trouble with I'll be
happy to explain them.

> 
> thanks for all.
> 
> PS: have you an answer concerning my tests problem ? Except using
> <dtml-try> I don't know if a better way exists. Even if I finally do like
> you, I'm interested in knowing how to do this sort of things which are
> pretty easy in Python, but seem to lack to Zope.

Could you send me that snipit of code again.
> 
> bye,
> Jerome
> 

Happy zoping,
Jason Spisak
CIO
HireTechs.com
6151 West Century Boulevard
Suite 900
Los Angeles, CA 90045
P. 310.665.3444
F. 310.665.3544

Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
address may not be added to any commercial mail list with out my
permission.  Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of $500 damages/incident, $1500 for
repeats.