<?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"
	>
<channel>
	<title>Comments on: An XML Design Dilemma</title>
	<atom:link href="http://barelyenough.org/blog/2005/09/an-xml-design-dilemma/feed/" rel="self" type="application/rss+xml" />
	<link>http://barelyenough.org/blog/2005/09/an-xml-design-dilemma/</link>
	<description></description>
	<pubDate>Thu, 04 Dec 2008 00:49:46 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
		<item>
		<title>By: Trond Wingård</title>
		<link>http://barelyenough.org/blog/2005/09/an-xml-design-dilemma/#comment-409</link>
		<dc:creator>Trond Wingård</dc:creator>
		<pubDate>Wed, 12 Oct 2005 07:43:06 +0000</pubDate>
		<guid isPermaLink="false">http://pezra.barelyenough.org/blog/?p=163#comment-409</guid>
		<description>&lt;p&gt;For me, as a non-XML-savvy person, I think the second XML is indeed better. And it has to do with readability. But why?&lt;/p&gt;

&lt;p&gt;I have two slightly different explanations for why the readability is better in the second XML. One, it gives me a context for the actions ("What are these? Oh, they're available actions. OK."). Two, it introduces a mental concept (available actions) which quickly leads me to investigate if this is a complete list or if there should be more actions available - it sort of focuses my thinking. (Which is only good if the concept introduced is good - which, in this case, it is.)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>For me, as a non-XML-savvy person, I think the second XML is indeed better. And it has to do with readability. But why?</p>
<p>I have two slightly different explanations for why the readability is better in the second XML. One, it gives me a context for the actions (&#8221;What are these? Oh, they&#8217;re available actions. OK.&#8221;). Two, it introduces a mental concept (available actions) which quickly leads me to investigate if this is a complete list or if there should be more actions available - it sort of focuses my thinking. (Which is only good if the concept introduced is good - which, in this case, it is.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff Grigg</title>
		<link>http://barelyenough.org/blog/2005/09/an-xml-design-dilemma/#comment-318</link>
		<dc:creator>Jeff Grigg</dc:creator>
		<pubDate>Sat, 08 Oct 2005 23:39:16 +0000</pubDate>
		<guid isPermaLink="false">http://pezra.barelyenough.org/blog/?p=163#comment-318</guid>
		<description>&lt;p&gt;P.S. (And this blog software removed all the XML elements too.  Bother!!!   ;-)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>P.S. (And this blog software removed all the XML elements too.  Bother!!!   ;-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff Grigg</title>
		<link>http://barelyenough.org/blog/2005/09/an-xml-design-dilemma/#comment-317</link>
		<dc:creator>Jeff Grigg</dc:creator>
		<pubDate>Sat, 08 Oct 2005 23:37:30 +0000</pubDate>
		<guid isPermaLink="false">http://pezra.barelyenough.org/blog/?p=163#comment-317</guid>
		<description>&lt;p&gt;&#62; Re: Gilles comment at September 26th, 2005 at 2:10 am:
&#62; "Here is my take on this question : from a computer point of view,
&#62;  both designs are equal. In both cases, you can return the list of
&#62;  actions with a simple XPATH expression."&lt;/p&gt;

&lt;p&gt;They're not equal, from a computer's perspective, if you drop the assumption that you'll use XPATH to find them, and the assumption that there will never be  elements at a deeper level.  For example, in the future, an action could describe further actions that could be taken after this one.  Those nested actions would be enabled (or excluded) by this one.&lt;/p&gt;

&lt;p&gt;The first XML mixes elements of two different types: Attributes (identifier, type, description) and the elements of a set or array of actions.  But the "set or array" is missing from the XML.  Grouping the  elements in an  element simplifies the view from the  element to its children.  Consider a tree view of the XML, where you can expand or contract each node.  In IE, for example, I can display this data like this:&lt;/p&gt;

&lt;p&gt;&#124; - 
&#124;     1234 
&#124;     ForkReached 
&#124;     There is a fork in this path. Which way do you want to go? 
&#124;     ... 
&#124;     ... 
&#124;     ... 
&#124;&lt;br /&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
  &lt;th&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
  &lt;td&gt;1234&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td&gt;ForkReached&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td&gt;There is a fork in this path. Which way do you want to go?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td&gt;+&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/p&gt;

&lt;p&gt;And then, *IF I'm interested in the detailed list of actions, I can chose to look at them:&lt;/p&gt;

&lt;p&gt;&#124; - 
&#124;     1234 
&#124;     ForkReached 
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
  &lt;th&gt;There is a fork in this path. Which way do you want to go?&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
  &lt;td&gt;...&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td&gt;...&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td&gt;...&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/p&gt;

&lt;p&gt;That's why it's better.&lt;/p&gt;

&lt;p&gt;(And it's also worse...  Because Word messed with the quotes and ellipses in the second XML.  ;-)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>&gt; Re: Gilles comment at September 26th, 2005 at 2:10 am:<br />
&gt; &#8220;Here is my take on this question : from a computer point of view,<br />
&gt;  both designs are equal. In both cases, you can return the list of<br />
&gt;  actions with a simple XPATH expression.&#8221;</p>
<p>They&#8217;re not equal, from a computer&#8217;s perspective, if you drop the assumption that you&#8217;ll use XPATH to find them, and the assumption that there will never be  elements at a deeper level.  For example, in the future, an action could describe further actions that could be taken after this one.  Those nested actions would be enabled (or excluded) by this one.</p>
<p>The first XML mixes elements of two different types: Attributes (identifier, type, description) and the elements of a set or array of actions.  But the &#8220;set or array&#8221; is missing from the XML.  Grouping the  elements in an  element simplifies the view from the  element to its children.  Consider a tree view of the XML, where you can expand or contract each node.  In IE, for example, I can display this data like this:</p>
<p>| -<br />
|     1234<br />
|     ForkReached<br />
|     There is a fork in this path. Which way do you want to go?<br />
|     &#8230;<br />
|     &#8230;<br />
|     &#8230;<br />
|</p>
<table>
<thead>
<tr>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>1234</td>
</tr>
<tr>
<td>ForkReached</td>
</tr>
<tr>
<td>There is a fork in this path. Which way do you want to go?</td>
</tr>
<tr>
<td>+</td>
</tr>
<tr>
<td></td>
</tr>
</tbody>
</table>
<p>And then, *IF I&#8217;m interested in the detailed list of actions, I can chose to look at them:</p>
<p>| -<br />
|     1234<br />
|     ForkReached </p>
<table>
<thead>
<tr>
<th>There is a fork in this path. Which way do you want to go?</th>
</tr>
</thead>
<tbody>
<tr>
<td>&#8230;</td>
</tr>
<tr>
<td>&#8230;</td>
</tr>
<tr>
<td>&#8230;</td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td></td>
</tr>
</tbody>
</table>
<p>That&#8217;s why it&#8217;s better.</p>
<p>(And it&#8217;s also worse&#8230;  Because Word messed with the quotes and ellipses in the second XML.  ;-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Williams</title>
		<link>http://barelyenough.org/blog/2005/09/an-xml-design-dilemma/#comment-203</link>
		<dc:creator>Peter Williams</dc:creator>
		<pubDate>Thu, 06 Oct 2005 20:30:25 +0000</pubDate>
		<guid isPermaLink="false">http://pezra.barelyenough.org/blog/?p=163#comment-203</guid>
		<description>&lt;p&gt;Tim, you are correct that the second form is only easy to read because the elements are ordered in a particular way.  However, XML is not unordered.  There is a defined order to any document (document order) and in with XML scheme you can, and in most cases do, define a required order to the elements (a 'sequence' in XML schema requires that element occur in the specified order for the document to be valid).  Therefore, the schema for the documents could easily specify that the action elements could only occur at the end of the document.&lt;/p&gt;

&lt;p&gt;On the other hand, you, I and, I think, most other people tend to think of XML documents as unordered (actually, we tend to treat the orderedness as a bug to be ignored/worked around) and, as far as I can tell, very few people actually validate their documents so depending on the order required by the schema is pretty much just folly.  Unless, of course, all the software involved is controlled by the same team, which in this case it is.&lt;/p&gt;

&lt;p&gt;Still I think the readability argument is the best one.  The second from is more readable and is more resistant to obfuscation.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Tim, you are correct that the second form is only easy to read because the elements are ordered in a particular way.  However, XML is not unordered.  There is a defined order to any document (document order) and in with XML scheme you can, and in most cases do, define a required order to the elements (a &#8217;sequence&#8217; in XML schema requires that element occur in the specified order for the document to be valid).  Therefore, the schema for the documents could easily specify that the action elements could only occur at the end of the document.</p>
<p>On the other hand, you, I and, I think, most other people tend to think of XML documents as unordered (actually, we tend to treat the orderedness as a bug to be ignored/worked around) and, as far as I can tell, very few people actually validate their documents so depending on the order required by the schema is pretty much just folly.  Unless, of course, all the software involved is controlled by the same team, which in this case it is.</p>
<p>Still I think the readability argument is the best one.  The second from is more readable and is more resistant to obfuscation.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim Rapp</title>
		<link>http://barelyenough.org/blog/2005/09/an-xml-design-dilemma/#comment-202</link>
		<dc:creator>Tim Rapp</dc:creator>
		<pubDate>Thu, 06 Oct 2005 20:03:23 +0000</pubDate>
		<guid isPermaLink="false">http://pezra.barelyenough.org/blog/?p=163#comment-202</guid>
		<description>&lt;p&gt;When you parse those two xml snippets, the first could have actions interspersed with other event elements (since XML is unordered); the second would have all of the actions grouped together.  It's all the same to a machine (give or take), but much easier for a human to deal with.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>When you parse those two xml snippets, the first could have actions interspersed with other event elements (since XML is unordered); the second would have all of the actions grouped together.  It&#8217;s all the same to a machine (give or take), but much easier for a human to deal with.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bernard Notarianni</title>
		<link>http://barelyenough.org/blog/2005/09/an-xml-design-dilemma/#comment-157</link>
		<dc:creator>Bernard Notarianni</dc:creator>
		<pubDate>Sun, 02 Oct 2005 09:20:17 +0000</pubDate>
		<guid isPermaLink="false">http://pezra.barelyenough.org/blog/?p=163#comment-157</guid>
		<description>&lt;p&gt;&lt;strong&gt;The frontier&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;My favorite recurring big theory is that information management systems are very particular animals compared to scientific or industrial systems. Their main purpose is to automate into a machine some processes which are by nature human process....&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p><strong>The frontier</strong></p>
<p>My favorite recurring big theory is that information management systems are very particular animals compared to scientific or industrial systems. Their main purpose is to automate into a machine some processes which are by nature human process&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Williams</title>
		<link>http://barelyenough.org/blog/2005/09/an-xml-design-dilemma/#comment-148</link>
		<dc:creator>Peter Williams</dc:creator>
		<pubDate>Tue, 27 Sep 2005 18:38:49 +0000</pubDate>
		<guid isPermaLink="false">http://pezra.barelyenough.org/blog/?p=163#comment-148</guid>
		<description>&lt;p&gt;Julien, interesting approach.  Unfortunately, in this case I think that neither design would ever reach its limits.  It is quite unlikely that any refactoring will ever be required and the volume of messages will be measured in messages/week rather than per second.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Julien, interesting approach.  Unfortunately, in this case I think that neither design would ever reach its limits.  It is quite unlikely that any refactoring will ever be required and the volume of messages will be measured in messages/week rather than per second.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Williams</title>
		<link>http://barelyenough.org/blog/2005/09/an-xml-design-dilemma/#comment-147</link>
		<dc:creator>Peter Williams</dc:creator>
		<pubDate>Tue, 27 Sep 2005 18:26:32 +0000</pubDate>
		<guid isPermaLink="false">http://pezra.barelyenough.org/blog/?p=163#comment-147</guid>
		<description>&lt;p&gt;Gilles, maybe the human readability is the best argument.  I think that argument, while correct, is a bit tenuous.  It is not really difficult to read the first form.  I guess you could say that since the cost of the extra element is negligible, even a marginal improvement in readability warrants the change, but it feels a bit contrived to me.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Gilles, maybe the human readability is the best argument.  I think that argument, while correct, is a bit tenuous.  It is not really difficult to read the first form.  I guess you could say that since the cost of the extra element is negligible, even a marginal improvement in readability warrants the change, but it feels a bit contrived to me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Julien Cabot</title>
		<link>http://barelyenough.org/blog/2005/09/an-xml-design-dilemma/#comment-137</link>
		<dc:creator>Julien Cabot</dc:creator>
		<pubDate>Mon, 26 Sep 2005 15:07:53 +0000</pubDate>
		<guid isPermaLink="false">http://pezra.barelyenough.org/blog/?p=163#comment-137</guid>
		<description>&lt;p&gt;To resolve quickly such dilemma, I apply a "distance to limit balance" principle.
I don't look for why a solution is better than another one, but I try to estimate each solution limit as a design limit over there it will not work and I reject the solution where the limit is the more probable (the closest to my current context as a system of constraints).&lt;/p&gt;

&lt;p&gt;For example : 
Limit for the 1st solution : grouping actions involves a structure refactoring
Limit for the 2nd solution :  extra characters (~40o) cost is 1 for 1000 messages/second for a SLA of 100 message/second.&lt;/p&gt;

&lt;p&gt;The distance to limit of the 1st solution seems to be closer to you than the second one. Hence, the second solution seems to be the best at the current time, because the second solution push far the limit. People like to be free of...constraints, isn't it?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>To resolve quickly such dilemma, I apply a &#8220;distance to limit balance&#8221; principle.<br />
I don&#8217;t look for why a solution is better than another one, but I try to estimate each solution limit as a design limit over there it will not work and I reject the solution where the limit is the more probable (the closest to my current context as a system of constraints).</p>
<p>For example :<br />
Limit for the 1st solution : grouping actions involves a structure refactoring<br />
Limit for the 2nd solution :  extra characters (~40o) cost is 1 for 1000 messages/second for a SLA of 100 message/second.</p>
<p>The distance to limit of the 1st solution seems to be closer to you than the second one. Hence, the second solution seems to be the best at the current time, because the second solution push far the limit. People like to be free of&#8230;constraints, isn&#8217;t it?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gilles</title>
		<link>http://barelyenough.org/blog/2005/09/an-xml-design-dilemma/#comment-136</link>
		<dc:creator>Gilles</dc:creator>
		<pubDate>Mon, 26 Sep 2005 08:10:38 +0000</pubDate>
		<guid isPermaLink="false">http://pezra.barelyenough.org/blog/?p=163#comment-136</guid>
		<description>&lt;p&gt;Here is my take on this question : from a computer point of view, both designs are equal. In both cases, you can return the list of actions with a simple XPATH expression.&lt;/p&gt;

&lt;p&gt;I don't believe the second design allows for better extension because you don't know what the future will be like. So you don't know for sure that your design will accomodate for it. On my defense, I believe in just-in-time design (= design for the present moment).&lt;/p&gt;

&lt;p&gt;To me, the second design looks better because it is more human readable.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Here is my take on this question : from a computer point of view, both designs are equal. In both cases, you can return the list of actions with a simple XPATH expression.</p>
<p>I don&#8217;t believe the second design allows for better extension because you don&#8217;t know what the future will be like. So you don&#8217;t know for sure that your design will accomodate for it. On my defense, I believe in just-in-time design (= design for the present moment).</p>
<p>To me, the second design looks better because it is more human readable.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
