cherrypy/cheetah vs twisted/nevow

Valentino Volonghi aka Dialtone dialtone#$#NOSPAMMINGME#$$% at gmail.com
Mon Nov 1 17:48:37 CET 2004


On Mon, 01 Nov 2004 12:39:24 -0200, Carlos Ribeiro wrote:

> I'm yet to study nevow, but I'm getting more and more interested. I
> have my own approach to separation; I use to think about a third
> entity, "structure", as being independent from code & ui. The
> structure is the common part; it's the "glue" between ui and code; and
> it's the first part to be designed. I'm still experimenting with this
> concept. For what I have read so far, nevow seems to follow a similar
> approach, although I haven't seen any reference to "structure" as a
> third element in the design anywhere.

What you call structure in Nevow is a flattener IMHO. Basically:

>From a XML/HTML file Nevow builds a Stan Tree which is a simpler DOM
implementation (You can provide your own implementation of this parser/DOM
builder to Nevow, since the framework only cares about the resulting Stan Tree).
Then, when a user connects to your site, the stan tree is flattened, which means
(in nevow-speaking) that nevow iterates through the stan tree directly returning
simple strings and adapting dynamic components (directives, slots, patterns and
so on) to something that knows how to provide an html/xhtml version of the
object.

So the adapter and stan should act like your structure.

> For what I know, twisted is a huge beast, and forces you to a totally
> different programming paradigm. There is a wsgi gateway for twisted in
> the works, and that may make things simpler for pure web development,
> as it will hide some of the inherent complexity of twisted async
> design. For my own needs, I still prefer to stay with CherryPy.

I actually think that Nevow was the first Web Toolkit to provide wsgi support
built-in. And it could be used also without Twisted but as a CGI.

-- 
Valentino Volonghi aka Dialtone
Now running FreeBSD 5.3-STABLE
Blog: http://vvolonghi.blogspot.com





More information about the Python-list mailing list