[Twisted-web] new nevow know-how needs...;-)

Alex Martelli twisted-web@twistedmatrix.com
Mon, 01 Mar 2004 12:02:55 +0100


Hi all -- I'm rather IRC-allergic, don't particularly love mailing lists,
but apparently gmane should let me access this mlist via my newsreader
(much, much better from my POV), so, let's see.

With Rikard Anglerud, and help from Anders Hammarquist (aka Iko), we're
developing a few web applications, and eventually a new framework for web
applications, with/for AB Strakt's "CAPS" (see www.strakt.com), and we're
basing our work entirely on nevow and other parts of twisted (CAPS already
uses twisted for all communication among its layers, so the new approach
already works much more smoothly than our "previous generation" web-apps
based on Webware, IMHO).  Over the last few days we moved our stuff from
nevow's previous generation (the one that's part of quotient) to nevow's
new, stand-alone incarnation.  The amount of incompatible changes was
staggering (serves us right for working with a new, hotly-developing
framework, of course;-), but they do seem to be for the better, and we do
have everything working again now (and having nevow as a stand-alone
package does make the task of packaging it up with the rest of what CAPS
needs _way_ easier, of course).

I currently have _one_ serious problem understanding what's going on (or
supposed to go on): nevow:data="whatever" directives.  I don't understand
the rules regarding WHEN this causes a lookup (e.g. of 'data_whatever' on a
rend.Page subclass), WHAT it looks things up when it does do a lookup,
WHEN it calls method 'data_whatever' thereafter, and with what arguments.
Basically, I must be missing something important here -- it mostly feels
that once I've used a nevow:data= directive, I lose control of what's going
to happen and get nasty surprises.  So, I'm gradually moving to using
nevow.render= directives instead -- mixing the "model" aspect (getting the
data on which rendering is to be based) with the "view" one (rendering it).
Not nice, but with nevow.render I _do_ appear to have complete control, or
maybe better expressed, _understanding_, of what's gonna happen...

So, perhaps somebody can help me understand and use data directives in a
more appropriate way?  Thanks in advance!


Alex