<?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; Web 2.0</title>
	<atom:link href="http://blog.ashmind.com/category/web/web-20/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>Client-side databinding with ASP.Net AJAX Futures</title>
		<link>http://blog.ashmind.com/2007/06/21/client-side-databinding-with-aspnet-ajax-futures/</link>
		<comments>http://blog.ashmind.com/2007/06/21/client-side-databinding-with-aspnet-ajax-futures/#comments</comments>
		<pubDate>Wed, 20 Jun 2007 22:29:52 +0000</pubDate>
		<dc:creator>Andrey Shchekin</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[DataBinding]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://blog.ashmind.com/index.php/2007/06/21/client-side-databinding-with-aspnet-ajax-futures/</guid>
		<description><![CDATA[Recently I got an optimization problem in ASP.Net.To be short, I had a Repeater with custom (somewhat complex) template on my Page, and I wanted to reload it asynchronously. The first solution was XP and didin&#8217;t consider performance at all: wrap Repeater inside an UpdatePanel.The problem was that the entire Page had to be repopulated [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I got an optimization problem in ASP.Net.<br />To be short, I had a Repeater with custom (somewhat complex) template on my Page, and I wanted to reload it asynchronously.</p>
<p>The first solution was XP and didin&#8217;t consider performance at all: wrap Repeater inside an UpdatePanel.<br />The problem was that the entire Page had to be repopulated on server just to get to the Repeater.</p>
<p>That gave me a choice of two headaches: </p>
<ol>
<li>Put all Page/Controls data into ViewState and bloat bandwidth.
<li>Query all additional data on the reload request and increase load on database to get data that will be thrown away. </li>
</ol>
<p>To be honest, I could solve (2) with server-side cache, but, in my opinion, caching does not make ugly solutions any better, just faster. </p>
<p>So, naturally, my thought was to query the data-only WebService and then populate the Repeater on client.</p>
<p>And it was interesting to find out that Microsoft already has a client-side data binding solution within ASP.Net AJAX Futures.<br />I have found an excellent article on this matter by Xianzhong Zhu, &#8220;Unveil the Data Binding Architecture inside Microsoft ASP.NET Ajax 1.0&#8243; (<a href="http://aspalliance.com/1301_Unveil_the_Data_Binding_Architecture_inside_Microsoft_ASPNET_Ajax_10__Part_1">Part 1</a>, <a href="http://aspalliance.com/1301_Unveil_the_Data_Binding_Architecture_inside_Microsoft_ASPNET_Ajax_10__Part_2">Part 2</a>).</p>
<p>I will now&nbsp;give a quick summary on the overall client-side binding architecture.<br />In essence it is quite similar to the smart DataSource controls of ASP.Net 2.0:<br />There is a DataSource javascript component and a ListView javascript control with html template.<br />ListView passes data from/to DataSource control, and DataSource talks with a JSON Web Service as a backend.<br />Controls and their relations&nbsp;are described in <a href="http://www.nikhilk.net/AtlasXMLScript.aspx">text/xml-script</a> (Futures-only feature).</p>
<p>Everything seems quite straightforward and easy to use, I was quite happy to find it.<br />One thing that bothers me is the performance of text/xml-script (it is parsed on client).<br />But it is a concern not related to the current story.<br />The other question is what to do when I want to databind a complex&nbsp;list (consisting of several embedded server user controls) ?<br />I am going to find it out real soon.</p>
<p>Along the way,&nbsp;I have also&nbsp;noticed&nbsp;Sys.Preview.Data also introduces DataSets/DataTables to javascript.<br />That is quite funny.&nbsp;Personally, I&nbsp;never really considered DataSets acceptable anywhere above Persistence layer.<br />But I already thought about Persistence/DataAccess concept in javascript when I saw <a href="http://gears.google.com/">Gears</a>.<br />And DataSets seem to fit &#8216;nicely&#8217; to some&nbsp;GoogleGearsDataSource (it would be quite an experience to actually see one in real code).</p>
<p>Well, javascript O/R Mapper, anyone ?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ashmind.com/2007/06/21/client-side-databinding-with-aspnet-ajax-futures/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>XHTML and microformats revisited</title>
		<link>http://blog.ashmind.com/2007/06/03/xhtml-and-microformats-revisited/</link>
		<comments>http://blog.ashmind.com/2007/06/03/xhtml-and-microformats-revisited/#comments</comments>
		<pubDate>Sat, 02 Jun 2007 21:26:25 +0000</pubDate>
		<dc:creator>Andrey Shchekin</dc:creator>
				<category><![CDATA[History]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Markup]]></category>
		<category><![CDATA[microformats]]></category>
		<category><![CDATA[Standards]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://blog.ashmind.com/index.php/2007/06/03/xhtml-and-microformats-revisited/</guid>
		<description><![CDATA[Since my previous post on microformats, I have decided that my opinion in this matter needs more evidence. While I could collect all following information before writing the post, I didn&#8217;t have enough motivation to do the research. But now, after writing it, I have my self-esteem as a motivation. Ok, so I proposed using [...]]]></description>
			<content:encoded><![CDATA[<p>Since my <a href="http://blog.ashmind.com/index.php/2007/05/22/microformats-are-web-20-virus/">previous post</a> on microformats, I have decided that my opinion in this matter needs more evidence.<br />
While I could collect all following information <em>before</em> writing the post, I didn&#8217;t have enough motivation to do the research.<br />
But now, <em>after</em> writing it, I have my self-esteem as a motivation.</p>
<p>Ok, so I proposed using (namespaced) custom tags instead of overloading existing ones.<br />
Now let&#8217;s go scientific and see what questions this solution may rise.</p>
<ol>
<li>Do modern browsers support CSS styling for unknown tags in HTML documents?</li>
<li>Can these tags be added to document without breaking standard compliance (validity)?</li>
<li>What possible problems can arise from using non-standard tags in modern browsers?</li>
<li>&#8230;</li>
</ol>
<p>For practical purposes, these can be converted into two main questions</p>
<ol>
<li><em>Should</em> custom tags work?</li>
<li><em>Do</em> custom tags work in modern browsers?</li>
</ol>
<p>And the answers are:</p>
<ol>
<li>By default, no.</li>
<li>Not perfectly, but yes.</li>
</ol>
<p>Now let&#8217;s discuss it in detail.</p>
<p>To understand the first answer is to understand what exactly is HTML, what is XML and what is XHTML.<br />
The most important (maybe obvious) point is: HTML is not a subset of XML and HTML is not compatible with XML.<br />
HTML and XML are both a subsets of SGML, and SGML does not provide a way to mix different subsets within a single document.<br />
So custom XML tags are not allowed in a HTML document.</p>
<p>While there are some solutions that allow arbitrary XML to be placed in a HTML document.<br />
For example, Microsoft has <a href="http://msdn2.microsoft.com/en-us/library/ms766512.aspx">XML Data Islands</a>.<br />
But they can be considered grammar hacks due to XML-HTML incompatibility.</p>
<p>Practically, however, HTML documents have to be viewed as &#8220;tag soup&#8221; by the browsers, so custom tags do not cause document rendering to fail.</p>
<p>So, if I am formally out of luck with HTML, what about XHTML?<br />
For simplicity, one can view XHTML is a rewrite of HTML to follow XML rules.<br />
So any custom tags should be allowed in XHTML if they are properly namespaced.</p>
<p>But there are a lot of problems with authoring XHTML.<br />
While some of them are more like challenges (script/style syntax), one is extremely important.<br />
The only way to tell modern browsers that that the document is XHTML is to serve it as application/xhtml+xml<br />
(See <a href="http://www.hixie.ch/advocacy/xhtml">this document</a> for an excellent explanation).<br />
And Internet Explorer <a href="http://blogs.msdn.com/ie/archive/2005/09/15/467901.aspx">doesn&#8217;t support XHTML</a> at all — so it refuses to render application/xhtml+xml.<br />
(It doesn&#8217;t mean IE can&#8217;t open XHTML. When XHTML document is sent as text/html, IE renders it with HTML engine).<br />
So I was out of luck once again.</p>
<p>At that point I understood the reasoning of microformats.<br />
Standard compliance is an important part of better Web, and there is no completely valid way to use custom tags.</p>
<p>But what is with the second question? It seems that actual situation is way better than one could suppose.<br />
Firefox, IE7 and Opera 9 all could render the custom tags style correctly in the document served as text/html.<br />
(To be really pedantic, I set DTD and xmlns to XHTML.<br />
After all, even if text/html documents are never parsed as XHTML, MIME Type is a server setting, not document one.)<br />
But IE7 has a one important characteristic — it does not render custom tag styles unless there is an xmlns for their namespace on html tag.<br />
No other tag is sufficient.</p>
<p>What does it mean? It means that while one can make a document that is styled correctly in these IE7,<br />
document part containing custom tags can not be reused without providing a namespace on the aggregating document.<br />
But it not an extremely important point, since for aggreagation one does not actually control styles as well.</p>
<p>So, practically speaking, one can create a document that uses custom XML tags for the cost of formal document validity.<br />
(The document can still be made formally valid by using custom DTD, but this will put IE and FF into <a href="http://www.quirksmode.org/">quirks mode</a>).</p>
<p>By the way, the challenge of adding custom tags to HTML was faced by MathML (mathematical markup language) community for years.<br />
If you are interested, you can read these discussions:</p>
<ul>
<li><a href="http://groups.google.ru/group/netscape.public.mozilla.mathml/browse_frm/thread/3c8bf8b155267234">Cannot render MathML — netscape.public.mozilla.mathml</a> (2001)</li>
<li><a href="http://groups.google.com/group/mozilla.dev.tech.mathml/browse_thread/thread/796fad03fdd4fc59/2b6952b15cd6a7d6">MathML-in-HTML5 — mozilla.dev.tech.mathml</a> (2006)</li>
</ul>
<p>Personally, I still see microformats as a step in wrong direction.<br />
While hCard provides HTML with a way to express the vCard semantics, I would prefer it to be just a HTML-compatible way, not the recommended one.<br />
I see HTML as standard that needs support, but not popularized extensions.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ashmind.com/2007/06/03/xhtml-and-microformats-revisited/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Microformats are Web 2.0 virus</title>
		<link>http://blog.ashmind.com/2007/05/22/microformats-are-web-20-virus/</link>
		<comments>http://blog.ashmind.com/2007/05/22/microformats-are-web-20-virus/#comments</comments>
		<pubDate>Mon, 21 May 2007 22:50:38 +0000</pubDate>
		<dc:creator>Andrey Shchekin</dc:creator>
				<category><![CDATA[Criticism]]></category>
		<category><![CDATA[microformats]]></category>
		<category><![CDATA[Standards]]></category>
		<category><![CDATA[Web 2.0]]></category>

		<guid isPermaLink="false">http://blog.ashmind.com/index.php/2007/05/22/microformats-are-web-20-virus/</guid>
		<description><![CDATA[I really like what is happening to Web. Cool-new-ajaxy sites are often actually more friendly, useful and powerful. Web development seem to become way less hacky. And a lot of standards that are gaining adoption are actually extremely useful (think about RSS). But there is a group of new standards that I fail to understand. [...]]]></description>
			<content:encoded><![CDATA[<p>I really like what is happening to Web.</p>
<p>Cool-new-ajaxy sites are often actually more friendly, useful and powerful.<br />
Web development seem to become way less hacky.<br />
And a lot of standards that are gaining adoption are actually extremely useful (think about RSS).</p>
<p>But there is a group of new standards that I fail to understand.<br />
They are called <a href="http://microformats.org/">microformats</a>.</p>
<p>In my understanding, there are three pillars of Ideal Web:</p>
<ol>
<li><strong>Markup</strong> provides semantics</li>
<li><strong>Styles</strong> provide presentation</li>
<li><strong>Scripts</strong> provide behavior</li>
</ol>
<p>These blocks are logical, understandable, maintanable and loosely coupled.<br />
It is worth noting that all strict DTDs are here to make the markup truly semantic and help achieve such separation.<br />
This is why I write &lt;strong&gt; instead of &lt;b&gt;.<br />
And this is what helps Web 2.0 applications to be really rich without being messy.</p>
<p>And for me, microformats are <em>viral semantics</em>.<br />
They infect markup and overload it with additional meaning, turning it into an ill, bloated mess.<br />
The microformats wiki <a href="http://microformats.org/wiki/hcard#Semantic_XHTML_Design_Principles">states</a>:</p>
<blockquote><p>Reuse the schema (names, objects, properties, values, types, hierarchies, constraints) as much as possible from pre-existing, established, well-supported standards by reference</p></blockquote>
<p>For me it seems more honest to say <em>overuse</em>, since the most interesting thing about microformats is that there are no actual problems they solve.<br />
Consider this fragment:</p>
<pre>&lt;span class="tel"&gt;&lt;span class="type"&gt;Home&lt;/span&gt; (&lt;span class="type"&gt;pref&lt;/span&gt;erred):
  &lt;span class="value"&gt;+1.415.555.1212&lt;/span&gt;
&lt;/span&gt;</pre>
<p>I would prefer:</p>
<pre>&lt;tel&gt;&lt;type&gt;Home&lt;/type&gt;(&lt;type&gt;pref&lt;/type&gt;erred):
   &lt;value&gt;+1.415.555.1212&lt;/value&gt;
&lt;/tel&gt;</pre>
<p>Now it does not seem that somebody is <em>reusing</em> iron to hammer nails.</p>
<p>It is 2007. XML is here and it <em>is</em> supported. X in XHTML stands for <em>extensible</em>.<br />
IE did not support CSS namespaces, but you could write styles like vcard\:tel for years.<br />
And this syntax does not seem like a show stopper to me.</p>
<p>Actually, upon reading on topic, I immediatelly googled for &#8220;microformats are stupid&#8221;.<br />
The first thing I found was <a href="http://www.oreillynet.com/onjava/blog/2006/07/why_i_hate_microformats.html">Why I Hate Microformats?</a> by Robert Cooper.<br />
He points to the same things I do, but he misses the fact that we had no need to wait for the IE7.</p>
<p>There is also a more interesting post <a href="http://cafe.elharo.com/xml/must-ignore-vs-microformats/">Must Ignore vs. Microformats</a> by Elliotte Rusty Harold.<br />
The one point I do not agree is that Elliotte argues that XML does not have to be valid.<br />
I do not see why the properly namespaced XML in XHTML would not be valid, but I will have to test it myself.</p>
<p>Web would be better if microformat authors read more about XHTML and did some browser tests before pushing this standard.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ashmind.com/2007/05/22/microformats-are-web-20-virus/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

