<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Two views: What are &#8220;designer friendly&#8221; templates?</title>
	<atom:link href="http://compoundthinking.com/blog/index.php/2008/01/23/two-views-what-are-designer-friendly-templates/feed/" rel="self" type="application/rss+xml" />
	<link>http://compoundthinking.com/blog/index.php/2008/01/23/two-views-what-are-designer-friendly-templates/</link>
	<description>Thinking about programming in new ways</description>
	<lastBuildDate>Wed, 28 Jul 2010 19:00:53 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Simon Willison</title>
		<link>http://compoundthinking.com/blog/index.php/2008/01/23/two-views-what-are-designer-friendly-templates/#comment-124549</link>
		<dc:creator>Simon Willison</dc:creator>
		<pubDate>Fri, 25 Jan 2008 15:50:34 +0000</pubDate>
		<guid isPermaLink="false">http://compoundthinking.com/blog/index.php/2008/01/23/two-views-what-are-designer-friendly-templates/#comment-124549</guid>
		<description>Mark: I still return HTML fragments occasionally. The main reason I&#039;m using JSON more now is that I&#039;ve found that using jQuery makes HTML and DOM manipulation painless enough that I don&#039;t mind writing my DOM/HTML generation code in JavaScript as opposed to running a server-side template of some sort.</description>
		<content:encoded><![CDATA[<p>Mark: I still return HTML fragments occasionally. The main reason I&#8217;m using JSON more now is that I&#8217;ve found that using jQuery makes HTML and DOM manipulation painless enough that I don&#8217;t mind writing my DOM/HTML generation code in JavaScript as opposed to running a server-side template of some sort.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Greenfeld</title>
		<link>http://compoundthinking.com/blog/index.php/2008/01/23/two-views-what-are-designer-friendly-templates/#comment-124158</link>
		<dc:creator>Daniel Greenfeld</dc:creator>
		<pubDate>Thu, 24 Jan 2008 13:35:22 +0000</pubDate>
		<guid isPermaLink="false">http://compoundthinking.com/blog/index.php/2008/01/23/two-views-what-are-designer-friendly-templates/#comment-124158</guid>
		<description>What does it matter what template language you use?  I&#039;ve found that good graphic designers really only care about CSS.  If they do need to make changes to the data, they&#039;ll stick to the HTML inside your templates, be it done in Django, Genshi, or TAL, rather than try and modify the views you&#039;ve constructed for them.</description>
		<content:encoded><![CDATA[<p>What does it matter what template language you use?  I&#8217;ve found that good graphic designers really only care about CSS.  If they do need to make changes to the data, they&#8217;ll stick to the HTML inside your templates, be it done in Django, Genshi, or TAL, rather than try and modify the views you&#8217;ve constructed for them.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Ramm</title>
		<link>http://compoundthinking.com/blog/index.php/2008/01/23/two-views-what-are-designer-friendly-templates/#comment-124134</link>
		<dc:creator>Mark Ramm</dc:creator>
		<pubDate>Thu, 24 Jan 2008 12:30:56 +0000</pubDate>
		<guid isPermaLink="false">http://compoundthinking.com/blog/index.php/2008/01/23/two-views-what-are-designer-friendly-templates/#comment-124134</guid>
		<description>Simon:

If I understand Talin correctly the issue is with subtle selector (or other DOM query/manipulation) bugs caused by the fact that the original page template has a mismatched tag or something else that ends up creating a radicaly different DOM structure in the browser than you would expect by looking at the template.

As far as Dreamweaver goes, I think the rise of CSS an making your html more structural than layout-oreinted has pushed many (perhaps most) of the good web designers I know to either switch to the Code View as their primary Dreamweaver interface, or move on to other tools. 

It&#039;s interesting to hear that you went with a non-xml tag based approach to make the logic visible in the WSYWIG tool.   The problem I see with that is that WSYWIG tools sometimes mess with that kind of structure, and end up breaking things.   But, I think this is less and less of an issue as the tools have gotten better. 

Not that this has anything to do with Templating, but I&#039;m interested to hear you&#039;re using almost all JSON, since I&#039;ve done the same.   But I still find that about 10-20% of the time I return HTML snippits to be inserted into the current page.  I don&#039;t ever return XML, but returning HTML still seems  perfectly sensible to me.  Is there any reason you&#039;ve stopped doing that?.</description>
		<content:encoded><![CDATA[<p>Simon:</p>
<p>If I understand Talin correctly the issue is with subtle selector (or other DOM query/manipulation) bugs caused by the fact that the original page template has a mismatched tag or something else that ends up creating a radicaly different DOM structure in the browser than you would expect by looking at the template.</p>
<p>As far as Dreamweaver goes, I think the rise of CSS an making your html more structural than layout-oreinted has pushed many (perhaps most) of the good web designers I know to either switch to the Code View as their primary Dreamweaver interface, or move on to other tools. </p>
<p>It&#8217;s interesting to hear that you went with a non-xml tag based approach to make the logic visible in the WSYWIG tool.   The problem I see with that is that WSYWIG tools sometimes mess with that kind of structure, and end up breaking things.   But, I think this is less and less of an issue as the tools have gotten better. </p>
<p>Not that this has anything to do with Templating, but I&#8217;m interested to hear you&#8217;re using almost all JSON, since I&#8217;ve done the same.   But I still find that about 10-20% of the time I return HTML snippits to be inserted into the current page.  I don&#8217;t ever return XML, but returning HTML still seems  perfectly sensible to me.  Is there any reason you&#8217;ve stopped doing that?.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Simon Willison</title>
		<link>http://compoundthinking.com/blog/index.php/2008/01/23/two-views-what-are-designer-friendly-templates/#comment-124118</link>
		<dc:creator>Simon Willison</dc:creator>
		<pubDate>Thu, 24 Jan 2008 11:42:19 +0000</pubDate>
		<guid isPermaLink="false">http://compoundthinking.com/blog/index.php/2008/01/23/two-views-what-are-designer-friendly-templates/#comment-124118</guid>
		<description>Oddly enough, compatibility with Dreamweaver style environments was one of the (minor) reasons we designed the Django template language to use non-XML style tags in the first place - we thought that having the markup tags visible to developers even when they were working in a WYSIWYG tool like Dreamweaver would make it easier for them to understand what was going to happen to their page without risk of breaking the template because the template logic wasn&#039;t visible to them.

That said, I can&#039;t remember the last time I worked with someone who used a WYSIWYG tool for editing HTML (other than for previewing).

@Talin: I&#039;ve switched to using JSON for pretty much all of my Ajax work, which makes template languages for Ajax work irrelevant (I just dump the output of simplejson straight in to a Django HttpRequest object).</description>
		<content:encoded><![CDATA[<p>Oddly enough, compatibility with Dreamweaver style environments was one of the (minor) reasons we designed the Django template language to use non-XML style tags in the first place &#8211; we thought that having the markup tags visible to developers even when they were working in a WYSIWYG tool like Dreamweaver would make it easier for them to understand what was going to happen to their page without risk of breaking the template because the template logic wasn&#8217;t visible to them.</p>
<p>That said, I can&#8217;t remember the last time I worked with someone who used a WYSIWYG tool for editing HTML (other than for previewing).</p>
<p>@Talin: I&#8217;ve switched to using JSON for pretty much all of my Ajax work, which makes template languages for Ajax work irrelevant (I just dump the output of simplejson straight in to a Django HttpRequest object).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Ramm</title>
		<link>http://compoundthinking.com/blog/index.php/2008/01/23/two-views-what-are-designer-friendly-templates/#comment-123992</link>
		<dc:creator>Mark Ramm</dc:creator>
		<pubDate>Thu, 24 Jan 2008 01:33:16 +0000</pubDate>
		<guid isPermaLink="false">http://compoundthinking.com/blog/index.php/2008/01/23/two-views-what-are-designer-friendly-templates/#comment-123992</guid>
		<description>Talin, Kevin. 

You do have to limit yourself if you&#039;re going to make Genshi work with Dreamweaver, and you&#039;ll have to clean up after dreamweaver more often than you&#039;d like.   But if you *are* working with people who use dreamweaver, a tag based markup language is way better than a string-based markup system. 

And designers can (and in my experience the good ones  do) learn how to work with the underlying structure in dreamweaver too, so it&#039;s not quite as bad as you suggest.</description>
		<content:encoded><![CDATA[<p>Talin, Kevin. </p>
<p>You do have to limit yourself if you&#8217;re going to make Genshi work with Dreamweaver, and you&#8217;ll have to clean up after dreamweaver more often than you&#8217;d like.   But if you *are* working with people who use dreamweaver, a tag based markup language is way better than a string-based markup system. </p>
<p>And designers can (and in my experience the good ones  do) learn how to work with the underlying structure in dreamweaver too, so it&#8217;s not quite as bad as you suggest.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Talin</title>
		<link>http://compoundthinking.com/blog/index.php/2008/01/23/two-views-what-are-designer-friendly-templates/#comment-123984</link>
		<dc:creator>Talin</dc:creator>
		<pubDate>Thu, 24 Jan 2008 01:09:46 +0000</pubDate>
		<guid isPermaLink="false">http://compoundthinking.com/blog/index.php/2008/01/23/two-views-what-are-designer-friendly-templates/#comment-123984</guid>
		<description>Kevin:

Having had similar experiences to yours w/r/t Dreamweaver, I now consider the whole concept of WYSIWYG HTML editing to be dubious for anything other than mostly-static web pages.

This isn&#039;t just a problem with HTML, its really a problem with WYSIWYG as a general concept, which is that WYSIWYG editors are designed to edit the surface presentation of a document, and not the deep generative structure. That&#039;s fine if your presentation is static and non-adaptive, but once you get into the realm of procedurally-generated layout and content you have to start thinking at the level of algorithms and behavior. Simply editing the final output product of the algorithm doesn&#039;t buy you much.</description>
		<content:encoded><![CDATA[<p>Kevin:</p>
<p>Having had similar experiences to yours w/r/t Dreamweaver, I now consider the whole concept of WYSIWYG HTML editing to be dubious for anything other than mostly-static web pages.</p>
<p>This isn&#8217;t just a problem with HTML, its really a problem with WYSIWYG as a general concept, which is that WYSIWYG editors are designed to edit the surface presentation of a document, and not the deep generative structure. That&#8217;s fine if your presentation is static and non-adaptive, but once you get into the realm of procedurally-generated layout and content you have to start thinking at the level of algorithms and behavior. Simply editing the final output product of the algorithm doesn&#8217;t buy you much.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin Teague</title>
		<link>http://compoundthinking.com/blog/index.php/2008/01/23/two-views-what-are-designer-friendly-templates/#comment-123974</link>
		<dc:creator>Kevin Teague</dc:creator>
		<pubDate>Thu, 24 Jan 2008 00:17:09 +0000</pubDate>
		<guid isPermaLink="false">http://compoundthinking.com/blog/index.php/2008/01/23/two-views-what-are-designer-friendly-templates/#comment-123974</guid>
		<description>I&#039;d say that attribute based template languages provide more value to people hand editing templates than they do to teams working with a designer using a GUI tool such as Dreamweaver. In Zope, TAL was often marketed as being &quot;Dreamweaver friendly&quot; but in practice many teams working with designers using Dreamweaver ended up hand editing/rewriting the Dreamweaver generated HTML anyways. Many Dreamweaver designers are going to be chronically fiddling with the layout with little thought to the underlying template attributes. They&#039;ll move parts around, get a feel for a new layout, then move those parts elsewhere, get a feel for that layout, then back to the original layout and on and on, utterly demolishing the semantics of any embedded template attributes
in the process.

But in Zope even though TAL didn&#039;t really deliver on it&#039;s Dreamweaver integration marketing promises, TAL stood the test of time and many people using TAL clutch onto it&#039;s syntax or bring it with them when they work in non-Zope frameworks. e.g. using SimpleTAL in Django:

http://www.agmweb.ca/blog/andy/2029/

Aside from the motiviation of avoiding having to learn a new syntax,
the reason for this affinity for attribute based templates is that the
resulting template *looks* as close as possible to the final output. When
developing a web app, we often inspect the result of a templated view
using Firebug or other tools let us view the HTML source. Then when
switching back to the corresponding template, it&#039;s nice to have something
that looks as close as possible to the resulting HTML output.

Here&#039;s a screenshot comparing an admittedly simple example of
Django templates w/ SimpleTAL with a possible HTML result produced from of either of these templates:

http://www.bud.ca/resources/django-templates-simpletal.png</description>
		<content:encoded><![CDATA[<p>I&#8217;d say that attribute based template languages provide more value to people hand editing templates than they do to teams working with a designer using a GUI tool such as Dreamweaver. In Zope, TAL was often marketed as being &#8220;Dreamweaver friendly&#8221; but in practice many teams working with designers using Dreamweaver ended up hand editing/rewriting the Dreamweaver generated HTML anyways. Many Dreamweaver designers are going to be chronically fiddling with the layout with little thought to the underlying template attributes. They&#8217;ll move parts around, get a feel for a new layout, then move those parts elsewhere, get a feel for that layout, then back to the original layout and on and on, utterly demolishing the semantics of any embedded template attributes<br />
in the process.</p>
<p>But in Zope even though TAL didn&#8217;t really deliver on it&#8217;s Dreamweaver integration marketing promises, TAL stood the test of time and many people using TAL clutch onto it&#8217;s syntax or bring it with them when they work in non-Zope frameworks. e.g. using SimpleTAL in Django:</p>
<p><a href="http://www.agmweb.ca/blog/andy/2029/" rel="nofollow">http://www.agmweb.ca/blog/andy/2029/</a></p>
<p>Aside from the motiviation of avoiding having to learn a new syntax,<br />
the reason for this affinity for attribute based templates is that the<br />
resulting template *looks* as close as possible to the final output. When<br />
developing a web app, we often inspect the result of a templated view<br />
using Firebug or other tools let us view the HTML source. Then when<br />
switching back to the corresponding template, it&#8217;s nice to have something<br />
that looks as close as possible to the resulting HTML output.</p>
<p>Here&#8217;s a screenshot comparing an admittedly simple example of<br />
Django templates w/ SimpleTAL with a possible HTML result produced from of either of these templates:</p>
<p><a href="http://www.bud.ca/resources/django-templates-simpletal.png" rel="nofollow">http://www.bud.ca/resources/django-templates-simpletal.png</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Ramm</title>
		<link>http://compoundthinking.com/blog/index.php/2008/01/23/two-views-what-are-designer-friendly-templates/#comment-123964</link>
		<dc:creator>Mark Ramm</dc:creator>
		<pubDate>Wed, 23 Jan 2008 23:39:22 +0000</pubDate>
		<guid isPermaLink="false">http://compoundthinking.com/blog/index.php/2008/01/23/two-views-what-are-designer-friendly-templates/#comment-123964</guid>
		<description>Shannon: 

Good point, and one which I hope to address in another blog post soon. I think this is a form of &quot;programmer friendliness&quot; and I think that is the often under appreciated other side of this issue.  PHP and classic ASP have produced so much spaghetti code that it&#039;s hard for people to see that more power in a template language can actually lead to more maintainable code. 

Talin: 

A promise of correct output is a very important thing, particularly in modern web applications which as often as not return &quot;something other&quot; than flat HTML pages.  That something other could be RSS feeds, or heavily DOM dependent Ajax, or Atom, or any of a wide varity of data-types where getting the XML (or XHTML) right is *critical.*

That too is another blog post for another day ;)</description>
		<content:encoded><![CDATA[<p>Shannon: </p>
<p>Good point, and one which I hope to address in another blog post soon. I think this is a form of &#8220;programmer friendliness&#8221; and I think that is the often under appreciated other side of this issue.  PHP and classic ASP have produced so much spaghetti code that it&#8217;s hard for people to see that more power in a template language can actually lead to more maintainable code. </p>
<p>Talin: </p>
<p>A promise of correct output is a very important thing, particularly in modern web applications which as often as not return &#8220;something other&#8221; than flat HTML pages.  That something other could be RSS feeds, or heavily DOM dependent Ajax, or Atom, or any of a wide varity of data-types where getting the XML (or XHTML) right is *critical.*</p>
<p>That too is another blog post for another day ;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shannon -jj Behrens</title>
		<link>http://compoundthinking.com/blog/index.php/2008/01/23/two-views-what-are-designer-friendly-templates/#comment-123950</link>
		<dc:creator>Shannon -jj Behrens</dc:creator>
		<pubDate>Wed, 23 Jan 2008 22:43:32 +0000</pubDate>
		<guid isPermaLink="false">http://compoundthinking.com/blog/index.php/2008/01/23/two-views-what-are-designer-friendly-templates/#comment-123950</guid>
		<description>Genshi is a very rich templating environment.  I make heavy use of Genshi functions and match templates to do very interesting things.  Although Genshi is viewable in things like Dreamweaver, if that&#039;s the way someone is using Genshi, he&#039;s missing the point.

I think of Genshi as the perfect way of letting me write markup that makes sense to me that gets processed by match templates etc. in order to generate markup that makes sense to the browser.

That is to say, when I use Genshi, it&#039;s at a very high level, whereas when I use Django templates, it&#039;s at a much lower level.  It&#039;s hard to fully convey this point until you&#039;ve had a bunch of experience with both.</description>
		<content:encoded><![CDATA[<p>Genshi is a very rich templating environment.  I make heavy use of Genshi functions and match templates to do very interesting things.  Although Genshi is viewable in things like Dreamweaver, if that&#8217;s the way someone is using Genshi, he&#8217;s missing the point.</p>
<p>I think of Genshi as the perfect way of letting me write markup that makes sense to me that gets processed by match templates etc. in order to generate markup that makes sense to the browser.</p>
<p>That is to say, when I use Genshi, it&#8217;s at a very high level, whereas when I use Django templates, it&#8217;s at a much lower level.  It&#8217;s hard to fully convey this point until you&#8217;ve had a bunch of experience with both.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Talin</title>
		<link>http://compoundthinking.com/blog/index.php/2008/01/23/two-views-what-are-designer-friendly-templates/#comment-123930</link>
		<dc:creator>Talin</dc:creator>
		<pubDate>Wed, 23 Jan 2008 21:15:34 +0000</pubDate>
		<guid isPermaLink="false">http://compoundthinking.com/blog/index.php/2008/01/23/two-views-what-are-designer-friendly-templates/#comment-123930</guid>
		<description>I&#039;ve argued several times that for AJAX-heavy applications, having a template language which makes it impossible to generate malformed XML is a big win.

Designing an AJAX app requires designing at the level of the DOM - you&#039;re not just creating HTML, you are creating a tree structure that is meant to be manipulated by your JavaScript code. Minor syntactical errors which impact the parent/child relationships of the page elements can take a long time to debug, especially given the relatively poor debugging facilities of many browsers. (Although the existence of FireBug somewhat mitigates this argument.)

So in my view, the primary advantage of Genshi is not its compatibility with WYSIWYG tools, but the fact that it operates at the node level rather than on a stream of text. This makes the template structure conceptually closer to what is eventually going to end up in the browser.

On the other hand, if you really are generating content that is mostly server-generated text with a fixed layout, then a text-based templating system may be the way to go.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve argued several times that for AJAX-heavy applications, having a template language which makes it impossible to generate malformed XML is a big win.</p>
<p>Designing an AJAX app requires designing at the level of the DOM &#8211; you&#8217;re not just creating HTML, you are creating a tree structure that is meant to be manipulated by your JavaScript code. Minor syntactical errors which impact the parent/child relationships of the page elements can take a long time to debug, especially given the relatively poor debugging facilities of many browsers. (Although the existence of FireBug somewhat mitigates this argument.)</p>
<p>So in my view, the primary advantage of Genshi is not its compatibility with WYSIWYG tools, but the fact that it operates at the node level rather than on a stream of text. This makes the template structure conceptually closer to what is eventually going to end up in the browser.</p>
<p>On the other hand, if you really are generating content that is mostly server-generated text with a fixed layout, then a text-based templating system may be the way to go.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
