[Zope] some Zope issues: dtml-zpt, permissions, scalability

Andre Meyer a.meyer at hccnet.nl
Thu Nov 20 02:53:09 EST 2003


Dear Zopers

During the last few weeks I have been working through the documentation of Zope for building my own products. One valuable source was the Zope Bible. With help from this list and the authors of the book I decided to go for a file system based product using ZPT. Unfortunately, the example in the book is using DTML like most others still do. When trying to convert from DTML to ZPT I found the following problem:
It is easy to change dtml-in to tal:repeat and the like. But how to convert from dtml-call to tal? Look at the folowing snippet:

--------------------------------------------------------------------------------

<dtml-unless SelectedGroup>
 <dtml-call "REQUEST.set('SelectedGroup', 'All')">
</dtml-unless>

<dtml-unless start>
 <dtml-call "REQUEST.set('start', 1)">
</dtml-unless>

<dtml-unless sort_by>
 <dtml-call "REQUEST.set('sort_by', 'LastName,FirstName,MiddleInitial')">
</dtml-unless>

--------------------------------------------------------------------------------



Another problem occurs with permissions. The following snippet works in dtml, but when converted to zpt (accessing here/listEntriesByGroup) the same method cannot be accessed any longer.

--------------------------------------------------------------------------------

<dtml-in "listEntriesByGroup(_['SelectedGroup'])" size=20 start=start sort_expr="sort_by">
  <tr <dtml-if sequence-even>bgcolor="#CCCCCC"</dtml-if>>
   <td><input type=checkbox name="EntryIDs:list" value="&dtml-id;"></td>
   <td><a href="&dtml-id;"><dtml-var title></td>
   <td><dtml-var Title>&nbsp;</td>
   <td><dtml-var Company>&nbsp;</td>
   <td><a href="<dtml-var id>/editEntryForm">Edit</a></td>
  </tr>
</dtml-in>

--------------------------------------------------------------------------------



Yet another issue is related to scalability when I have an object that references a list of other objects using a dictionary. How does this perform when the dictionary contains 10.000 or 50.000 entries? Is that feasible or are there better solutions?


thanks a lot for your help
Andre
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.zope.org/pipermail/zope/attachments/20031120/36ec76f5/attachment.html


More information about the Zope mailing list