[Twisted-web] Re: Thoughts on documentation, wading into Twisted, Nevow, etc.

Paul G paul-lists at perforge.com
Mon Jul 3 04:13:44 CDT 2006


i don't use nevow specifically, but i'll throw in my 2 kopecks anyway ;]


----- Original Message ----- 
From: "Nicola Larosa" <nico at tekNico.net>
To: <twisted-web at twistedmatrix.com>
Sent: Monday, July 03, 2006 4:07 AM
Subject: [Twisted-web] Re: Thoughts on documentation, wading into 
Twisted,Nevow, etc.



> 1) the URL resolution mechanism in Nevow is very general and powerful, but
> makes it hard to see all the URLs in a site, and how they are handled.
>
> The regular expressions used in Django are less general and rather ugly,
> but do the job and make it very easy to see all the handled URLs at a 
> glance.

i'll disagree with this on principle. you can easily implement django-style 
url mapping, at least as you've described it, with a few lines of code on 
top of the more general architecture in t.web/t.web2 (and likely nevow, but 
i don't remember the details). the reverse may not be true (and likely 
isn't, but i can't say for sure since i don't know django well enough). 
sure, it'd be nice if it were already written, but it's so trivial that it's 
almost a non-concern. on my end, the django approach would simply be 
completely unusable.

> 2) the XHTML templating in Nevow (and Kid, and ZPT, and STL) is uselessly
> convoluted. The template validability is a red herring, and makes writing
> and reading presentation logic needlessly complicated.

zope has a good reason for this - they have a specific design requirement to 
allow untrusted edits to the templates. i'll agree that it's unwise to 
burden the common (from where i sit) case where all edits are considered 
trusted with the complexity that is inherent in supporting that requirement.

personally, i don't need to validate (and can't, in most cases, because i 
don't have xhtml). i strongly prefer the cheetah approach and dearly wish 
there were official integration with twisted. however, other people have 
said they liked stan, and far be it from me to impose my preferences on 
others; this is a case of different strokes for different folks imho. 
pluggable templating methods would be sweet.



> To clarify, I've been using Twisted on the job for three years now, I just
> got a new job on that basis mainly (so thanks once again, guys :-) ), and
> am the current Twisted website maintainer, so I'm heavily invested in 
> Twisted.
>
> Now I have the problem of a better integration between Twisted and Django,
> but it's a solvable problem. ;-)

good to hear :) there's a lot to be said for twisted, as an appplication 
server model is largely superior to a context-dies-at-end-of-request model 
apache imposes on people for a large set of applications where there's a 
considerable amount of application level context. it's incredibly 
frustrating to see people who don't even realize that there are options 
beyond persisting all state in their rdbms between requests, even when that 
state is transient. there are, however, many different needs in terms of 
frameworks on top of that and nevow fills just one niche; imho, the route to 
go is attempt integration with as many feature distinct frameworks as needed 
to provide good coverage of all the options.

for someone with a simple set of needs, something primitive-and-easy like 
RoR may be the ticket. for someone who's doing heavy lifting and likes stan, 
nevow might be it. etc ad infinitum. i don't think it's realistic to expect 
twisted/divmod devs to do all of this, since (at least for the divmod guys), 
you'd assume nevow works the way they like their web frameworks baked. would 
lobbying the framework developers to integrate with twisted be workable? i'd 
certainly love it if, say, cheetah integration were developed and maintained 
by the cheetah devs, as opposed to me having to roll an in-house 
implementation.

as i said, that's just my 2 kopecks, and if someone's been following russian 
economic development, 2 kopecks isn't worth much nowadays (so i hear from my 
grandma, anyway) <g>

-p 




More information about the Twisted-web mailing list