Python Webpages

Paul Boddie paul at boddie.net
Mon Apr 29 04:51:26 EDT 2002


Jon Ribbens <jon+usenet at unequivocal.co.uk> wrote in message news:<slrnacpc38.obc.jon+usenet at snowy.squish.net>...
> In article <aai5oo$99l$1 at maud.ifi.uio.no>, Johan Fredrik Øhman wrote:
> > Just realized that these Servlet based development models really limits the
> > usage of software like Dreamweaver.  Since all code is in the program these
> > utilities are almost worthless.  Is there a good way to combine Webware with
> > templates.  I think of templates as pages where certain %words% are
> > substituted etc...

In the above, I think you're really referring to *SP (ASP, JSP, PSP)
or "program-in-markup" templating, rather than servlets. Certainly,
Webware doesn't restrict you to using PSP just because it has the
notion of servlets.

> This is exactly why I created jonpy (http://jonpy.sourceforge.net/).
> It puts *no* Python code inside your HTML templates, you simply mark
> sections using comments (e.g. <!--wt:newsitem-->) and replacements
> using dollar signs (e.g. $$title$$). The idea is that even if you are
> suddenly given an entirely new design with new HTML files with none of
> the modifications you made to make the pages work, it will only take a
> few minutes to fix them up again.

As I noted before, DTML started out a bit like this, and there are
other template frameworks which stick quite close to the more
"conservative" forms of templating. Personally, I believe simple
"model-based" (or "placeholder-based") templating offers the most
reward for the least additional complexity (and maintenance),
especially for certain kinds of applications, and that the extra power
offered by less "conservative" template frameworks only gives you a
certain amount of extra flexibility that not all applications really
need.

Paul



More information about the Python-list mailing list