Message from discussion
Is there any case where chameleon is more preferred?
Received: by 10.68.73.229 with SMTP id o5mr13080136pbv.7.1324174189767;
Sat, 17 Dec 2011 18:09:49 -0800 (PST)
X-BeenThere: pylons-discuss@googlegroups.com
Received: by 10.68.11.197 with SMTP id s5ls18915451pbb.0.gmail; Sat, 17 Dec
2011 18:09:44 -0800 (PST)
Received: by 10.68.189.194 with SMTP id gk2mr13055698pbc.3.1324174184449;
Sat, 17 Dec 2011 18:09:44 -0800 (PST)
Received: by 10.68.189.194 with SMTP id gk2mr13055696pbc.3.1324174184441;
Sat, 17 Dec 2011 18:09:44 -0800 (PST)
Return-Path: <chr...@plope.com>
Received: from cabana.palladion.com (cabana.palladion.com. [64.34.177.88])
by gmr-mx.google.com with ESMTPS id j5si17057769pbi.0.2011.12.17.18.09.44
(version=TLSv1/SSLv3 cipher=OTHER);
Sat, 17 Dec 2011 18:09:44 -0800 (PST)
Received-SPF: neutral (google.com: 64.34.177.88 is neither permitted nor denied by best guess record for domain of chr...@plope.com) client-ip=64.34.177.88;
Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 64.34.177.88 is neither permitted nor denied by best guess record for domain of chr...@plope.com) smtp.mail=chr...@plope.com
Received: from [192.168.1.145] (ip72-209-213-54.dc.dc.cox.net [72.209.213.54])
(using SSLv3 with cipher DHE-RSA-AES256-SHA (256/256 bits))
(No client certificate requested)
by cabana.palladion.com (Postfix) with ESMTP id C54421CC794
for <pylons-discuss@googlegroups.com>; Sat, 17 Dec 2011 19:10:58 -0500 (EST)
Subject: Re: Is there any case where chameleon is more preferred?
From: Chris McDonough <chr...@plope.com>
To: pylons-discuss@googlegroups.com
In-Reply-To: <2497c27f-2481-4bce-851b-ab07db674e0e@k10g2000yqk.googlegroups.com>
References: <CADbAb=02zKFxjCfwaUmOEXqG3A8tYLabmwcNKF+jcWk1LLJX2w@mail.gmail.com>
<CAH9f=ur4tpF_-RKfyMJFc=YkF7g5dZPz2qBoTu007Hn5GzUMbw@mail.gmail.com>
<CAHcLjS5t6uTrO6vdBsDMwQu3EV2ooiFu52QrSgzdmDBtodoRFw@mail.gmail.com>
<2497c27f-2481-4bce-851b-ab07db674e0e@k10g2000yqk.googlegroups.com>
Content-Type: text/plain; charset="UTF-8"
Date: Sat, 17 Dec 2011 21:10:06 -0500
Message-ID: <1324174206.2556.142.camel@thinko>
Mime-Version: 1.0
X-Mailer: Evolution 2.28.3
Content-Transfer-Encoding: 7bit
On Sat, 2011-12-17 at 16:26 -0800, jerry wrote:
> I tried to write full-up programs in XML/XSLT at work and fully agree
> with you that XML is by design not suitable for such task.
>
> However, templates are not, and should not be, full-up programs. The
> awkward XML programing can actually remind the author to limit the
> logic in the template.
For what it's worth, I've been using ZPT (the syntax that Chameleon
implements) for about 9 years. It's no worse and no better than
anything else; the very act of templating itself blows hard enough that
fighting over what's better is like fighting over the grade of bleach
one should be drinking. None of the problems that I have with
templating HTML could be solved with writing the template in a non-XML
syntax.
> Besides, when both the number and complexity of your templates grow,
> it'll be appreciated more and more that your final HTML will be well-
> formed (and free from XSS attack) so long as each individual template
> is validated. This is kind of like unit testing to me.
>
> Last but not the least, XML templates are more designer friendly than
> their non-XML counterparts.
>
> That's why I'm still with Genshi while waiting for Chameleon to be
> ready for prime time.
You're either going to be waiting a long time, or you should stop
waiting. It's about as good as it's going to get. ;-)
- C