Seperating HTML content from logic ( was: Re: Inserting Python commands into HTML documents)

Alex Martelli aleax at aleax.it
Mon Apr 14 17:24:39 EDT 2003


On Monday 14 April 2003 10:48 pm, Scott Chapman wrote:
> On Monday 14 April 2003 00:29, Alex Martelli wrote:
> > Sure, there are many ways in which you can choose to use this
> > debatable "let's mix logic right inside presentation so we can't
> > easily separate them any more" approach (perhaps excusable when
> > one's in a deuced hurry, if one's used to it and thus can deploy
> > it fastest).
>
> I've been dealing with web pages for a while, using the "embed the
> scripting language into the HTML" model.  I'd like to find some good docs
> on how to implement the "lets seperate the logic and presentation" model.

I find Steve Holden's book "Python Web Programming" (New Riders)
pretty good at that, at an instructional level.  But I think there's a
growing body of literature on how to do that with XML for the "logic"
and stylesheets (including XSLT) for the presentation (I admit I'm not
really up to date on that, though).


> I'd also like to know which Python toolkits/frameworks that are aimed at
> implementing this model.
>
> Any pointers?

I would suggest "Webware for Python", and Cheetah for templating (but,
there are good templating alternatives -- Cheetah seems to stand out
as particularly suitable for non-programmers maintaining the presentation
layer[s] while programmers maintain the logic of the scripts behind it).


Alex






More information about the Python-list mailing list