<?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: The MVC Colouring Book</title>
	<atom:link href="http://infotrope.net/blog/2007/07/22/the-mvc-colouring-book/feed/" rel="self" type="application/rss+xml" />
	<link>http://infotrope.net/blog/2007/07/22/the-mvc-colouring-book/</link>
	<description>Kirrily Robert&#039;s blog</description>
	<lastBuildDate>Sat, 17 Jul 2010 20:29:03 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Aaron Trevena</title>
		<link>http://infotrope.net/blog/2007/07/22/the-mvc-colouring-book/comment-page-1/#comment-348</link>
		<dc:creator>Aaron Trevena</dc:creator>
		<pubDate>Tue, 07 Aug 2007 16:36:47 +0000</pubDate>
		<guid isPermaLink="false">http://infotrope.net/blog/2007/07/22/the-mvc-colouring-book/#comment-348</guid>
		<description>Hi Dave,

Original data sources are a mix of ICAO, Met Office, FAA and US DOD data feeds - parsed using perl Lexers and stored in a database as plain text, then pulled out as objects with validation and other methods (such as providing lat/lon, dates and other properties).

My templating system (http://www.tt2.org) allows me to provide arbitary data structures, including iterators of these objects to the templates, as well as direct access to classes for class methods, the ability to call object methods, etc.

The templating system also provides dozens of built-in filters and hundreds of extensions to make it simple. All of which is heavily tested and proven to work when it matters.

Writing custom XSLT would not only be a poor use of my time, but introduce the risk of errors and require further unit and regression tests. Changes would also be slower than modifying templates, and with only 2 main templates (or even dozens) for a particular report &#039;perl -pie&#039; allows me to search and replace in an instant.

Templates are also accessible to designers, and easier to track changes in. XSLT is just lose/lose : slower and more error prone both in development and at run time.</description>
		<content:encoded><![CDATA[<p>Hi Dave,</p>
<p>Original data sources are a mix of ICAO, Met Office, FAA and US DOD data feeds &#8211; parsed using perl Lexers and stored in a database as plain text, then pulled out as objects with validation and other methods (such as providing lat/lon, dates and other properties).</p>
<p>My templating system (<a href="http://www.tt2.org" rel="nofollow">http://www.tt2.org</a>) allows me to provide arbitary data structures, including iterators of these objects to the templates, as well as direct access to classes for class methods, the ability to call object methods, etc.</p>
<p>The templating system also provides dozens of built-in filters and hundreds of extensions to make it simple. All of which is heavily tested and proven to work when it matters.</p>
<p>Writing custom XSLT would not only be a poor use of my time, but introduce the risk of errors and require further unit and regression tests. Changes would also be slower than modifying templates, and with only 2 main templates (or even dozens) for a particular report &#8216;perl -pie&#8217; allows me to search and replace in an instant.</p>
<p>Templates are also accessible to designers, and easier to track changes in. XSLT is just lose/lose : slower and more error prone both in development and at run time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Baker</title>
		<link>http://infotrope.net/blog/2007/07/22/the-mvc-colouring-book/comment-page-1/#comment-347</link>
		<dc:creator>Dave Baker</dc:creator>
		<pubDate>Tue, 07 Aug 2007 16:23:02 +0000</pubDate>
		<guid isPermaLink="false">http://infotrope.net/blog/2007/07/22/the-mvc-colouring-book/#comment-347</guid>
		<description>Aaron, in what format is your data (which you&#039;re using to generate HTML/HTML/ODF)?</description>
		<content:encoded><![CDATA[<p>Aaron, in what format is your data (which you&#8217;re using to generate HTML/HTML/ODF)?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron Trevena</title>
		<link>http://infotrope.net/blog/2007/07/22/the-mvc-colouring-book/comment-page-1/#comment-344</link>
		<dc:creator>Aaron Trevena</dc:creator>
		<pubDate>Tue, 07 Aug 2007 10:00:25 +0000</pubDate>
		<guid isPermaLink="false">http://infotrope.net/blog/2007/07/22/the-mvc-colouring-book/#comment-344</guid>
		<description>HTML is as much marked up text as the programming language I write, both are tokenised into nice abstract trees, but both remain human readable text organised into a structure for computer processing.

In terms of a report - HTML is content marked up for semantic organisation and basic layout, with CSS providing styling.

XSLT *is* error-prone at runtime - syntax/parsing aren&#039;t the only errors - logical errors are not only harder to spot, but harder to avoid and fix. XSLT makes a problem bigger by providing another layer of complexity and escaping troublesome characters.

As I&#039;ve said templating works far better for most jobs, a well-formed and valid template won&#039;t stop working or suddenly become invalid, or be thrown by unescaped or double escaped content and can even handle it well.

I can generate valid XML/HTML/ODF, or create it manually, either way - I still use it as a template and XSLT doesn&#039;t provide any benefits.</description>
		<content:encoded><![CDATA[<p>HTML is as much marked up text as the programming language I write, both are tokenised into nice abstract trees, but both remain human readable text organised into a structure for computer processing.</p>
<p>In terms of a report &#8211; HTML is content marked up for semantic organisation and basic layout, with CSS providing styling.</p>
<p>XSLT *is* error-prone at runtime &#8211; syntax/parsing aren&#8217;t the only errors &#8211; logical errors are not only harder to spot, but harder to avoid and fix. XSLT makes a problem bigger by providing another layer of complexity and escaping troublesome characters.</p>
<p>As I&#8217;ve said templating works far better for most jobs, a well-formed and valid template won&#8217;t stop working or suddenly become invalid, or be thrown by unescaped or double escaped content and can even handle it well.</p>
<p>I can generate valid XML/HTML/ODF, or create it manually, either way &#8211; I still use it as a template and XSLT doesn&#8217;t provide any benefits.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric TF Bat</title>
		<link>http://infotrope.net/blog/2007/07/22/the-mvc-colouring-book/comment-page-1/#comment-343</link>
		<dc:creator>Eric TF Bat</dc:creator>
		<pubDate>Tue, 07 Aug 2007 09:51:44 +0000</pubDate>
		<guid isPermaLink="false">http://infotrope.net/blog/2007/07/22/the-mvc-colouring-book/#comment-343</guid>
		<description>No, HTML isn&#039;t marked-up text.  It looks like it, but it isn&#039;t, and that&#039;s the reason it doesn&#039;t make sense to you to use the right tools for the job.  HTML is a tree-structured document, with a node called &quot;html&quot; at the root, a &quot;head&quot; and a &quot;body&quot; at the second level, and so on.  That&#039;s what HTML is.  What it looks like is entirely unrelated.

The telling point in your argument, from my POV, is that you say XSLT is error-prone at runtime.  It&#039;s not.  As long as your input is a tree document, your output will be too.  If your input is text that kinda sorta looks a little like a representation of a structured document but only does so because you&#039;ve cleverly remembered never to put a slash-foo before a foo or leave an attribute unquoted, THEN you&#039;re going to run into problems.

Again I say: the right tool for the job is XSLT, or anything else that works with the DOM.  Everything else is what I call Programming By Puns: it looks right, but it&#039;s not really.</description>
		<content:encoded><![CDATA[<p>No, HTML isn&#8217;t marked-up text.  It looks like it, but it isn&#8217;t, and that&#8217;s the reason it doesn&#8217;t make sense to you to use the right tools for the job.  HTML is a tree-structured document, with a node called &#8220;html&#8221; at the root, a &#8220;head&#8221; and a &#8220;body&#8221; at the second level, and so on.  That&#8217;s what HTML is.  What it looks like is entirely unrelated.</p>
<p>The telling point in your argument, from my POV, is that you say XSLT is error-prone at runtime.  It&#8217;s not.  As long as your input is a tree document, your output will be too.  If your input is text that kinda sorta looks a little like a representation of a structured document but only does so because you&#8217;ve cleverly remembered never to put a slash-foo before a foo or leave an attribute unquoted, THEN you&#8217;re going to run into problems.</p>
<p>Again I say: the right tool for the job is XSLT, or anything else that works with the DOM.  Everything else is what I call Programming By Puns: it looks right, but it&#8217;s not really.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron Trevena</title>
		<link>http://infotrope.net/blog/2007/07/22/the-mvc-colouring-book/comment-page-1/#comment-342</link>
		<dc:creator>Aaron Trevena</dc:creator>
		<pubDate>Tue, 07 Aug 2007 08:03:27 +0000</pubDate>
		<guid isPermaLink="false">http://infotrope.net/blog/2007/07/22/the-mvc-colouring-book/#comment-342</guid>
		<description>But HTML is just marked up text, you&#039;re comparing a document I would write by hand in an application to a generated report - which is apples and oranges - I write and re-edit a document before printing or converting to PDF - very different to generated reports which are  tested before deployment.

Essentially you&#039;re suggesting I use XSLT for templating, which is a bad idea - particularly for automated reports. XSLT is nice for stylising, but not for nontrivial templating. Not only does it require a great deal more work up front, but it&#039;s slower and more error-prone at runtime.

I have 2 templates, using a far better templating solution than XSLT, one for ODF one for HTML, both very different, if I need to change some of the small ammount of non-generated text, that is both rare and simple.

XSLT is good if you don&#039;t have a decent templating system, or need simple restyling or formatting of XML, but for 99% of problems you&#039;re better of with a tool designed for the job.</description>
		<content:encoded><![CDATA[<p>But HTML is just marked up text, you&#8217;re comparing a document I would write by hand in an application to a generated report &#8211; which is apples and oranges &#8211; I write and re-edit a document before printing or converting to PDF &#8211; very different to generated reports which are  tested before deployment.</p>
<p>Essentially you&#8217;re suggesting I use XSLT for templating, which is a bad idea &#8211; particularly for automated reports. XSLT is nice for stylising, but not for nontrivial templating. Not only does it require a great deal more work up front, but it&#8217;s slower and more error-prone at runtime.</p>
<p>I have 2 templates, using a far better templating solution than XSLT, one for ODF one for HTML, both very different, if I need to change some of the small ammount of non-generated text, that is both rare and simple.</p>
<p>XSLT is good if you don&#8217;t have a decent templating system, or need simple restyling or formatting of XML, but for 99% of problems you&#8217;re better of with a tool designed for the job.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric TF Bat</title>
		<link>http://infotrope.net/blog/2007/07/22/the-mvc-colouring-book/comment-page-1/#comment-338</link>
		<dc:creator>Eric TF Bat</dc:creator>
		<pubDate>Tue, 07 Aug 2007 04:47:11 +0000</pubDate>
		<guid isPermaLink="false">http://infotrope.net/blog/2007/07/22/the-mvc-colouring-book/#comment-338</guid>
		<description>The problem is that you&#039;re thinking of HTML as a kind of text, but that&#039;s wrong.  If you produce a PDF document and then notice there&#039;s an apostrophe missing, you don&#039;t open the document in a binary editor and correct it, do you?  You fire up your word processor, correct the bug at the source and regenerate the PDF.  Well, HTML should be the same.  If you find yourself producing code that generates HTML tags, then (as the cat macros say) &quot;YOUR DOIN IT RONG!&quot;

So instead you edit the static parts of your site as XHTML in XML documents.  You generate dynamic output at the server side as XML.  If you must produce HTML at the client side, you do so using the DOM, but that&#039;s outside the scope of this.  The goal is to push everything through an XSLT template that slurps in the appropriate content and adds all your navigation and headers and footers (or RSS stuff, or whatever).</description>
		<content:encoded><![CDATA[<p>The problem is that you&#8217;re thinking of HTML as a kind of text, but that&#8217;s wrong.  If you produce a PDF document and then notice there&#8217;s an apostrophe missing, you don&#8217;t open the document in a binary editor and correct it, do you?  You fire up your word processor, correct the bug at the source and regenerate the PDF.  Well, HTML should be the same.  If you find yourself producing code that generates HTML tags, then (as the cat macros say) &#8220;YOUR DOIN IT RONG!&#8221;</p>
<p>So instead you edit the static parts of your site as XHTML in XML documents.  You generate dynamic output at the server side as XML.  If you must produce HTML at the client side, you do so using the DOM, but that&#8217;s outside the scope of this.  The goal is to push everything through an XSLT template that slurps in the appropriate content and adds all your navigation and headers and footers (or RSS stuff, or whatever).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron Trevena</title>
		<link>http://infotrope.net/blog/2007/07/22/the-mvc-colouring-book/comment-page-1/#comment-334</link>
		<dc:creator>Aaron Trevena</dc:creator>
		<pubDate>Mon, 06 Aug 2007 12:22:23 +0000</pubDate>
		<guid isPermaLink="false">http://infotrope.net/blog/2007/07/22/the-mvc-colouring-book/#comment-334</guid>
		<description>Hey Eric,

How many XHTML-like views are you providing?

Surely CSS and (X)HTML is sufficient - XSLT seems an un-necessary addition given that HTML, RSS and REST, etc will all contain different content anyway.

I don&#039;t use Mason, I use Template Toolkit, I&#039;ve never needed or wanted XSLT yet - the only project where I&#039;ve seen it required was a major document management system for a national standards body (using the Maypole Perl MVC framework).</description>
		<content:encoded><![CDATA[<p>Hey Eric,</p>
<p>How many XHTML-like views are you providing?</p>
<p>Surely CSS and (X)HTML is sufficient &#8211; XSLT seems an un-necessary addition given that HTML, RSS and REST, etc will all contain different content anyway.</p>
<p>I don&#8217;t use Mason, I use Template Toolkit, I&#8217;ve never needed or wanted XSLT yet &#8211; the only project where I&#8217;ve seen it required was a major document management system for a national standards body (using the Maypole Perl MVC framework).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric TF Bat</title>
		<link>http://infotrope.net/blog/2007/07/22/the-mvc-colouring-book/comment-page-1/#comment-243</link>
		<dc:creator>Eric TF Bat</dc:creator>
		<pubDate>Mon, 23 Jul 2007 00:25:58 +0000</pubDate>
		<guid isPermaLink="false">http://infotrope.net/blog/2007/07/22/the-mvc-colouring-book/#comment-243</guid>
		<description>I prefer to take it a step further, and never output HTML directly.  XSLT is good: it lets you treat HTML as an XML document instead of as a string of greater-thans, less-thans and assorted other ASCII characters.  This makes templating systems like Mason less attractive to me.

Apart from that, I&#039;m in complete agreement.  Monochrome source code is the only way to go!</description>
		<content:encoded><![CDATA[<p>I prefer to take it a step further, and never output HTML directly.  XSLT is good: it lets you treat HTML as an XML document instead of as a string of greater-thans, less-thans and assorted other ASCII characters.  This makes templating systems like Mason less attractive to me.</p>
<p>Apart from that, I&#8217;m in complete agreement.  Monochrome source code is the only way to go!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Baker</title>
		<link>http://infotrope.net/blog/2007/07/22/the-mvc-colouring-book/comment-page-1/#comment-241</link>
		<dc:creator>Dave Baker</dc:creator>
		<pubDate>Sun, 22 Jul 2007 08:44:03 +0000</pubDate>
		<guid isPermaLink="false">http://infotrope.net/blog/2007/07/22/the-mvc-colouring-book/#comment-241</guid>
		<description>Bravo. The use of color is very helpful to me. Now I just have to get out the crayons and apply them to my 1998 CGI scripts :)

I have been making stabs at using CGI::Application and Catalyst, but so far not much traction. I look forward to exploring your MiniMVC work!</description>
		<content:encoded><![CDATA[<p>Bravo. The use of color is very helpful to me. Now I just have to get out the crayons and apply them to my 1998 CGI scripts :)</p>
<p>I have been making stabs at using CGI::Application and Catalyst, but so far not much traction. I look forward to exploring your MiniMVC work!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
