[Zope3-Users] Re: Seeking advice on Zope implementation - II

Philipp von Weitershausen philipp at weitershausen.de
Fri Jun 3 11:11:17 EDT 2005


Hi there,

I'm CC-ing zope3-users because that's the list for user problems 
(zope3-dev is reserved for zope 3 development).

> Now we that we studied Zope3 and (almost) decided to go for it. Mainly
> for I18n, L10n,  test framework and skins support which are going to
> be very useful for our application.
> Also would like to mention that Zope3 has great documention.

As somebody who has worked on Zope 3 documentation I'm extremely 
satisfied to hear that.

> I still need some suggestions.
> 
> About the product:
> Our product has pyhton backend api for which we are planning to write
> web frontend based on Zope3. Since we have already established api
> which is not like Zope interfaces, I am thinking of using ZPT based
> forms and other pages that would simply call existing backend
> whereever required.
> For eg.
> API has a functions like getUsersList and getUserInfo()
> 
>>>from User import  *
>>>getUsersList()
> 
> ['bob', 'merry']
> 
>>>getUserInfo('bob')
>>>{'name':'bob', 'age': 17}
> 
> And now use ZPT to render
> ..
> <!-- repeat user in User.getUsersList() -->
> <tr>
> <!-- User.getUserInfo['user'] -->
> </tr>
> 
> I know this backend is not very great to start with but given current
> requirement I cant change it much.
> I read ZPT is always bound to the content class. First of all is it
> possible using ZPTs like that without really having defined zope
> interfaces, content classes and  ZCML as minimal as possible? (Am I
> sounding stupid?)

Views (ZPTs are registered as views) are looked up for content classes, 
that is true. That doesn't mean the view necessarily must have something 
to do with the content class. You could simply register all your ZPT 
pages and browser view classes (you need those for all the Python logic 
that you shouldn't put in ZPTs) e.g. for IRootFolder. Then they'd be 
available at http://localhost:8080/@@viewname.html.

Philipp


More information about the Zope3-users mailing list