<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Dimitri Glazkov</title>
	<atom:link href="http://glazkov.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://glazkov.com</link>
	<description>Web and About</description>
	<lastBuildDate>Mon, 25 May 2009 20:46:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='glazkov.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/28811fdf9088563a7491aee1b78577fe?s=96&#038;d=http://s2.wp.com/i/buttonw-com.png</url>
		<title>Dimitri Glazkov</title>
		<link>http://glazkov.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://glazkov.com/osd.xml" title="Dimitri Glazkov" />
	<atom:link rel='hub' href='http://glazkov.com/?pushpress=hub'/>
		<item>
		<title>From HTML5 to Gibson&#8217;s Matrix?</title>
		<link>http://glazkov.com/2009/05/25/from-html5-to-the-matrix/</link>
		<comments>http://glazkov.com/2009/05/25/from-html5-to-the-matrix/#comments</comments>
		<pubDate>Mon, 25 May 2009 20:46:21 +0000</pubDate>
		<dc:creator>dglazkov</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[Rant]]></category>
		<category><![CDATA[cyberpunk]]></category>
		<category><![CDATA[cyberspace]]></category>
		<category><![CDATA[gibson]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[patience]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://glazkov.com/?p=183</guid>
		<description><![CDATA[I shouldn&#8217;t admit it, but &#8212; what the heck. I haven&#8217;t read the Sprawl Trilogy. Until this weekend. After falling prey to another round of the seasonal crud, and with the long Memorial Day weekend in sight, I dove in. The books aged extremely well. It was too easy to ignore the awkward artifacts of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=glazkov.com&blog=4127402&post=183&subd=glazkov&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>I shouldn&#8217;t admit it, but &#8212; what the heck. I haven&#8217;t read the <a href="http://en.wikipedia.org/wiki/The_Sprawl_trilogy">Sprawl Trilogy</a>. Until this weekend. After falling prey to another round of the seasonal crud, and with the long Memorial Day weekend in sight, I dove in.</p>
<p>The books aged extremely well. It was too easy to ignore the awkward artifacts of the 80&#8242;s culture and go with the smooth and intricate flow. It felt just right. Not the mind-boggling, monolithic Stephenson&#8217;s universe that pounds you with all its kilo-page might. It was gentler and more focused on the characters, rather than the surrounding gadgetry and sound reasoning behind its existence.</p>
<p>Anywho. I walked away inspired. The Sprawl was a tantalizing illusion, my brain spinning in a vertigo of subconscious attempts to fill in the missing engineering details. But in riding this high, I also felt disappointment. It&#8217;s 2009, for crying outloud. Where are the AIs? I mean those that can reasonably fool a Turing test? Where are the consoles that connect you directly to the full sensory representation of the Internet? And hovercrafts?! I want my frickin hovercrafts!</p>
<p>How is it that we are still tinkering with a 10-year old hypertext format, asymptotically trying to make it work right on our respective rendering engines, bolting new steel plates on the old wooden boat as it creaks, sinking further under the weight of our add-ons? How come there&#8217;s a whole echelon of computer industry burning midnight oil congealing bits of CSS, HTML, and JS into the scary, scary nonsensical frankensteins that we call Web sites? And how come it is so hard to build and grow these sites &#8212; not to mention use them?</p>
<p>Where have we gone wrong? Perhaps it was the naive notion that HTML wasn&#8217;t just an accidental leader of the rising wave, that it was somehow special, because it was just like text and thus &#8220;easy of use?&#8221; I shudder even typing these three words. Or was it the idea that the Web is what it is and shouldn&#8217;t break it? Or maybe it was us, proclaiming that content is king and that the vehicle didn&#8217;t matter? We&#8217;ve become content with what we&#8217;ve got. Even <a href="http://en.wikipedia.org/wiki/Silverlight">new aspirations</a>, however alien, look suspiciously like the same old stuff.</p>
<p>But yes, we are where we are. Otherwise, we wouldn&#8217;t be anywhere. Right? Riiight. We have this spec, called <a href="http://www.w3.org/TR/html5/">HTML5</a> and we&#8217;re trying to make it work. It&#8217;s better than what we have today, and it is a step forward. But on the big scheme of things &#8212; is this what we need? Small, painful incremental steps on the burning coals of the Web as we know it? Is this taking us somewhere? And if it is, are we there yet?</p>
<p>Are we there yet?</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/glazkov.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/glazkov.wordpress.com/183/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/glazkov.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/glazkov.wordpress.com/183/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/glazkov.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/glazkov.wordpress.com/183/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/glazkov.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/glazkov.wordpress.com/183/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/glazkov.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/glazkov.wordpress.com/183/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/glazkov.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/glazkov.wordpress.com/183/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/glazkov.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/glazkov.wordpress.com/183/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=glazkov.com&blog=4127402&post=183&subd=glazkov&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://glazkov.com/2009/05/25/from-html5-to-the-matrix/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d561e3aa24ea8e6878e99cd108429329?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dglazkov</media:title>
		</media:content>
	</item>
		<item>
		<title>Lucky Chrome</title>
		<link>http://glazkov.com/2008/09/03/lucky-chrome/</link>
		<comments>http://glazkov.com/2008/09/03/lucky-chrome/#comments</comments>
		<pubDate>Wed, 03 Sep 2008 16:19:45 +0000</pubDate>
		<dc:creator>dglazkov</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[california]]></category>
		<category><![CDATA[chrome]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[green card]]></category>

		<guid isPermaLink="false">http://glazkov.wordpress.com/?p=177</guid>
		<description><![CDATA[How can you explain this sheer amount of luck? Are there any special terms for it? I have no clue. To illustrate &#8212; this year, yours truly: After long 14 years finally got his green card Moved to California Landed a job at Google &#8230; on the Google Chrome team! As my good friend put [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=glazkov.com&blog=4127402&post=177&subd=glazkov&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>How can you explain this sheer amount of luck? Are there any special terms for it? I have no clue.</p>
<p>To illustrate &#8212; this year, yours truly:</p>
<ul>
<li>After long 14 years finally got his green card</li>
<li>Moved to California</li>
<li>Landed a job at Google</li>
<li>&#8230; on the <a href="http://google.com/chrome">Google Chrome</a> team!</li>
</ul>
<div>As my good friend put it: &#8220;Wear your seatbealt. You have used up all of your luck&#8221;.</div>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/glazkov.wordpress.com/177/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/glazkov.wordpress.com/177/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/glazkov.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/glazkov.wordpress.com/177/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/glazkov.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/glazkov.wordpress.com/177/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/glazkov.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/glazkov.wordpress.com/177/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/glazkov.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/glazkov.wordpress.com/177/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/glazkov.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/glazkov.wordpress.com/177/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/glazkov.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/glazkov.wordpress.com/177/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/glazkov.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/glazkov.wordpress.com/177/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=glazkov.com&blog=4127402&post=177&subd=glazkov&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://glazkov.com/2008/09/03/lucky-chrome/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d561e3aa24ea8e6878e99cd108429329?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dglazkov</media:title>
		</media:content>
	</item>
		<item>
		<title>Information Architecture Presentation at IPSA</title>
		<link>http://glazkov.com/2008/07/11/information-architecture-presentation-at-ipsa/</link>
		<comments>http://glazkov.com/2008/07/11/information-architecture-presentation-at-ipsa/#comments</comments>
		<pubDate>Fri, 11 Jul 2008 22:03:48 +0000</pubDate>
		<dc:creator>dglazkov</dc:creator>
				<category><![CDATA[User Interaction]]></category>
		<category><![CDATA[alabama]]></category>
		<category><![CDATA[birmingham]]></category>
		<category><![CDATA[information architecture]]></category>
		<category><![CDATA[ipsa]]></category>
		<category><![CDATA[ux]]></category>

		<guid isPermaLink="false">http://glazkov.wordpress.com/?p=172</guid>
		<description><![CDATA[Today, I gave a small presentation on a large topic, &#8220;Information Architecture on a Large Scale&#8221; at IPSA (that&#8217;s Information Professionals Society of Alabama). Here are the slides: And here are the notes: Notes for &#8220;Information Architecture on a Large Scale&#8221; Thank you guys for the warm reception! And if you have anything to add, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=glazkov.com&blog=4127402&post=172&subd=glazkov&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>Today, I gave a small presentation on a large topic, &#8220;Information Architecture on a Large Scale&#8221; at <a href="http://ipsaonline.org/">IPSA</a> (that&#8217;s Information Professionals Society of Alabama). Here are the slides:</p>
<p><object type='application/x-shockwave-flash' wmode='opaque' data='http://static.slideshare.net/swf/ssplayer2.swf?id=509844&#038;doc=information-architecture-on-a-large-scale-1215812290572025-8' width='425' height='348'><param name='movie' value='http://static.slideshare.net/swf/ssplayer2.swf?id=509844&#038;doc=information-architecture-on-a-large-scale-1215812290572025-8' /><param name='allowFullScreen' value='true' /><param name='allowScriptAccess' value='always' /></object></p>
<p>And here are the notes:</p>
<ul>
<li><a href="http://docs.google.com/Doc?id=ajcrcqm6wdtk_24hrg74mdg">Notes for &#8220;Information Architecture on a Large Scale&#8221;</a></li>
</ul>
<p>Thank you guys for the warm reception! And if you have anything to add, comment, or critique, please leave a comment or two.</p>
<p>Update: here is a video, courtesy of the fearless <a href="http://britmansell.com/">Brit Mansell</a>:</p>
<ul>
<li><a href="http://www.vimeo.com/1337194">Information Architecture on a Large Scale (Video)</a></li>
</ul>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/glazkov.wordpress.com/172/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/glazkov.wordpress.com/172/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/glazkov.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/glazkov.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/glazkov.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/glazkov.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/glazkov.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/glazkov.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/glazkov.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/glazkov.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/glazkov.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/glazkov.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/glazkov.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/glazkov.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/glazkov.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/glazkov.wordpress.com/172/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=glazkov.com&blog=4127402&post=172&subd=glazkov&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://glazkov.com/2008/07/11/information-architecture-presentation-at-ipsa/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d561e3aa24ea8e6878e99cd108429329?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dglazkov</media:title>
		</media:content>
	</item>
		<item>
		<title>Thank You, Birmingham</title>
		<link>http://glazkov.com/2008/07/06/thank-you-birmingham/</link>
		<comments>http://glazkov.com/2008/07/06/thank-you-birmingham/#comments</comments>
		<pubDate>Sun, 06 Jul 2008 20:13:50 +0000</pubDate>
		<dc:creator>dglazkov</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[bhm]]></category>
		<category><![CDATA[birmingham]]></category>
		<category><![CDATA[california]]></category>
		<category><![CDATA[glazkov]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[mountainview]]></category>

		<guid isPermaLink="false">http://glazkov.com/?p=171</guid>
		<description><![CDATA[It&#8217;s been a long time. I remember driving down I-59 for the first time and suddenly seeing you, lit up, silent and magical in the damp summer heat of 1995. I remember the shock of first encountering the true Southern talk at a McDonald&#8217;s drive-through and not being able to comprehend a word — or [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=glazkov.com&blog=4127402&post=171&subd=glazkov&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a long time. I remember driving down I-59 for the first time and suddenly seeing you, lit up, silent and magical in the damp summer heat of 1995. I remember the shock of first encountering the true Southern talk at a McDonald&#8217;s drive-through and not being able to comprehend a word — or even make out a syllable. This was a whole different world. This was a whole different time.</p>
<p>Over the next 13 years, I learned lots of things. I learned that driving expensive German cars is not at all what I really want from my life. As a side effect, I learned how to get in debt up to my eyeballs and how to get out of it. I learned that parents will love you no matter what and that their hearts will bleed as they watch you making the stupidest mistakes on your path to comprehension of life.</p>
<p>I also learned that you can&#8217;t &#8220;fix&#8221; people or change them to your liking, no matter how hard you try. I learned that things will happen in most unpredictable ways and a beam of light would shine in the darkest of the night to reveal a new path. I learned what it means to be a family man and exactly how little sleep young fathers and mothers need to keep going.</p>
<p>Along the way, you were there for me. You cheered for my successes. You helped me deal with failures and consequences of poor choices. You taught me about serendipity, resilience, dedication and faith. And most of all, you taught me what it means to truly love someone.</p>
<p>You opened my eyes to the complexity and depth of the racial and cultural divide of this world and gave me hope that this divide can be overcome, even if one person at a time.</p>
<p>Thank you, Birmingham. Thanks for my friends, the opportunities, and the impeccable Southern hospitality. Thank you for your wisdom and willingness to embrace this quirky Russian.</p>
<p>On August 1, we part ways. True to your old-fashioned ways, you stay where you are. But a little part of you will move on with me and my family. Mountain View, here we come. Looking forward to meeting y&#8217;all out in California.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/glazkov.wordpress.com/171/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/glazkov.wordpress.com/171/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/glazkov.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/glazkov.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/glazkov.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/glazkov.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/glazkov.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/glazkov.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/glazkov.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/glazkov.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/glazkov.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/glazkov.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/glazkov.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/glazkov.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/glazkov.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/glazkov.wordpress.com/171/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=glazkov.com&blog=4127402&post=171&subd=glazkov&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://glazkov.com/2008/07/06/thank-you-birmingham/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d561e3aa24ea8e6878e99cd108429329?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dglazkov</media:title>
		</media:content>
	</item>
		<item>
		<title>Wrap Your Head Around Gears Workers</title>
		<link>http://glazkov.com/2008/06/02/gears-workers/</link>
		<comments>http://glazkov.com/2008/06/02/gears-workers/#comments</comments>
		<pubDate>Tue, 03 Jun 2008 00:38:00 +0000</pubDate>
		<dc:creator>dglazkov</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://glazkov.com/blog/gears-workers/</guid>
		<description><![CDATA[Google I/O was a continuous, three-thousand-person mind meld, so I talked and listened to a lot of people last week. And more often than not I discovered that Gears is still mostly perceived as some wand that you can somehow wave to make things go offline. Nobody is quite sure knows how, but everyone is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=glazkov.com&blog=4127402&post=161&subd=glazkov&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>
Google I/O was a continuous, three-thousand-person mind meld, so I talked and listened to a lot of people last week. And more often than not I discovered that Gears is still mostly perceived as some wand that you can somehow wave to make things go offline. Nobody is quite sure knows how, but everyone is quite sure it&#8217;s magic.
</p>
<p>
It takes a bit of time to accept that Gears is not a bottled offlinifier for sites. It takes even more time to accept that it&#8217;s not even an end-user tool, or something that just shims between the browser and the server and somehow saves you from needing to rethink how you approach the Web to take it offline. That the primitives, offered by Gears, are an enabling technology that gives you the capability to make completely new things happen on the Web, and it is your, developer&#8217;s task to apply it to solve problems, specific to your Web application.
</p>
<p>
And it&#8217;s probably the hardest to accept that there is no one-size-fits-all solution to the problem of taking your application offline. Not just because the solution may vary depending on what your Web application does, but also because the actual definition of the problem may change from site to site. And pretty much any way you slice it, the offline problem is um, hard.
</p>
<p>
It&#8217;s not surprising then that all this thinking often leaves behind a pretty cool capability of Gears: the workers. Honestly, workers and worker pools are like the middle child of Gears. Everybody kind of knows about them, but they&#8217;re prone to be left behind in an airport during a family vacation. Seems a bit unfair, doesn&#8217;t it?
</p>
<p>
I missed the chance to see <span class="vcard"><span class="fn">Steven Saviano</span></span>&#8216;s presentation on Google Docs, but during a hallway conversation, it appears that we share <a href="http://glazkov.com/blog/gearhead/">similar thoughts</a> about Gears workers: it&#8217;s all about how you view them. The workers are not only for crunching heavy math in a separate thread, though that certainly is a good idea. The workers are also about boundaries and crossing them. With the cross-origin workers and the ability to make HTTP requests, it takes only a few mental steps to arrive at a much more useful pattern: the proxy worker.
</p>
<p>
Consider a simple scenario: your JavaScript application wants to consume content from another server (the vendor). The options are fairly limited at the moment &#8212; you either need a server-side proxy or use JSON(P). Neither solution is particularly neat, because the former puts undue burden on your server and the latter requires complete trust of another party.
</p>
<p>
Both approaches are frequently used today and mitigated by combinations of raw power or vendor&#8217;s karma. The upcoming <a href="http://www.w3.org/TR/access-control/">cross-site XMLHttpRequest</a> and its evil twin <a href="http://msdn.microsoft.com/en-us/library/cc288060%28VS.85%29.aspx">XDR</a> will address this problem at the root, but neither is yet available in a released product. Even then, you are still responsible for parsing the content. Somewhere along the way, you are very likely to write some semblance of a bridge that translates HTTP requests and responses into methods and callbacks, digestible by your Web application.
</p>
<p>
This is where you, armed with the knowledge of the Gears API, should go: A-ha! Wouldn&#8217;t it be great if the vendor had a representative, who spoke JavaScript? We might just have a special sandbox for this fella, where it could respond to our requests, query the vendor, and pass messages back in. Yes, I am talking about a cross-origin worker that acts as a <em>proxy</em> between your Web application and the vendor.
</p>
<p>
As Steven points out at his talk (look for the sessions on YouTube soon &#8212; I saw cameras), another way to think of this relationship is the <a href="http://en.wikipedia.org/wiki/Remote_procedure_call"><acronym title="Remote">RPC</acronym></a> model: the application and the vendor worker exchange messages that include procedure name, body, and perhaps even version and authentication information, if necessary.
</p>
<p>
Let&#8217;s imagine how it&#8217;ll work. The application sets up a message listener, loads the vendor worker, and sends out the welcome message (pretty much along the lines of the <a href="http://code.google.com/apis/gears/api_workerpool.html#example">WorkerPool API Example</a>):
</p>
<pre>
// application.js:
var workerPool = google.gears.factory.create('beta.workerpool');
var vendorWorkerId;
// true when vendor and client both acknowledged each other
var engaged;
// set up application listener
workerPool.onmessage = function(a, b, message) {
&nbsp;&nbsp;if (!message.sender != vendorWorkerId) {
&nbsp;&nbsp;&nbsp;&nbsp;// not vendor, pass
&nbsp;&nbsp;&nbsp;&nbsp;return;
&nbsp;&nbsp;}
&nbsp;&nbsp;if (!engaged) {
&nbsp;&nbsp;&nbsp;&nbsp;if (message.text == 'READY') {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;engaged = true;
&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;&nbsp;&nbsp;return;
&nbsp;&nbsp;}
&nbsp;&nbsp;processResponse(message);
}
vendorWorkerId = workerPool.createWorkerFromUrl(
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'http://vendorsite.com/workers/vendor-api.js');
workerPool.sendMessage('WELCOME', vendorWorkerId);
</pre>
<p>
As the vendor worker loads, it sets up its own listener, keeping an ear out for the WELCOME message, which is its way to hook up with the main worker:
</p>
<pre>
// vendor-api.js:
var workerPool = google.gears.workerPool;
// allow being used across origin
workerPool.allowCrossOrigin();
var clientWorkerId;
// true when vendor and client acknowledged each other
var engaged;
// set up vendor listener
workerPool.onmessage = function(a, b, message) {
&nbsp;&nbsp;if (!engaged) {
&nbsp;&nbsp;&nbsp;&nbsp;if (message.text == 'WELCOME') {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// handshake! now both parties know each other
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;clientWorkerId = message.sender;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;workerPool.sendMessage('READY', clientWorkerId);
&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;&nbsp;&nbsp;return;
&nbsp;&nbsp;}
&nbsp;&nbsp;// listen for requests
&nbsp;&nbsp;processRequest(message);
}
</pre>
<p>
As an aside, the vendor can also look at <code>message.origin</code> as an additional client validation measure, from simple are you on my subdomain checks to full-blown OAuth-style authorization schemes.
</p>
<p>
Once both application and the vendor worker acknowledge each other&#8217;s presence, the application can send request messages to the vendor worker and listen to responses. The vendor worker in turn listens to requests, communicates with the vendor server and sends the responses back to the server. Instead of being rooted in HTTP, the API now becomes a worker message exchange protocol. In which case the respective processing functions, <code>processRequest</code> and <code>processResponse</code> would be responsible for handling the interaction (caution, freehand pseudocoding here and elsewhere):
</p>
<pre>
// vendor-api.js
function processRequest(message) {
&nbsp;&nbsp;var o = toJson(message); // play safe here, ok?
&nbsp;&nbsp;if (!o || !o.command) {
&nbsp;&nbsp;&nbsp;&nbsp;// malformed message
&nbsp;&nbsp;&nbsp;&nbsp;return;
&nbsp;&nbsp;}
&nbsp;&nbsp;switch(o.command)
&nbsp;&nbsp;&nbsp;&nbsp;case 'public': // fetch all public entries
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// make a request to server, which fires specified callback on completion
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;askServer('/api/feed/public', function(xhr) {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var responseMessage = createResponseMessage('public', xhr);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// send response back to the application
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;workerPool.sendMessage(responseMessage, clientWorkerId);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;
&nbsp;&nbsp;&nbsp;&nbsp;// TODO: add more commands
&nbsp;&nbsp;}
}

// application.js
function processResponse(message) {
&nbsp;&nbsp;var o = toJson(message);
&nbsp;&nbsp;if (!o || !o.command) {
&nbsp;&nbsp;&nbsp;&nbsp;// malformed message
&nbsp;&nbsp;&nbsp;&nbsp;return;
&nbsp;&nbsp;}
&nbsp;&nbsp;switch(o.command) {
&nbsp;&nbsp;&nbsp;&nbsp;case 'public': // public entries received
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;renderEntries(o.entries);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;
&nbsp;&nbsp;&nbsp;&nbsp;// TODO: add more commands
&nbsp;&nbsp;}
}
</pre>
<p>
You could also wrap this into a more formal abstraction, such as the <a href="http://code.google.com/p/glazkov-attic/source/browse/trunk/html5-sql-player/scripts/worker/pipe.js">Pipe object</a> that I developed for one of my Gears adventures.
</p>
<p>
Now the vendor goes, whoa! <em>I have Gears.</em> I don&#8217;t have to rely on dumb HTTP requests/responses. I can save a lot of bandwidth and speed things up by storing most current content in a local database, and only query for changes. And the fact that this worker continues to reside on my server allows me to continue improving it and offer new features, as long as the message exchange protocol remains compatible.
</p>
<p>
And so you and the vendor live happily ever after. But this is not the only happy ending to this story. In fact, you don&#8217;t even have to go to another server to employ the proxy model. The advantage of keeping your own server&#8217;s communication and synchronization plumbing in a worker is pretty evident once you realize that it doesn&#8217;t ever block UI and provides natural decoupling between what you&#8217;d consider the <a href="http://en.wikipedia.org/wiki/Model-view-controller">Model</a> part of your application. You could have your application go offline and never realize it, because the proxy worker could handle both monitoring of the connection state and seamless switching between local storage and server data.
</p>
<p>
Well, this post is getting pretty long, and I am no <span class="vcard"><a class="url" href="http://steve-yegge.blogspot.com/">Steve Yegge</a></span>. Though there are still plenty of problems to solve (like gracefully degrading this proxy model to a non-Gears environment), I hope my rambling gave you some new ideas on how to employ the worker goodness in your applications and gave you enough excitement to at least give <a href="http://code.google.com/apis/gears/">Gears</a> a try.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/glazkov.wordpress.com/161/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/glazkov.wordpress.com/161/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/glazkov.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/glazkov.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/glazkov.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/glazkov.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/glazkov.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/glazkov.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/glazkov.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/glazkov.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/glazkov.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/glazkov.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/glazkov.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/glazkov.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/glazkov.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/glazkov.wordpress.com/161/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=glazkov.com&blog=4127402&post=161&subd=glazkov&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://glazkov.com/2008/06/02/gears-workers/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d561e3aa24ea8e6878e99cd108429329?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dglazkov</media:title>
		</media:content>
	</item>
		<item>
		<title>.NET on Gears: A Tutorial</title>
		<link>http://glazkov.com/2008/01/31/gears-asp-net-tutorial/</link>
		<comments>http://glazkov.com/2008/01/31/gears-asp-net-tutorial/#comments</comments>
		<pubDate>Fri, 01 Feb 2008 02:30:00 +0000</pubDate>
		<dc:creator>dglazkov</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://glazkov.com/blog/gears-asp-net-tutorial/</guid>
		<description><![CDATA[The google-gears group gets a lot of questions from .NET developers. So I decided to help out. In this tutorial, we will build a simple ASP.NET timesheet entry application (because, you know, everybody loooves timesheet entry). Then, we&#8217;ll bolt on Google Gears to eliminate any excuses for not entering timesheets. Say, you&#8217;re sitting 15,000 feet [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=glazkov.com&blog=4127402&post=119&subd=glazkov&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>The <a title="google-gears" href="http://groups.google.com/group/google-gears">google-gears group</a> gets a lot of questions from .NET developers. So I decided to help out.  In this tutorial, we will build a simple ASP.NET timesheet entry application (because, you know, everybody loooves timesheet entry). Then, we&#8217;ll bolt on <a title="Google" href="http://code.google.com/apis/gears/">Google Gears</a> to eliminate any excuses for not entering timesheets. Say, you&#8217;re sitting 15,000 feet above ground in cushy herd-class accommodations, with your laptop cracked about 60 degrees, keyboard pressed firmly against your chest, praying that the guy in front of you doesn&#8217;t recline.  This is the point where Google Gears comes to save you from yet another round of Minesweeper. You fire up your browser, point it to your corporate Intranet&#8217;s timesheet entry page and — boom! — it comes right up. You enter the data, click submit and — boom! — the page takes it, prompting your aisle-mate to restart the search for the Ethernet socket in and around his tiny personal space.  And after you cough up 10 bucks for the internet access at the swanky motel later that night, your browser re-syncs the timesheets, uploading the data entered offline to the server. Now, that&#8217;s what I call impressive. You can read more about features and benefits of Gears on <a title="Google" href="http://code.google.com/apis/gears/">their site</a> later. Right now, we have work to do (if you&#8217;d like, you can <a title="Source" href="http://glazkov-attic.googlecode.com/files/YourTimesheets-complete.zip">download</a> the entire project and follow along).</p>
<h2>Step 1: Create ASP.NET Application</h2>
<p>First, we start with the ASP.NET part of the application, which is largely drag-n-drop:</p>
<ul>
<li>Create new database, named YourTimesheets.</li>
<li>In this database, create a table Entries, with the following fields (you can also run <a title="Sql" href="http://glazkov-attic.googlecode.com/svn/trunk/YourTimesheets/Sql/">this script</a>):
<ul>
<li><var>ID</var> <kbd>int</kbd>, this will also be our identity field</li>
<li><var>StartDateTime</var> <kbd>datetime</kbd></li>
<li><var>DurationsMin</var> <kbd>int</kbd></li>
<li><var>Project</var> <kbd>nvarchar(100)</kbd></li>
<li><var>Billable</var> <kbd>bit</kbd></li>
<li><var>Comment</var> <kbd>ntext</kbd></li>
</ul>
</li>
<li>In Visual Studio 2005, create an ASP.NET project, also named YourTimesheets.</li>
<li>In design mode, drag SqlDataSource from Toolbox bar onto the <kbd>Default.aspx</kbd> file.</li>
<li> Specify the connection string using <var>SqlDataSource</var> designer, pointing to the newly created database (<a title="Create" href="http://picasaweb.google.com/dimitri.glazkov/NETOnGearsATutorial/photo#5161251416439115730">figure 1</a>). Save the connection string in <kbd>Web.config</kbd> (<a title="Save" href="http://picasaweb.google.com/dimitri.glazkov/NETOnGearsATutorial/photo#5161251429324017634">figure 2</a>).</li>
<li> Then, drag <var>GridView</var> onto the same design surface and connect it to the data source (<a title="Add" href="http://picasaweb.google.com/dimitri.glazkov/NETOnGearsATutorial/photo#5161251442208919538">figure 3</a> and <a title="Connect" href="http://picasaweb.google.com/dimitri.glazkov/NETOnGearsATutorial/photo#5161251450798854146">figure 4</a>).</li>
<li> Now, the input form. I added mine by hand, by you can use the same drag from Toolbox technique to get yours (<a title="Add" href="http://picasaweb.google.com/dimitri.glazkov/NETOnGearsATutorial/photo#5161251661252251682">figure 5</a>).</li>
<li> Hook up the form fields and <var>SqlDataSource</var> <var>INSERT</var> query (<a title="Bind" href="http://picasaweb.google.com/dimitri.glazkov/NETOnGearsATutorial/photo#5161251669842186290">figure 6</a>). You don&#8217;t have to do anything but point and click here.</li>
<li> Finally, go to the <kbd>Default.aspx.cs</kbd> code-behind file and make sure that the Postback saves form data by typing (gasp!) a C# statement (<a title="Default.aspx.cs" href="http://code.google.com/p/glazkov-attic/source/browse/trunk/YourTimesheets/Default.aspx.cs">listing 1</a>). Notice that I also added a self-redirect there to make sure that the page is always rendered as a result of a <kbd>GET</kbd> request. This may seem odd to you, but how many times did you hit Refresh on your browser and saw the woo wee! let&#8217;s repost the data you just entered, again! message? This one-liner prevents that situation.</li>
<li> At this point, you have a fully functional ASP.NET timesheet entry application, but let&#8217;s go ahead and add some styling to it (<a title="Add" href="http://picasaweb.google.com/dimitri.glazkov/NETOnGearsATutorial/photo#5161251682727088194">figure 7</a> and <a title="Default.aspx" href="http://code.google.com/p/glazkov-attic/source/browse/trunk/YourTimesheets/Default.aspx.cs">listing 2</a>).</li>
</ul>
<p>It is probably worth mentioning that no amount of styling will fix some obvious usability problems with the data entry in this particular piece of user interface, but hey, I didn&#8217;t call this article ASP.NET on Gears: A Production-ready Application, right?</p>
<h2>Step 2: Develop Gears Application Concept</h2>
<p>Moving on to Gears stuff. This part of the show contains graphic hand-coding and conceptual thinking that may not be appropriate for those who build their stuff using the Toolbox bar and Design View. People who are allergic to Javascript should ask their doctor before taking this product. Just kidding! You&#8217;ll love it, you&#8217;ll see &#8230; I think.  For this tutorial, I chose to use the <a title="Build" href="http://code.google.com/p/google-gears/downloads/list">0.2.2.0 build</a> of Gears, which is not yet a production build, but from what I heard will be shortly. This build offers a quite a bit more functionality for workers, such as <a title="HttpRequest" href="http://code.google.com/apis/gears/upcoming/api_httprequest.html">HttpRequest</a> and <a title="Timer" href="http://code.google.com/apis/gears/upcoming/api_timer.html">Timer</a> modules, and as you&#8217;ll see shortly, we&#8217;ll need them in this application.  Let&#8217;s first figure out how this thing will work. When connected (online), the application should behave as if Gears weren&#8217;t bolted on: entry submissions go directly to the server. Once the connection is severed (application goes offline), we can use <a title="LocalServer" href="http://code.google.com/apis/gears/upcoming/api_localserver.html">LocalServer</a> to serve application resources so that the page still comes up.  Obviously, at this point we should intercept form submission to prevent the application from performing a <kbd>POST</kbd> request (those are always passed through the LocalServer). As we intercept the submission, we put the submitted data into a <a title="Database" href="http://code.google.com/apis/gears/upcoming/api_database.html">Database</a> table.  Then, when back online, we replay the submissions back to the server asynchronously, using <a title="WorkerPool" href="http://code.google.com/apis/gears/upcoming/api_workerpool.html">WorkerPool</a> and <a title="HttpRequest" href="http://code.google.com/apis/gears/upcoming/api_httprequest.html">HttpRequest</a>, reading from the <a title="Database" href="http://code.google.com/apis/gears/upcoming/api_database.html">Database</a> table.  Speaking of back online, we&#8217;ll need some way to detect the state of the application. We&#8217;ll do this by setting up a <a title="WorkerPool" href="http://code.google.com/apis/gears/upcoming/api_workerpool.html">WorkerPool</a> worker, making periodic <a title="HttpRequest" href="http://code.google.com/apis/gears/upcoming/api_httprequest.html">HttpRequest</a> calls to a URL that&#8217;s not registered with the <a title="LocalServer" href="http://code.google.com/apis/gears/upcoming/api_localserver.html">LocalServer</a>. When request fails, we deem the state to be offline. When request succeeds, we presume that things are online. Simple enough?  To keep our dear user aware of what&#8217;s going on, we&#8217;ll need to do quite a bit of DOM manipulation. No, not that <a title="Dom" href="http://en.wikipedia.org/wiki/Dom_Pérignon_(wine)">Dom</a>. This <a title="W3C" href="http://www.w3.org/DOM/">DOM</a>. For instance, the data, entered offline should be displayed for the user in a separate, clearly labeled table. We will also need to know of events like the user attempting to submit the form, so that we could intercept the submission and stuff it into Database.  Oh, and there&#8217;s one more thing. Since we build this application to operate both offline and online, we can&#8217;t rely on server-based validation. For this task, I chose to write my own client-side validation, but you can try and tinker with the <a title="Validation" href="http://msdn2.microsoft.com/en-us/library/debza5t0.aspx">standard ASP.NET 2.0 validation controls</a> and the crud they inject in your document.  To summarize, we need the following components (let&#8217;s go ahead and name them, because naming things is fun):</p>
<ul>
<li> Database, to write and read entries, entered offline.</li>
<li> DOM, to intercept submits, changes of input values, writing offline entries table, and other things that involve, well, DOM manipulation.</li>
<li> Monitor, to poll server and detect when the application becomes offline and online.</li>
<li> Store, to keep track of the resources that will be handled by LocalServer when application is offline.</li>
<li> Sync, to relay submitted offline data back to the server.</li>
<li> Validator, to ensure that the field data is valid before it&#8217;s submitted, whether online or offline.</li>
</ul>
<h2>Step 3: Define Interfaces</h2>
<p>Piece of cake! The only thing left is writing some code. Perhaps we should start with defining how these pieces of the puzzle will interact. To keep code digestible and easy to hack on (it&#8217;s a tutorial, right?), we will make sure that these interactions are clearly defined. To do that, let&#8217;s agree on a couple of rules:</p>
<ul>
<li> Each component exposes a consistent way to interact with it</li>
<li> A component may not call another component directly</li>
</ul>
<p>It&#8217;s like an old breadboard from your science club tinkering days: each component is embedded into a block of non-conductive resin, with only inputs and outputs exposed. You plug the components into a breadboard and build the product by wiring those inputs and outputs (<a title="Breadboard" href="http://picasaweb.google.com/dimitri.glazkov/NETOnGearsATutorial/photo#5161251648367349778">figure 8</a>).  In our case, since our components are Javascript objects, we&#8217;ll define an input as any Javascript object member, and an output as an <em>onsomethinghappened</em> handler, typical for <a title="Level" href="http://www.quirksmode.org/js/dom0.html">DOM0</a> interfaces. And here we go, starting with the <var>Database</var> object, in the order of the alphabet:</p>
<pre><code>
// encapsulates working with Gears Database module
// model
function Database() {

    // removes all entries from the model
    this.clear = function() {}

    // opens and initializes the model
    // returns : Boolean, true if successful, false otherwise
    this.open = function() {}

    // reads entries and writes them into the supplied writer object
    // the writer object must have three methods:
    // open() -- called before reading begins
    // write(r, i, nextCallback) -- write entry, where:
    // r : Array of entry fields
    // i : Number current entry index (0-based)
    // nextCallback : callback function, which must be called
    // after the entry is written
    // close() -- called after reading has completed
    this.readEntries = function(writer) {}

    // writes new entry
    // params : Array of entry fields (StartDateTime, DurationMins,
    // Project, Billable, Comment, FormData)
    this.writeEntry = function(params) {}
}
</code></pre>
<p>It&#8217;s worth noting that the <var>readEntries</var> method mimics the archetypical <a title="TextWriter" href="http://msdn2.microsoft.com/en-us/library/system.io.textwriter.aspx">Writer</a> and <a title="Managed" href="http://msdn2.microsoft.com/en-us/library/0ka9477y.aspx">asynchronous call</a> patterns from the .NET framework. I hope you&#8217;ll think of them as the familiar faces in this crowd.  The <var>DOM</var> component has the most ins and outs, primarily because, well, we do a lot of things with the browser DOM:</p>
<pre><code>
// encapsulates DOM manipulation and events
// view
function DOM() {

    // called when the browser DOM is ready to be worked with
    this.onready = function() {}

    // called when one of the inputs changes. Sends as parameters:
    // type : String, type of the input
    // value : String, value of the input
    this.oninputchange = function(type, value) {}

    // called when the form is submitted.
    // if it returns Boolean : false, the submission is cancelled
    // submission proceeds, otherwise
    this.onsubmit = function() {}

    // hooks up DOM event handlers
    this.init = function() {}

    // loads (or reloads) entries, entered offline by creating
    // and populating a table just above the regular timesheets table
    // has the same signature as the writer parameter of the
    // Database.readEntries(writer)... because that's what it's being
    // used by
    this.offlineTableWriter = {
    open: function() {},
    write: function(r, i, nextCallback) {},
    close: function() {}
    }

    // provides capability to show an error or info message. Takes:
    // type : String, either 'error' or 'info' to indicate the type of
    // the message
    // text : String, text of the message message
    this.indicate = function(type, text) {}

    // grabs relevant input values from the form inputs
    // returns : Array of parameters, coincidentally in exactly the
    // format that Database.writeEntry needs
    this.collectFieldValues = function() {}

    // returns : String, URL that is set in of the form action attribute
    this.getPostbackUrl = function() {}

    // removes a row from the offline table. Takes:
    // id : String, id of the entry
    this.removeRow = function(id) {}

    // remove the entire offline table
    this.removeOfflineTable = function() {}

    // enable or disable submit. Takes:
    // enable : Boolean, true to enable submit button, false to disable
    this.setSubmitEnabled = function(enable) {}

    // iterate through fields and initialize field values, according to type
    // Takes:
    // action : Function, which is given:
    // type : String, the type of the input
    // and expected to return : String, a good initial value
    this.initFields = function(action) {}
}
</code></pre>
<p><var>Monitor</var> has a rather simple interface: start me and I&#8217;ll tell you when the connection changes:</p>
<pre><code>
// provides connection monitoring
// controller
function Monitor() {

    // triggered when connection changes
    // sends as parameter:
    // online : Boolean, true if connection became available,
    // false if connection is broken
    this.onconnectionchange = function(online) {};

    // starts the monitoring
    this.start = function() {}
}
</code></pre>
<p>Is this a simplicity competition? Because then <var>Store</var> takes the prize:</p>
<pre><code>
// encapsulates dealing with LocalServer
// model
function Store() {

    // opens store and captures application assets if not captured already
    // returns : Boolean, true if LocalServer and ResourceStore
    // instance are successfully created, false otherwise

    this.open = function() {}
    // forces refresh of the ResourceStore
    this.refresh = function() {}
}
</code></pre>
<p>Synchronization algorithm in this tutorial is exceedingly simple, we basically just start it and wait for it to complete. As each entry is uploaded, the Sync component reports it, so that we could adjust our presentation accordingly:</p>
<pre><code>
// synchronizes (in a very primitive way) any entries collected offline
// with the database on the server by replaying form submissions
function Sync() {

    // called when a synchronization error has occured. Sends:
    // message : String, the message of the error
    this.onerror = function(message) {}

    // called when the synchronization is complete.
    this.oncomplete = function() {}

    // called when an entry was uploaded to the server. Sends:
    // id : String, the rowid of the entry
    this.onentryuploaded = function(id) {}

    // starts synchronization. Takes:
    // url : String, the url to which to replay POST requests
    this.start = function(url) {}
}
</code></pre>
<p>Finally, the <var>Validator</var>. It&#8217;s responsible both for providing good initial values for the form, as well as making sure the user is entering something legible.</p>
<pre><code>
// encapsulates validation of values by type
function Validator() {

    // provides good initial value, given a type. Takes:
    // type : String, the type of the input, like 'datetime' or
    // 'number'
    // returns : String, initial value
    this.seedGoodValue = function(type) {}

    // validates a value of a specified type. Takes:
    // type : String, the type of the input.
    // value : String, value to validate
    // returns : Boolean, true if value is valid, false otherwise
    this.isValid = function(type, value) {}
}
</code></pre>
<p>Whew! Are we there yet? Almost.</p>
<h2>Step 4: Write Code</h2>
<p>This is where we pull up our sleeves and get to work. There&#8217;s probably no reason to offer a play-by-play on the actual process of coding, but here are a couple of things worth mentioning:</p>
<ul>
<li> Javascript is a dynamic, loosely-typed language. Enjoy it. Don&#8217;t square yourself into compile-time thinking. This is funk, not philharmonic.</li>
<li> Javascript is single-threaded. The trick that you might have learned with 0-timeout doesn&#8217;t actually start a new thread. It just waits for its opportunity to get back on the main thread.</li>
<li> Gears workers, on the other hand, are truly multi-threaded. There is some pretty neat plumbing under the hood that sorts out this dichotomy by queueing the messages, and you might want to be aware of that when writing the code. For instance, calling main thread with UI operations from a worker doesn&#8217;t make them asynchronous: the message handlers will still line up and wait for their turn. So, if your worker does a lot of waiting on the main thread, you may not see as much benefit from using the worker pools.</li>
<li> Gears currently lack a database or resource store management console with slick user interface (hint: you should perhaps join the project and lend a hand with that). But <a title="Google" href="http://code.google.com/apis/gears/tools.html">dbquery and webcachetool</a> are good enough. For this project, I cooked up asmall pagethat, upon loading, blows away all known state of the application, and that was pretty handy in development (<a title="clean.html" href="http://code.google.com/p/glazkov-attic/source/browse/trunk/YourTimesheets/Tools/clean.html">listing 3</a>).</li>
<li> There is a very simple way to simulate offline state on your local machine. It&#8217;s called <a title="Restarting" href="http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/003ed2fe-6339-4919-b577-6aa965994a9b.mspx?mfr=true">iisreset</a>. From command line, run <kbd>iisreset /stop</kbd> to stop your Web server and you&#8217;ll have a perfect simulation of a broken connection. Run <kbd>iisreset /start</kbd> to get the application back online.</li>
</ul>
<p>Armed with these Gear-ly pearls of wisdom, you jump fearlessly on the interfaces above and get coding. Or&#8230; you can just see how I&#8217;ve done it (<a title="Scripts" href="http://code.google.com/p/glazkov-attic/source/browse/trunk/YourTimesheets/Scripts/">listing 3</a></p>
<p>).</p>
<h2>Step 5: Feed the Monkey</h2>
<p>Feed the monkey? Wha&#8230; ?! Just wondering if you&#8217;re still paying attention. Technically, we&#8217;re done here. The application is working (to see for yourself, <a title="Screencast" href="http://glazkov-attic.googlecode.com/files/YourTimesheetsInAction.mov">download</a> the screencast or <a title="Screencast" href="http://www.youtube.com/watch?v=YgB8Rku2bHw">watch it all fuzzy</a> on YouTube).  As you may have gleaned from our coding adventure, Google Gears offers opportunities that weren&#8217;t available to front-end developers before: to build Web applications that work offline or with occasionally-available connection, to add real multi-threading to Javascript, and much more. What&#8217;s cool is that Gears are already available on many platforms and browsers (including Internet Explorer), and the list is growing quickly. Perhaps PC World is onto something, calling it <a title="The" href="http://www.pcworld.com/article/id,140663/article.html">the most innovative product of 2007</a>.  But don&#8217;t listen to me: I am a <a title="Call" href="http://glazkov.com/blog/gearhead/">confessed</a> Gearhead. Try it for yourself.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/glazkov.wordpress.com/119/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/glazkov.wordpress.com/119/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/glazkov.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/glazkov.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/glazkov.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/glazkov.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/glazkov.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/glazkov.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/glazkov.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/glazkov.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/glazkov.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/glazkov.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/glazkov.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/glazkov.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/glazkov.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/glazkov.wordpress.com/119/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=glazkov.com&blog=4127402&post=119&subd=glazkov&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://glazkov.com/2008/01/31/gears-asp-net-tutorial/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d561e3aa24ea8e6878e99cd108429329?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dglazkov</media:title>
		</media:content>
	</item>
		<item>
		<title>Back into the Future of Web: HTML5 SQL Player</title>
		<link>http://glazkov.com/2007/11/17/html5-sql-player/</link>
		<comments>http://glazkov.com/2007/11/17/html5-sql-player/#comments</comments>
		<pubDate>Sun, 18 Nov 2007 03:48:00 +0000</pubDate>
		<dc:creator>dglazkov</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://glazkov.com/blog/html5-sql-player/</guid>
		<description><![CDATA[Like a Three Stooges carpet-pull slapstick stunt, the HTML5 client-side storage spec changed drastically the night I released my Gears wrapper. Thump. Ow! I am ok! I am ok! And better for it! This time, I am back with the vengeance. Why fight the change? Embrace it! Dear reader, allow me to present the HTML5 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=glazkov.com&blog=4127402&post=162&subd=glazkov&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>
Like a <a href="http://www.threestooges.com/" title="The Official Three Stooges Site">Three Stooges</a> carpet-pull <a href="http://en.wikipedia.org/wiki/Slapstick" title="Slapstick on Wikipedia">slapstick</a> stunt, the HTML5 <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/section-sql.html">client-side storage spec</a> changed drastically the night I released my <a href="http://glazkov.com/blog/html5-gears-wrapper/" title="HTML5 Wrapper for Gears">Gears wrapper</a>. <em>Thump. Ow!</em>
</p>
<p>
I am ok! I am ok! And better for it! This time, I am back with the vengeance. Why fight the change? Embrace it! Dear reader, allow me to present the <a href="http://attic.glazkov.com/player/">HTML5 SQL Player</a>, a tool that spec developers and curious bystanders alike can use to poke and prod the spec <em>in action</em>. Essentially, this is a <a href="http://code.google.com/apis/gears/">Google Gears</a>-based sandbox, in which a user can run Javascript code to query and test the interfaces, implemented by the specification. If I were into that kind of thing, there would be a picture of a crazy-eyed <a href="http://www.imdb.com/name/nm0000502/" title="Christopher Lloyd on IMDB">Christopher Lloyd</a> and some reference to the <a href="http://en.wikipedia.org/wiki/Back_to_the_Future_trilogy" title="Back to The Future Trilogy on Wikipedia">movie</a> that doomed his career. Yes, my friends, this sandbox is a glimpse into the <em>yet-to-be-implemented</em> technology.
</p>
<p>And as such, beware of the bleeding edge. Some things in the spec are somewhat under&#8230; erm&#8230; specified (like the mode of transaction and its effect on sequential calls of the <code>transaction</code> method) and some things in the sandbox are under&#8230; erm&#8230; implemented (like <code>changeVersion</code> or SQL sanitation). But regardless, this approach is still the best if you&#8217;re trying to evaluate spec&#8217;s viability in an effort to make it better. And that&#8217;s what this is all about.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/glazkov.wordpress.com/162/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/glazkov.wordpress.com/162/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/glazkov.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/glazkov.wordpress.com/162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/glazkov.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/glazkov.wordpress.com/162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/glazkov.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/glazkov.wordpress.com/162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/glazkov.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/glazkov.wordpress.com/162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/glazkov.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/glazkov.wordpress.com/162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/glazkov.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/glazkov.wordpress.com/162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/glazkov.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/glazkov.wordpress.com/162/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=glazkov.com&blog=4127402&post=162&subd=glazkov&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://glazkov.com/2007/11/17/html5-sql-player/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d561e3aa24ea8e6878e99cd108429329?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dglazkov</media:title>
		</media:content>
	</item>
		<item>
		<title>Jumping Off Audience Navigation Bandwagon</title>
		<link>http://glazkov.com/2007/11/15/off-audience-navigation/</link>
		<comments>http://glazkov.com/2007/11/15/off-audience-navigation/#comments</comments>
		<pubDate>Thu, 15 Nov 2007 16:12:00 +0000</pubDate>
		<dc:creator>dglazkov</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://glazkov.com/blog/off-audience-navigation/</guid>
		<description><![CDATA[Future Endeavor has another insightful post, followed by an interesting UX example of the University of Virginia front door. I am a big fan of this blog and would highly recommend it to anyone involved in higher education Web development. This time, Tony Dunn talks about the future of the University Web site. I like [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=glazkov.com&blog=4127402&post=158&subd=glazkov&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>
<a href="http://futureendeavour.blogspot.com/">Future Endeavor</a> has another insightful post, followed by an interesting UX example of the <a href="http://www.virginia.edu/">University of Virginia</a> front door. I am a big fan of this blog and would highly recommend it to anyone involved in higher education Web development. This time, Tony Dunn talks about the future of the University Web site. I like his thinking and I feel that my thinking is mostly aligned with it. Where we diverge is on the future of the audience-based navigation.
</p>
<p>
The truth is, I no longer believe in the necessity (or usefulness) of the audience-based navigation for a University. There, I said it. Having been the advocate for the last 8 years, I eventually came to realize that all it does is create an extra barrier for the user (umm, who am I? Which is the right door?) and is mostly ignored by the visitors, anyway (I am basing this on my observations and thought experiments).
</p>
<p>
Self-selection is a myth: as you probably know, the user commonly belongs to multiple or none of the offered audiences, and this artificial ritual of forcing the visitor to put the right hat on is not only confusing, it&#8217;s actually a little bit insulting.
</p>
<p>
What&#8217;s the alternative? Concentrate on three things:
</p>
<ul>
<li>Needs-based Clusters. Envelop topics, relevant to specific needs (<q>How do I become a student?</q>) into a cohesive (spit-and-polished!) and limited in scope sites.</li>
<li>Lifeline Links. Identify 3-5 most desperate and immediate needs of your visitor (<q>I have to check my grades</q>) and by golly, put them on the home page.</li>
<li>Ambient Findability. Make sure that each page on your site carries a potential of getting the user closer to achieving their goals.</li>
</ul>
<p>
That&#8217;s all for now. I am eager to hear your thoughts and opinions on my little turn-about.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/glazkov.wordpress.com/158/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/glazkov.wordpress.com/158/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/glazkov.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/glazkov.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/glazkov.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/glazkov.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/glazkov.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/glazkov.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/glazkov.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/glazkov.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/glazkov.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/glazkov.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/glazkov.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/glazkov.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/glazkov.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/glazkov.wordpress.com/158/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=glazkov.com&blog=4127402&post=158&subd=glazkov&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://glazkov.com/2007/11/15/off-audience-navigation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d561e3aa24ea8e6878e99cd108429329?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dglazkov</media:title>
		</media:content>
	</item>
		<item>
		<title>Chewing on Open Social</title>
		<link>http://glazkov.com/2007/11/04/chewing-on-open-social/</link>
		<comments>http://glazkov.com/2007/11/04/chewing-on-open-social/#comments</comments>
		<pubDate>Mon, 05 Nov 2007 00:52:00 +0000</pubDate>
		<dc:creator>dglazkov</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://glazkov.com/blog/chewing-on-open-social/</guid>
		<description><![CDATA[So, the cat is out of the bag, in case you haven&#8217;t heard (and if you haven&#8217;t, what remote island are you living on?). I spent a bit of time this weekend, playing with the new toys, trying to analyze by immersion. Essentially, on the Javascript side, it&#8217;s one part existing Gadget API, one part [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=glazkov.com&blog=4127402&post=159&subd=glazkov&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>
So, the <a title="Google OpenSocial API" href="http://code.google.com/apis/opensocial/">cat is out of the bag</a>, in case you haven&#8217;t heard (and if you haven&#8217;t, what remote island are you living on?). I spent a bit of time this weekend, playing with the new toys, trying to analyze by immersion. Essentially, on the Javascript side, it&#8217;s one part existing <a title="Gadget API on Google Code" href="http://code.google.com/apis/gadgets/">Gadget API</a>, one part new feature (you guessed it, named <a title="Importing the OpenSocial Library" href="http://code.google.com/apis/opensocial/docs/javascript/index.html#Importing">opensocial</a>), and you&#8217;ve got yourself a whole new playing field to tinker with. Not being familiar with the Gadget API, I was learning both parts at the same time, which is never a bad thing.
</p>
<p>
After getting my <a title="Orkut Sandbox sign-up" href="http://code.google.com/support/opensocialsignup/">sandbox permit</a>, I hastily cooked up two simple gadgets, er.. social applications, the <a title="Twitter" href="http://estradacms.com/opensocial/twitter.xml">Twitter</a> and the <a title="OpenZombie" href="http://estradacms.com/opensocial/open-zombie.xml">OpenZombie</a>. Both of these are skeletal proofs-of-concept, on whose I have no intention to continue development. So, feel free to borrow in parts or in whole &#8212; it&#8217;s <a title="Creative Commons Public Domain License" href="http://creativecommons.org/licenses/publicdomain/">public domain</a>, baby! I intentionally tried to keep them light-weight, client-side-only. Both have been casually tested with Firefox and IE7. In other words, don&#8217;t call me if you have a problem running either.
</p>
<p>
First application grabs data from Twitter using Gadget API calls and renders it to somewhat resemble a Twitter feed. It doesn&#8217;t actually use any of the OpenSocial API functionality and can be run in the iGoogle. It does use the <a title="User Preferences" href="http://code.google.com/apis/gadgets/docs/reference.html#Userprefs_Ref">UserPrefs</a> to ask for the Twitter username, and Orkut&#8217;s current way of dealing with this is rather jarring, so be prepared for that.
</p>
<p>
Second one is my 45-minute take on the ever-ridiculous <a title="Zombies Application on Facebook" href="http://www.facebook.com/apps/application.php?id=2341504841&amp;b">Zombies</a> application on Facebook. Except this one actually bites automatically. As soon as the user stumbles upon my profile page, they are bitten by the OpenZombie application (with the corresponding activity stream message), and offered to install the application themselves as a vengeance-laden consolation prize. No stats are kept (and that would be hard, given that API doesn&#8217;t yet allow you to update owner&#8217;s person data), and no blood-curdling imagery is displayed. I figured, the next guy will come along and make it pretty. And by <q>pretty</q> I mean <q>despicably horrific</q>.
</p>
<p>
Speaking of the next guy, here are a couple of tips that I have for you:
</p>
<ul>
<li>When debugging the application, appending <code>&amp;bpc=1</code> to the URL of the page itself will disable caching of the application. Someone <a title="Orkut Sandbox - Permanent No Cache" href="http://www.tricks4fun.com/orkut-sandbox-permanent-no-cache/">already built</a> a Greasemonkey script for that.</li>
<li>Modularize your development. Make your application a harness that calls scripts and styles remotely:</li>
<pre>&lt;Module&gt;
	&lt;ModulePrefs [attributes go here]&gt;
		&lt;Require feature="opensocial-0.5"/&gt;
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;  &nbsp;&nbsp;  &nbsp;&nbsp;  [more feature requirements go here]
	&lt;/ModulePrefs&gt;
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;  [user prefs, etc. go here]
	&lt;Content type="html"&gt;
	&lt;![CDATA[
		&lt;script type='text/javascript'
			src='[absolute script url]'&gt;&lt;/script&gt;
		&lt;style&gt;
			@import url('[absolute style url');
		&lt;/style&gt;
		&lt;div id="message"&gt;&lt;/div&gt;
		&lt;div id="panel"&gt;&lt;/div&gt;
 	]]&gt;
  &lt;/Content&gt;
&lt;/Module&gt;
</pre>
<p>
Then, in your script, do something like this:
</p>
<pre>
_IG_RegisterOnloadHandler(function() {
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; // your code goes here
});
</pre>
<li>Once you have modularized your application, you can do another simple trick: edit your <a title="hosts" href="http://en.wikipedia.org/wiki/Hosts_file">hosts</a> file to temporarily point the hostname in the script and style URLs to <a title="localhost" href="http://en.wikipedia.org/wiki/Localhost">localhost</a>. Then make sure that these files are accessible from your local web server. Now you can edit them and see the changes without having to push the files to the server on which the application will eventually be hosted. Just don&#8217;t forget to remove the edits in the hosts file when you&#8217;re done developing.</li>
</ul>
<p>
Now, for a quick technology review of the OpenSocial Javascript API (can&#8217;t speak for the GData stuff, haven&#8217;t played with it). On the contrary to the few <a title="Dave Winer's Reaction" href="http://www.scripting.com/2007/11/03.html">negative</a> <a title="Dare Obasanjo's Technical Overview" href="http://www.25hoursaday.com/weblog/2007/11/03/GoogleOpenSocialTechnicalOverviewAndCritique.aspx">reactions</a> in the blogosphere, I find OpenSocial pretty impressive. I think the API is easy to learn and follow, the transparent authentication and identity data management model is neat, and there&#8217;s plenty of room to play, or even build something useful. Bringing application development into the Javascript domain is a <em>good thing</em>. Yeah, the sandbox squeaks and rattles, but that&#8217;s typical for an early release. Give it a little time.
</p>
<p>
The API itself is wordy and a bit inelegant, though this may be a viewpoint,<br />
skewed by the laconic beauty of <a title="JQuery Javascript Framework" href="http://jquery.com">JQuery</a>. I am guessing that its current shape is probably a result of being tailored toward the more arcane Javascript<br />
implementations. I can&#8217;t find any other explanation for the gratuitous global<br />
namespace pollution or things like API objects having accessible underscored methods/fields.
</p>
<p>
But my biggest beef is with the Gadget API. With it&#8217;s <q>let&#8217;s start now, it&#8217;s so simple!</q> approach, it practically encourages hacky, spaghetti-style Web development. Adding even a primitive asset management to the XML declaration would be a win-win: developers are nudged to separate behavior, presentation, and markup, and the server gets to know in advance what&#8217;s needed to render a gadget, thus providing opportunities for caching, embedding, or aggregating the assets:
</p>
<pre>
&lt;Assets&gt;
&nbsp;&nbsp;&nbsp; &lt;Asset Type="js" Src="http://example.com/twitter.js" /&gt;
&nbsp;&nbsp;&nbsp; &lt;Asset Type="css"&nbsp; Src="http://example.com/twitter.css" /&gt;
...
</pre>
<p>
Another thing that stood out is the lack of user experience management. Facebook went a long way (they invented their own language!) to keep the consistency of the user interface by offering common primitives, like <a title="profile-action" href="http://wiki.developers.facebook.com/index.php/Fb:profile-action">profile action</a> or the freshly baked <a title="board" href="http://wiki.developers.facebook.com/index.php/Fb:board">board</a>. Walking from application to application, you can easily see where the primitives end and developer&#8217;s own creative aspirations begin (and believe me, in 8 cases out of 10, it ain&#8217;t pretty). But at least they tried. The only thing that Gadget API has in this regard is handling of user preferences. That&#8217;s it. The containing IFRAME is essentially an open canvas. This is something that has to be addressed, especially considering that <a title="Ning" href="http://www.ning.com/">some partners</a> in the alliance are pretty good about keeping their UX noses clean.
</p>
<p>
I hesitate to draw any sort of conclusions in regard to direction or<br />
viability of the project. Obviously, this is a very early developer&#8217;s<br />
preview, where it&#8217;s perfectly acceptable to come across matchsticks and<br />
duct tape. As it stands right now, OpenSocial is certainly not as<br />
well-oriented and focused as Facebook, and Orkut doesn&#8217;t make a good sandbox<br />
container, because&#8230; well, let&#8217;s just say it won&#8217;t win any usability<br />
awards. And certainly not visual design awards. Even with that, I can<br />
see fairly clearly what Google wants to become: they want to be the social networking plumbing. Just like their search became the <q>the Internet</q><br />
for many users, I can speculate that Google hopes to offer free,<br />
ubiquitous, and highly mashable pieces of infrastructure that power the<br />
majority of person and community-centric software on the Web. Ultimately, I don&#8217;t believe<br />
it&#8217;s a <a title="Your Move, Facebook on TechCrunch" href="http://www.techcrunch.com/2007/11/01/facebook-your-move/">move in a game of chess</a>, but a tiny step in the strategy that reaches much<br />
farther and wider than everyone&#8217;s favorite blue-shaded time waster.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/glazkov.wordpress.com/159/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/glazkov.wordpress.com/159/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/glazkov.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/glazkov.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/glazkov.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/glazkov.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/glazkov.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/glazkov.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/glazkov.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/glazkov.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/glazkov.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/glazkov.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/glazkov.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/glazkov.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/glazkov.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/glazkov.wordpress.com/159/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=glazkov.com&blog=4127402&post=159&subd=glazkov&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://glazkov.com/2007/11/04/chewing-on-open-social/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d561e3aa24ea8e6878e99cd108429329?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dglazkov</media:title>
		</media:content>
	</item>
		<item>
		<title>Slides from my IPSA presentation on HTML5 and Google Gears</title>
		<link>http://glazkov.com/2007/11/01/html5-gears-p10n/</link>
		<comments>http://glazkov.com/2007/11/01/html5-gears-p10n/#comments</comments>
		<pubDate>Thu, 01 Nov 2007 19:43:00 +0000</pubDate>
		<dc:creator>dglazkov</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://glazkov.com/blog/html5-gears-p10n/</guid>
		<description><![CDATA[Today, at the monthly IPSA meeting, I gave a presentation on Google Gears and HTML5 client-side storage part of the spec. As promised, I uploaded the slides to this blog. &#8230; Yes, I am going slide-less from now on. Jeff Keeton and I have already done a couple of browser tabs-only presentations before, and the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=glazkov.com&blog=4127402&post=157&subd=glazkov&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>Today, at the monthly <a href="http://ipsaonline.org/"><abbr title="Internet Professionals Society of Alabama">IPSA</abbr></a> meeting, I gave a presentation on Google Gears and HTML5 client-side storage part of the spec. As promised, I uploaded <a title="Presentation Slides" href="http://glazkov.com/resources/files/html5-gears-p10n.zip">the slides</a> to this blog.
</p>
<p>
&hellip; Yes, I am going slide-less from now on. <a rel="friend met colleague" href="http://blog.gobyfastphotos.com/"><abbr title="Jeff Keeton">Jeff Keeton</abbr></a> and I have already done a couple of browser tabs-only presentations before, and the simple method works as well or better than the slides.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/glazkov.wordpress.com/157/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/glazkov.wordpress.com/157/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/glazkov.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/glazkov.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/glazkov.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/glazkov.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/glazkov.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/glazkov.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/glazkov.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/glazkov.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/glazkov.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/glazkov.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/glazkov.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/glazkov.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/glazkov.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/glazkov.wordpress.com/157/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=glazkov.com&blog=4127402&post=157&subd=glazkov&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://glazkov.com/2007/11/01/html5-gears-p10n/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d561e3aa24ea8e6878e99cd108429329?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dglazkov</media:title>
		</media:content>
	</item>
	</channel>
</rss>