<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Andrey Shchekin &#187; HTML5</title>
	<atom:link href="http://blog.ashmind.com/category/web/markup/html/html5/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.ashmind.com</link>
	<description></description>
	<lastBuildDate>Mon, 15 Mar 2010 18:00:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Programming is complex: HTML5 data-*</title>
		<link>http://blog.ashmind.com/2008/09/21/programming-is-complex-html5-data/</link>
		<comments>http://blog.ashmind.com/2008/09/21/programming-is-complex-html5-data/#comments</comments>
		<pubDate>Sun, 21 Sep 2008 11:55:40 +0000</pubDate>
		<dc:creator>Andrey Shchekin</dc:creator>
				<category><![CDATA[Criticism]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[microformats]]></category>
		<category><![CDATA[Standards]]></category>

		<guid isPermaLink="false">http://blog.ashmind.com/index.php/2008/09/21/programming-is-complex-html5-data/</guid>
		<description><![CDATA[According to HTML5 spec, every attribute that starts with data- should be ignored by browser and considered a data needed for some scripts. For example: &#60;ul data-sortable="yes"&#62;…&#60;/ul&#62; .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.w3.org/html/wg/html5/#custom">According to HTML5 spec</a>, every attribute that starts with data- should be ignored by browser and considered a data needed for some scripts. For example:</p>
<pre class="csharpcode"><span class="kwrd">&lt;</span><span class="html">ul</span> <span class="attr">data-sortable</span><span class="kwrd">="yes"</span><span class="kwrd">&gt;…</span><span class="kwrd">&lt;/</span><span class="html">ul</span><span class="kwrd">&gt;</span></pre>
<style type="text/css">.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
</style>
<p>Does it remind you of something? It is a simplified version of XML namespaces, but limited to non-hierarchical data and with much more probability of data clash.</p>
<p>John Resig, in the comments to <a href="http://ejohn.org/blog/html-5-data-attributes/">his blog post</a> on the matter, says that &#8220;The learning curve and failure rate are too high to purely XML-based markup, which is why the data-* attribute exists as a means to implementing this solution&#8221;. I completely disagree with the learning curve argument, and this is why:</p>
<p>Programming <strong>is</strong> complex. </p>
<p>It is easy to forget about the complexity while doing smart new stuff. And new cool things is not what I am talking about. <em>Inventing</em> new thing is easy, since you do not have to think about all limitations of the new ones. Making them work for all occasions, <em>that</em> is what is complex.</p>
<p>It is easy to praise HTML5 over XHTML. It is easy to praise <a href="http://microformats.org/">microformats</a>.</p>
<p>But all standards are here for a reason. It is easy to punch Microsoft, however first versions of <a href="http://picasa.google.com/">Google&#8217;s Picasa</a> didn&#8217;t support non-English text in labels, at all. <em>Current</em> version of <a href="https://buzzword.acrobat.com">Adobe Buzzword</a> does not support Russian text. <em>Current</em> versions of Picasa and Opera do not support Drag&amp;Drop outside of application. I have never seen any of such problems in MS applications. In fact, Visual Basic supported Unicode for ages, while relatively modern web languages stumble on it.</p>
<p>I have already blogged about <a href="http://blog.ashmind.com/index.php/2007/05/22/microformats-are-web-20-virus/">microformats being a hack</a>. And now I read about <a href="http://www.bbc.co.uk/blogs/radiolabs/2008/06/removing_microformats_from_bbc.shtml">BBC removing microformats support</a> due to problems with screen readers and semantics of abbr tag. Is it easy to remember that screen readers must be supported? No. Is it a shiny 2.0 kind-of-thing to think about them? No. But it is one of the multiple things you <strong>have</strong> <strong>to</strong> think about when making a wide-used standard.</p>
<p>Adding easy solutions when possible is a great thing. But it wrong to think of programmers as people who can only work with easy solutions. Flexibility is much more important than ease of use, and that&#8217;s the lesson that produced, for example, <a href="http://asp.net/mvc">ASP.NET MVC</a>. Also, easy ways should exists as shortcuts for flexible ones, not be orthogonal to them.</p>
<p>And while HTML may be about design, and text processing, and other things, data-* <strong>is</strong> about programming.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ashmind.com/2008/09/21/programming-is-complex-html5-data/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

