[Zope3-dev] Re: Zope 3 Newsletter: Issue 10
Edward Muller
edwardam at interlix.com
Sun Sep 7 15:19:44 EDT 2003
On Sun, 2003-09-07 at 07:40, Jim Fulton wrote:
[snip]
> > If I could replace the
> > Python Scripts that massage data with a persistent module, I don't even
> > know how to address that module in public-space page templates in Zope
> > 3.
>
> Well, we need to decide that. Here are some thoughts. There are two basic
> styles of handling forms posts:
>
> 1. Post to a template (e.g. ZPT) that calls the necessary Python code.
> This is my preference.
>
> 2. Post to a bit of Python code that then calls the template. In this case,
> the Python code has to have a URL.
>
> If we had Zope 2-style "script python", things would work the way they
> do now, for better or worse.
>
> If a form is posted to a template, then you could do the form processing
> in one or more script tags.
>
> If we had content-space modules, I would expect them to be traversable.
> You'd traverse a module to get at one of it's methods. If you wanted to
> call a method from a template, you'd use a path expression like:
> "container/themodulename/thementhodname" or, in a python expression:
> "python: container[themodulename].themethodname(...)".
>
> If the form is posted to the python code, then you'd use a URL like:
> themodulename/thementhodname
[snip]
Late the the whole thing, but I have to ask, why would you want to 'Post
to a template' and have all of the validation logic in a <script> tags?
Validation logic can include things like sql calls, calls to remote
sites, etc. This is surely best done in the 'controller' space and
outside of a zpt, which AFAIK are to be used for presentation.
Like I said, I'm late the the whole discussion and zope3 is a very new
thing to me.
--
Edward Muller
Interlix (http://www.interlix.com)
Phone: 417-862-0573 - Cell: 417-844-2435 - Fax: 417-862-0572
Web Hosting - PC Service & Support - Custom Programming - Network Service & Support
Specializing in Open Source Solutions
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.zope.org/pipermail/zope3-dev/attachments/20030907/a6d86dc7/attachment.bin
More information about the Zope3-dev
mailing list