[Zope-dev] ZPatterns Question - Talking to a Specialist....

Steve Spicklemire steve@spvi.com
Thu, 10 Aug 2000 09:57:01 -0500 (EST)


Hmm... this is probably more of a plain Zope question than a ZPatterns 
question.. but since I'm *using* ZPatterns, I thought I'd check 
what other folks are doing to implement apps with ZPatterns.

I've been creating Specialists with DataSkin subclassed objects
in their defaultRacks. The methods of the objects are pretty
easy, I can put them in the ZClass, or the Product class
that I'm sub-ZClassing from. But since my Specialists are just
'plain' objects I can only make methods of Specialists as 'DTML Methods'
or 'Python Methods'. I'd love to call these methods as:

<dtml-in "TableManager.getAllProductCategories(_.None, _)">

....


but this doesn't work. The current namespace doesn't include any
of the queries or other methods that I need to *implement* 
getAllProductCategories..  so I end up doing:

<dtml-with TableManager>
<dtml-in "getAllProductCategories(_.None, _)">
...


but this seems obtuse when the TableManager needs to talk
to the ProductManager or other managers I end up with a 
*lot* of <dtml-with... > statements! 

What are other folks doing?

thanks,
-steve