durusmail: quixote-users: Re: A toy Nevow implementation
A toy Nevow implementation
2004-01-15
2004-01-15
2004-01-15
2004-01-15
Debug syntax errors in PTL (was: A toy Nevow implementation)
2004-01-15
Debug syntax errors in PTL (was: A toy Nevowimplementation)
2004-01-15
Debug syntax errors in PTL (was: A toy Nevowimplementation)
2004-01-16
Jason E. Sibre (2 parts)
Debug syntax errors in PTL
2004-01-22
Debug syntax errors in PTL
2004-01-18
2004-01-18
2004-01-15
Re: A toy Nevow implementation
2004-01-16
2004-01-19
Re: A toy Nevow implementation
2004-01-19
Re: A toy Nevow implementation
2004-01-19
2004-01-19
2004-01-19
2004-01-19
2004-01-19
2004-01-19
2004-01-19
2004-01-19
2004-01-20
2004-01-20
2004-01-20
2004-01-20
2004-01-21
2004-01-20
Re: A toy Nevow implementation
Donovan Preston
2004-01-19
On Jan 19, 2004, at 4:22 PM, Skip Montanaro wrote:

> I know that Quixote is aimed at programmers, but I find it hard to
> believe
> that obscuring the HTML as much as something like Nevow does is a good
> thing
> in the long run.  Somewhere along the way someone's likely to want a
> professionally designed website.  It seems that it would be an awful
> lot of
> work to take a web designer's HTML mockup and convert it to something
> like
> Nevow.  It still wouldn't be trivial with PTL, but I think it would be
> a lot
> easier.

Which is exactly why the real Nevow lets you use on-disk HTML templates
with attribute processing directives, ala ZPT. The stan syntax, while
it is incredible for rapidly prototyping views for web applications, is
only a (very) tiny part of Nevow, although it is the part people notice
and fixate on because it is so striking.

The translation process is so straightforward, in fact, it could almost
be automatic, and that is probably a good idea for a tool to help
refactoring:

class Foo(Renderer):
        def render_name(self, context, data):
                return "Your name here"

        document = html[
        head[
                title["Hello"]
        ],
        body[
                span(render=render_name)
        ]
]

Versus the version with an XHTML template:

class Foo(HTMLRenderer):
        templateFile = "Foo.html"

        def render_name(self, context, data):
                return "Your name here"

And the HTML file:


        
                Hello
        
        
                
        


The idea would be that you prototype using stan syntax, refactor to use
an HTML template when you are reasonably happy with the general
structure of the HTML, and then hand the resulting file off to a
designer, who is free to use Dreamweaver or GoLive for the same reasons
they are free to use those tools on a ZPT template.

Donovan



reply