[Zope] RE: Two newbie questions

Chris Fassnacht cfassnacht@ssc.wisc.edu
Tue, 7 Sep 1999 22:10:36 -0500


First, let me thank both of you for very helpful answers to my questions.
I've got the looping through the lines property to generate links working
pretty well.  And I think I'm getting a better understanding of acquisition.

But I still have one problem, and a comment.

Using the following looping construct:

<dtml-in "myobject.the_lines">
<a href="&dtml-sequence-item;"><dtml-var "_[_['sequence-item']].title"></a>
</dtml-in>

I get items that are in the acquisition path (and, thus, can be identified
by a single id) just fine.  However, when I try to process an item in the
lines property that looks like this: top_folder.sub_folder.target_folder, as
you suggested, I get a "Key Error."  Obviously, it's not recognizing the
item as a valid path to/descriptor of the object.  I'm guessing that there's
a trick to format the string properly so it'll be recognized as a valid
path.  Is that correct, and what might it be?  Thanks for the assistance.


Finally, a comment.  I've been going through ALL of the e-mail archives (I'm
up to March 1999.  Man, you people talk alot ;) ).  And I've seen a number
of threads that all seem to be asking about how to do the same thing: simple
linking across hierarchies (and thus out of acquisition paths).  When I
first heard that Zope was object oriented, I thought "Great, finally no need
to worry about the locations of files in directory structures.  You just
call the object up by its unique id, and you'll get it no matter where it is
in the ODB."  While that is indeed how it works as long as you're in the
acquisition path, you're back to specifying "paths" (even if you want to
call them explicit object ids) as soon as you want to go lateral across the
hierarchy.  I guess I don't see why this should be so.  As long as the
developer is willing to maintain globally unique ids (Zope seems to enforce
this already, doesn't it?), shouldn't they be able to access
across-hierarchy objects as simply as in-hierarchy objects?

In one of the threads on this subject ("OO Paradigm", Jan-Feb 1999), Jim
Fulton even seemed to indicate that there is no reason that something like
this could be done, albeit with some Python programming or the use of
ZTables (http://www.zope.org/pipermail/zope/1999-February/001716.html).

Sorry to ramble, but I guess my question is this: Is there some compelling
reason to limit simple object reference in Zope to hierarchical acquisition?

I think Zope is a marvelous programming environment, and I think it
represents a much bigger shift in the web development paradigm than it seems
at first glance.  Regardless of my complaints about acquisition, I'll be
sticking with it.

Thanks again for your time.

Chris Fassnacht
Wisconsin Center for Education Research
UW-Madison