<?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>Sean's Stuff</title>
	<atom:link href="http://stuff.seans.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://stuff.seans.com</link>
	<description>Learning new software development technologies out loud</description>
	<lastBuildDate>Fri, 15 Jan 2010 16:26:34 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='stuff.seans.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/d76ce1ec7c63ae00d0599773d2710def?s=96&#038;d=http://s2.wp.com/i/buttonw-com.png</url>
		<title>Sean's Stuff</title>
		<link>http://stuff.seans.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://stuff.seans.com/osd.xml" title="Sean&#8217;s Stuff" />
	<atom:link rel='hub' href='http://stuff.seans.com/?pushpress=hub'/>
		<item>
		<title>Creating a Silverlight 4 Development Machine</title>
		<link>http://stuff.seans.com/2010/01/09/creating-a-silverlight-4-development-machine/</link>
		<comments>http://stuff.seans.com/2010/01/09/creating-a-silverlight-4-development-machine/#comments</comments>
		<pubDate>Sat, 09 Jan 2010 05:11:44 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[Blend]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Silverlight 4]]></category>
		<category><![CDATA[Visual Studio 2010]]></category>

		<guid isPermaLink="false">http://stuff.seans.com/?p=1037</guid>
		<description><![CDATA[Now that a Silverlight 4 beta is available, it&#8217;s time for me to create a new VM where I can develop Silverlight 4 applications.  This development machine will be based on Windows 7 and include:

Visual Studio 2010 Beta 2
.NET Framework 4 Beta 2
Silverlight 4 Beta
Expression Blend for .NET 4 Preview

As of January, 2010, this represents [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=1037&subd=spsexton&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>Now that a Silverlight 4 beta is available, it&#8217;s time for me to create a new VM where I can develop Silverlight 4 applications.  This development machine will be based on Windows 7 and include:</p>
<ul>
<li>Visual Studio 2010 Beta 2</li>
<li>.NET Framework 4 Beta 2</li>
<li>Silverlight 4 Beta</li>
<li>Expression Blend for .NET 4 Preview</li>
</ul>
<p>As of January, 2010, this represents the most complete development environment possible for Silverlight 4 applications.</p>
<p><span style="text-decoration:underline;"><strong>Operating System</strong></span></p>
<p>I&#8217;ll be installing into a virtual machine environment, using VMware Workstation 6.5.1, running on top of Windows 7 (the host operating system).  The guest operating system, where I&#8217;ll be installing the development tools, will be Windows 7 Ultimate.</p>
<p>Both my host and guest machines are 32-bit (x86).</p>
<p>Here&#8217;s our &#8220;clean slate&#8221;&#8211;a fresh install of Windows 7 Ultimate with nothing else yet installed:</p>
<p><a href="http://spsexton.files.wordpress.com/2010/01/01-cleanslate1.jpg"><img class="alignnone size-medium wp-image-1042" title="01-CleanSlate" src="http://spsexton.files.wordpress.com/2010/01/01-cleanslate1.jpg?w=300&#038;h=224" alt="Fresh Install of Windows 7" width="300" height="224" /></a></p>
<p>It&#8217;s a beautiful sight.</p>
<p><span style="text-decoration:underline;"><strong>Overview</strong></span></p>
<p>Here&#8217;s a complete list of what I&#8217;ll be installing in the Windows 7 virtual machine:</p>
<ol>
<li>Visual Studio 2010 Ultimate Beta 2 (x86)    <em>(19 Oct 2009)</em></li>
<li>Silverlight 4 Beta Tools for Visual Studio 2010    <em>(2 Dec 2009)</em></li>
<li>Microsoft for Expression Blend for .NET 4 Preview    <em>(16 Nov 2009)</em></li>
<li>Silverlight Toolkit    <em>(18 Nov 2009)</em></li>
<li>WCF RIA Services for Visual Studio 2010 Beta 2    <em>(3 Dec 2009)</em></li>
</ol>
<p>I&#8217;ll include a link to the location of each tool in the sections below.</p>
<p><span style="text-decoration:underline;"><strong>Install Visual Studio 2010<br />
</strong></span></p>
<p>I got my copy of Visual Studio 2010 through my MSDN subscription, but you can get a free copy (&#8220;Go Live&#8221; license) here:</p>
<p style="padding-left:30px;"><a title="Visual Studio 2010" href="http://www.microsoft.com/visualstudio/en-us/products/2010/default.mspx" target="_blank">Download Visual Studio 2010 Beta 2</a></p>
<p>I haven&#8217;t tried downloading Visual Studio 2010 from this location, so I&#8217;m not sure what edition you get.  But even if it&#8217;s one of the Express editions, it ought to be fine for developing Silverlight 4 applications.</p>
<p>We start by launching the VS 2010 installation.</p>
<p><a href="http://spsexton.files.wordpress.com/2010/01/02-vs2010-01.jpg"><img class="alignnone size-full wp-image-1046" title="02-VS2010-01" src="http://spsexton.files.wordpress.com/2010/01/02-vs2010-01.jpg?w=499&#038;h=402" alt="Visual Studio 2010 Installation" width="499" height="402" /></a></p>
<p>The installation begins.</p>
<p><a href="http://spsexton.files.wordpress.com/2010/01/03-vs2010-02.jpg"><img class="alignnone size-full wp-image-1047" title="03-VS2010-02" src="http://spsexton.files.wordpress.com/2010/01/03-vs2010-02.jpg?w=760&#038;h=580" alt="Loading Components" width="760" height="580" /></a></p>
<p>We agree to the license, after carefully reading it.</p>
<p><a href="http://spsexton.files.wordpress.com/2010/01/04-vs2010-03.jpg"><img class="alignnone size-full wp-image-1048" title="04-VS2010-03" src="http://spsexton.files.wordpress.com/2010/01/04-vs2010-03.jpg?w=758&#038;h=579" alt="License Agreement" width="758" height="579" /></a></p>
<p>Next, we choose either a Full or Custom installation.  I always go with Custom, so that I can turn off stuff that I don&#8217;t want.  Notice that the default installation takes up 6.4 GB.</p>
<p><a href="http://spsexton.files.wordpress.com/2010/01/05-vs2010-04.jpg"><img class="alignnone size-full wp-image-1049" title="05-VS2010-04" src="http://spsexton.files.wordpress.com/2010/01/05-vs2010-04.jpg?w=758&#038;h=582" alt="Custom Installation" width="758" height="582" /></a></p>
<p>The next screen lets me select individual components to install.  It looks like everything is selected by default.</p>
<p><a href="http://spsexton.files.wordpress.com/2010/01/06-vs2010-05.jpg"><img class="alignnone size-full wp-image-1050" title="06-VS2010-05" src="http://spsexton.files.wordpress.com/2010/01/06-vs2010-05.jpg?w=758&#038;h=581" alt="Select Features to Install" width="758" height="581" /></a></p>
<p>Here are my preferred choices.  I have no interest in VB, VC++ or F#.  For now, I&#8217;ll just stick with C#.  I do include the Office Development tools, but don&#8217;t need the Dotfuscator feature or SharePoint development tools.  I also uncheck SQL Server 2008 Express, since I&#8217;ll later install a full version of SQL Server 2008 when I need it.  This brings the install footprint down to 3.6 GB.</p>
<p><a href="http://spsexton.files.wordpress.com/2010/01/07-vs2010-06.jpg"><img class="alignnone size-full wp-image-1051" title="07-VS2010-06" src="http://spsexton.files.wordpress.com/2010/01/07-vs2010-06.jpg" alt="My Selected=" /></a></p>
<p>The installation process now starts.  It will take a while, since we have a lot of different components to install.</p>
<p><a href="http://spsexton.files.wordpress.com/2010/01/08-vs2010-071.jpg"><img class="alignnone size-full wp-image-1071" title="08-VS2010-07" src="http://spsexton.files.wordpress.com/2010/01/08-vs2010-071.jpg?w=759&#038;h=581" alt="Installation Begins" width="759" height="581" /></a></p>
<p>A reboot is required after installation of the .NET Framework.</p>
<p><a href="http://spsexton.files.wordpress.com/2010/01/09-vs2010-08.jpg"><img class="alignnone size-full wp-image-1056" title="09-VS2010-08" src="http://spsexton.files.wordpress.com/2010/01/09-vs2010-08.jpg?w=758&#038;h=579" alt="Reboot Required" width="758" height="579" /></a></p>
<p>By the way, it&#8217;s interesting to note that version 4 of the .NET Framework actually updates the core components of the .NET Framework.  This was not true of version 3.0 or 3.5, which were both just releases that added to existing functionality.  So 4.0 represents the first time that core libraries have been updated since the 2.0 release in Nov, 2005&#8211;just over four years ago.</p>
<p><a href="http://spsexton.files.wordpress.com/2010/01/10-vs2010-09.jpg"><img class="alignnone size-full wp-image-1057" title="10-VS2010-09" src="http://spsexton.files.wordpress.com/2010/01/10-vs2010-09.jpg?w=473&#038;h=103" alt="New Core Libraries" width="473" height="103" /></a></p>
<p>Nearly done now..</p>
<p><a href="http://spsexton.files.wordpress.com/2010/01/11-vs2010-10.jpg"><img class="alignnone size-full wp-image-1059" title="11-VS2010-10" src="http://spsexton.files.wordpress.com/2010/01/11-vs2010-10.jpg?w=757&#038;h=581" alt="Installation Nearly Complete" width="757" height="581" /></a></p>
<p>And the installation is now complete.</p>
<p><a href="http://spsexton.files.wordpress.com/2010/01/12-vs2020-11.jpg"><img class="alignnone size-full wp-image-1060" title="12-VS2020-11" src="http://spsexton.files.wordpress.com/2010/01/12-vs2020-11.jpg?w=759&#038;h=582" alt="Installation Complete" width="759" height="582" /></a></p>
<p><span style="text-decoration:underline;"><strong>Install Silverlight 4 Beta Tools for Visual Studio 2010</strong></span></p>
<p>Visual Studio 2010 includes support for Silverlight 3, rather than Silverlight 4.  Because Visual Studio 2010 ships a bit earlier than Silverlight 4 (Visual Studio 2010 shipping in March, 2010 and Silverlight 4 shipping sometime in the first half of 2010), Visual Studio 2010 will support Silverlight 3 rather than Silverlight 4.</p>
<p>You can download the Silverlight 4 Tools for Visual Studio from the link below.  Note that this version of the Silverlight 4 tools works only with Beta 2&#8211;not Beta 1.</p>
<p style="padding-left:30px;"><a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=68a158af-9bb8-4855-a724-d09d196eaaf3&amp;displaylang=en" target="_blank">Download Silverlight 4 Beta Tools for Visual Studio 2010 Beta 2</a></p>
<p>The install starts:</p>
<p><a href="http://spsexton.files.wordpress.com/2010/01/13-sl4tools-01.jpg"><img class="alignnone size-full wp-image-1063" title="13-SL4Tools-01" src="http://spsexton.files.wordpress.com/2010/01/13-sl4tools-01.jpg?w=504&#038;h=472" alt="Silverlight 4 Tools Install" width="504" height="472" /></a></p>
<p>There&#8217;s another license agreement to read and accept.</p>
<p><a href="http://spsexton.files.wordpress.com/2010/01/14-sl4tools-02.jpg"><img class="alignnone size-full wp-image-1064" title="14-SL4Tools-02" src="http://spsexton.files.wordpress.com/2010/01/14-sl4tools-02.jpg?w=507&#038;h=473" alt="License Agreement" width="507" height="473" /></a></p>
<p>The install begins.</p>
<p><a href="http://spsexton.files.wordpress.com/2010/01/15-sl4tools-03.jpg"><img class="alignnone size-full wp-image-1065" title="15-SL4Tools-03" src="http://spsexton.files.wordpress.com/2010/01/15-sl4tools-03.jpg?w=503&#038;h=472" alt="Install Begins" width="503" height="472" /></a></p>
<p>And we&#8217;re done..</p>
<p><a href="http://spsexton.files.wordpress.com/2010/01/16-sl4tools-04.jpg"><img class="alignnone size-full wp-image-1067" title="16-SL4Tools-04" src="http://spsexton.files.wordpress.com/2010/01/16-sl4tools-04.jpg?w=505&#038;h=470" alt="" width="505" height="470" /></a></p>
<p><span style="text-decoration:underline;"><strong>Install Expression Blend Preview for .NET 4</strong></span></p>
<p>There is a free preview download of Expression Blend that supports targeting both Silverlight 4 Beta and .NET 4 Beta 2.  It is listed as being compatible with Visual Studio 2010 Beta 2 and can be found at:</p>
<p style="padding-left:30px;"><a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=6806e466-dd25-482b-a9b3-3f93d2599699&amp;displaylang=en" target="_blank">Download Expression Blend Preview for .NET 4</a></p>
<p>This is version 3.1.11111.0 of Expression Blend.  It supports creation of both Silverlight 4 Beta and .NET 4 Beta 2 content, but does <strong>not</strong> support creation of Silverlight 3 or .NET 3.5 content.  It also does not include SketchFlow.</p>
<p>Note: If you are installing the tools to a virtual machine running in VMware Workstation, you may need to make a change in your display settings for the virtual machine before launching the Expression Blend install.  If the 3D graphics setting is enabled for the VM, the Blend install program may not display properly.  Under VMware Workstation 6.5.1, I&#8217;ve seen this problem consistently.  The fix is to disabled the 3D graphics setting for the VM.</p>
<p><a href="http://spsexton.files.wordpress.com/2010/01/17-graphicssetting.jpg"><img class="alignnone size-full wp-image-1075" title="17-GraphicsSetting" src="http://spsexton.files.wordpress.com/2010/01/17-graphicssetting.jpg?w=315&#038;h=83" alt="3D Graphics Setting" width="315" height="83" /></a></p>
<p>One you disable 3D graphics, the first dialog in the install program will display properly.</p>
<p><a href="http://spsexton.files.wordpress.com/2010/01/18-blend-01.jpg"><img class="alignnone size-full wp-image-1076" title="18-Blend-01" src="http://spsexton.files.wordpress.com/2010/01/18-blend-01.jpg?w=496&#038;h=349" alt="Blend Install Starts" width="496" height="349" /></a></p>
<p>The Blend install dialogs are certainly beautiful.</p>
<p><a href="http://spsexton.files.wordpress.com/2010/01/19-blend-02.jpg"><img class="alignnone size-full wp-image-1077" title="19-Blend-02" src="http://spsexton.files.wordpress.com/2010/01/19-blend-02.jpg?w=498&#038;h=351" alt="Blend Install" width="498" height="351" /></a></p>
<p>The installation starts:</p>
<p><a href="http://spsexton.files.wordpress.com/2010/01/20-blend-03.jpg"><img class="alignnone size-full wp-image-1079" title="20-Blend-03" src="http://spsexton.files.wordpress.com/2010/01/20-blend-03.jpg?w=499&#038;h=349" alt="Installation in Progress" width="499" height="349" /></a></p>
<p>And the installation finishes quite politely.</p>
<p><a href="http://spsexton.files.wordpress.com/2010/01/21-blend-04.jpg"><img class="alignnone size-full wp-image-1081" title="21-Blend-04" src="http://spsexton.files.wordpress.com/2010/01/21-blend-04.jpg?w=499&#038;h=349" alt="Thank You" width="499" height="349" /></a></p>
<p><span style="text-decoration:underline;"><strong>Install Silverlight Toolkit</strong></span></p>
<p>Next, we install the Silverlight Toolkit, which includes a number of additional Silverlight Controls.  You can find the toolkit on CodePlex.</p>
<p style="padding-left:30px;"><a href="http://silverlight.codeplex.com/" target="_blank">Download Silverlight Toolkit</a></p>
<p>The install says that this is the toolkit for Silverlight 3, but the Nov, 2009 release has been updated to include support for Silverlight 4.</p>
<p><a href="http://spsexton.files.wordpress.com/2010/01/22-toolkit-01.jpg"><img class="alignnone size-full wp-image-1083" title="22-Toolkit-01" src="http://spsexton.files.wordpress.com/2010/01/22-toolkit-01.jpg?w=505&#038;h=393" alt="Toolkit Install Starts" width="505" height="393" /></a></p>
<p>Yet another license agreement.</p>
<p><a href="http://spsexton.files.wordpress.com/2010/01/23-toolkit-02.jpg"><img class="alignnone size-full wp-image-1084" title="23-Toolkit-02" src="http://spsexton.files.wordpress.com/2010/01/23-toolkit-02.jpg?w=503&#038;h=391" alt="Toolkit License Agreement" width="503" height="391" /></a></p>
<p>You next get a chance to decide which components of the toolkit to install.</p>
<p><a href="http://spsexton.files.wordpress.com/2010/01/24-toolkit-03.jpg"><img class="alignnone size-full wp-image-1085" title="24-Toolkit-03" src="http://spsexton.files.wordpress.com/2010/01/24-toolkit-03.jpg?w=504&#038;h=394" alt="Silverlight Toolkit Features" width="504" height="394" /></a></p>
<p>Ready to start the install now.</p>
<p><a href="http://spsexton.files.wordpress.com/2010/01/25-toolkit-04.jpg"><img class="alignnone size-full wp-image-1086" title="25-Toolkit-04" src="http://spsexton.files.wordpress.com/2010/01/25-toolkit-04.jpg?w=501&#038;h=390" alt="Ready to Install" width="501" height="390" /></a></p>
<p>The Silverlight Toolkit install in action:</p>
<p><a href="http://spsexton.files.wordpress.com/2010/01/26-toolkit-051.jpg"><img class="alignnone size-full wp-image-1088" title="26-Toolkit-05" src="http://spsexton.files.wordpress.com/2010/01/26-toolkit-051.jpg?w=503&#038;h=392" alt="Install in Progress" width="503" height="392" /></a></p>
<p>And we&#8217;re done.</p>
<p><a href="http://spsexton.files.wordpress.com/2010/01/27-toolkit-06.jpg"><img class="alignnone size-full wp-image-1089" title="27-Toolkit-06" src="http://spsexton.files.wordpress.com/2010/01/27-toolkit-06.jpg?w=502&#038;h=392" alt="Install Finishes" width="502" height="392" /></a></p>
<p><span style="text-decoration:underline;"><strong>Install WCF RIA Services</strong></span></p>
<p>Next, we install the WCF RIA services, which is a framework that allows writing n-tier ASP.NET/Silverlight applications.</p>
<p>You can find the WCF RIA Services install at:</p>
<p style="padding-left:30px;"><a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=91998faf-d2df-42bb-af2e-17d43d7ce078&amp;displaylang=en" target="_blank">Install WCF RIA Services for Visual Studio 2010 Beta 2</a></p>
<p>The link above allows you to download and install the WCF RIA Services.  However, I noticed that when I got to this point, it was already installed.  As it turns out, the install for the Silverlight 4 Beta also installed the WCF RIA Services preview.</p>
<p><span style="text-decoration:underline;"><strong>Documentation</strong></span></p>
<p>We&#8217;ve now downloaded everything that we need for creating Silverlight 4 applications.  One remaining piece of information that will be helpful is that the Silverlight 4 documentation can be found online at:</p>
<p style="padding-left:30px;"><a href="http://" target="_blank">Silverlight 4 Documentation</a></p>
<p><span style="text-decoration:underline;"><strong>Wrapping Up</strong></span></p>
<p>There we go.  I now have a clean virtual machine that has everything on it that is needed for creating Silverlight 4 applications.  My one last remaining task is to go and save a snapshot of the VM, so that I preserve the &#8220;clean&#8221; Silverlight 4 development environment.</p>
<div id="_mcePaste" style="overflow:hidden;position:absolute;left:-10000px;top:399px;width:1px;height:1px;"><a href="http://go.microsoft.com/fwlink/?LinkId=169446">Microsoft Expression Blend for .NET 4 Preview</a></div>
<br />Posted in Blend, Silverlight, Visual Studio Tagged: Silverlight 4, Visual Studio 2010 <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/spsexton.wordpress.com/1037/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/spsexton.wordpress.com/1037/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/spsexton.wordpress.com/1037/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/spsexton.wordpress.com/1037/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/spsexton.wordpress.com/1037/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/spsexton.wordpress.com/1037/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/spsexton.wordpress.com/1037/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/spsexton.wordpress.com/1037/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/spsexton.wordpress.com/1037/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/spsexton.wordpress.com/1037/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=1037&subd=spsexton&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://stuff.seans.com/2010/01/09/creating-a-silverlight-4-development-machine/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8922e4d5254d602ba3ed32dd073b5a4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">spsexton</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2010/01/01-cleanslate1.jpg?w=300" medium="image">
			<media:title type="html">01-CleanSlate</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2010/01/02-vs2010-01.jpg" medium="image">
			<media:title type="html">02-VS2010-01</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2010/01/03-vs2010-02.jpg" medium="image">
			<media:title type="html">03-VS2010-02</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2010/01/04-vs2010-03.jpg" medium="image">
			<media:title type="html">04-VS2010-03</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2010/01/05-vs2010-04.jpg" medium="image">
			<media:title type="html">05-VS2010-04</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2010/01/06-vs2010-05.jpg" medium="image">
			<media:title type="html">06-VS2010-05</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2010/01/07-vs2010-06.jpg" medium="image">
			<media:title type="html">07-VS2010-06</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2010/01/08-vs2010-071.jpg" medium="image">
			<media:title type="html">08-VS2010-07</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2010/01/09-vs2010-08.jpg" medium="image">
			<media:title type="html">09-VS2010-08</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2010/01/10-vs2010-09.jpg" medium="image">
			<media:title type="html">10-VS2010-09</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2010/01/11-vs2010-10.jpg" medium="image">
			<media:title type="html">11-VS2010-10</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2010/01/12-vs2020-11.jpg" medium="image">
			<media:title type="html">12-VS2020-11</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2010/01/13-sl4tools-01.jpg" medium="image">
			<media:title type="html">13-SL4Tools-01</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2010/01/14-sl4tools-02.jpg" medium="image">
			<media:title type="html">14-SL4Tools-02</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2010/01/15-sl4tools-03.jpg" medium="image">
			<media:title type="html">15-SL4Tools-03</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2010/01/16-sl4tools-04.jpg" medium="image">
			<media:title type="html">16-SL4Tools-04</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2010/01/17-graphicssetting.jpg" medium="image">
			<media:title type="html">17-GraphicsSetting</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2010/01/18-blend-01.jpg" medium="image">
			<media:title type="html">18-Blend-01</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2010/01/19-blend-02.jpg" medium="image">
			<media:title type="html">19-Blend-02</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2010/01/20-blend-03.jpg" medium="image">
			<media:title type="html">20-Blend-03</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2010/01/21-blend-04.jpg" medium="image">
			<media:title type="html">21-Blend-04</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2010/01/22-toolkit-01.jpg" medium="image">
			<media:title type="html">22-Toolkit-01</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2010/01/23-toolkit-02.jpg" medium="image">
			<media:title type="html">23-Toolkit-02</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2010/01/24-toolkit-03.jpg" medium="image">
			<media:title type="html">24-Toolkit-03</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2010/01/25-toolkit-04.jpg" medium="image">
			<media:title type="html">25-Toolkit-04</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2010/01/26-toolkit-051.jpg" medium="image">
			<media:title type="html">26-Toolkit-05</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2010/01/27-toolkit-06.jpg" medium="image">
			<media:title type="html">27-Toolkit-06</media:title>
		</media:content>
	</item>
		<item>
		<title>Silverlight Gets Full-Fledged Designer Support in Visual Studio 2010</title>
		<link>http://stuff.seans.com/2009/07/02/silverlight-gets-full-fledged-designer-support-in-visual-studio-2010/</link>
		<comments>http://stuff.seans.com/2009/07/02/silverlight-gets-full-fledged-designer-support-in-visual-studio-2010/#comments</comments>
		<pubDate>Thu, 02 Jul 2009 17:55:13 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Visual Studio 2010]]></category>

		<guid isPermaLink="false">http://stuff.seans.com/?p=1012</guid>
		<description><![CDATA[Trying to wrap my head around the current situation with Silverlight 2 and 3 support in Visual Studio 2008 and 2010, I&#8217;m confused enough that I feel like shouting out a line from my daughter&#8217;s favorite Dr. Suess book, Fox in Socks:  &#8220;Now wait a minute, Mr. Socks Fox&#8221;!!
It is a little confusing.  But I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=1012&subd=spsexton&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>Trying to wrap my head around the current situation with Silverlight 2 and 3 support in Visual Studio 2008 and 2010, I&#8217;m confused enough that I feel like shouting out a line from my daughter&#8217;s favorite Dr. Suess book,<em> Fox in Socks</em>:  &#8220;Now wait a minute, Mr. Socks Fox&#8221;!!</p>
<p>It <strong>is</strong> a little confusing.  But I think I now understand who supports what and I&#8217;ll take a stab at jotting it down, for future reference.</p>
<p>Visual Studio 2008 SP1</p>
<ul>
<li>Supports either Silverlight 2 or Silverlight 3, but not both on the same development machine</li>
<li>Silverlight 2 &#8212; install using the <a href="http://go.microsoft.com/fwlink/?LinkId=129043" target="_blank">Silverlight Tools for Visual Studio 2008 SP1</a></li>
<li>Silverlight 3 &#8212; install <a href="http://spsexton.wordpress.com/2009/06/30/installing-silverlight-3-with-visual-studio-2010-step-by-step/" target="_blank"></a>using the <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=11dc7151-dbd6-4e39-878f-5081863cbb5d&amp;displaylang=en">Silverlight 3 Tools Beta for Visual Studio 2008 SP1</a></li>
</ul>
<p>Visual Studio 2010</p>
<ul>
<li>Supports both Silverlight 2 and Silverlight 3</li>
<li>Can install both on the same development machine</li>
<li>Each Silverlight project targets one of the two Silverlight versions</li>
<li>Silverlight 2 &#8212; need to install the <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=8D933343-038F-499C-986C-C3C7E87A60B3&amp;displaylang=en">Silverlight 2 SDK</a> manually</li>
<li>Silverlight 3 &#8212; install <a href="http://spsexton.wordpress.com/2009/06/30/installing-silverlight-3-with-visual-studio-2010-step-by-step/">manually</a></li>
</ul>
<p>Ok, as far as I can tell, that&#8217;s the current situation.</p>
<p>This basically boils down to two questions:</p>
<ul>
<li>Do I want to develop in Silverlight 2 or Silverlight 3?
<ul>
<li>Silverlight 2 is more stable and is officially released</li>
<li>Silverlight 3 (beta) &#8212; new controls, navigation framework, out-of-browser support</li>
</ul>
</li>
<li>Which version of Visual Studio do I want to use?
<ul>
<li>VS 2008 &#8212; easier install experience, stable/released</li>
<li>VS 2010 &#8212; improved tooling for Silverlight &amp; WPF</li>
</ul>
</li>
</ul>
<p>The last point is what I want to talk about.  Notice that improved tooling for Silverlight is a feature of Visual Studio, not of Silverlight itself.  Visual Studio 2010 finally gives us full design-time drag-and-drop support for Silverlight.</p>
<p>Let&#8217;s see what this looks like.  But first, let&#8217;s go back and take a look at the Silverlight design-time experience in Visual Studio 2008.  (I&#8217;m using Silverlight 3 here).</p>
<p><span style="text-decoration:underline;"><strong>The Bad Old Days &#8211; Visual Studio 2008 SP1</strong></span></p>
<p>Until now, Silverlight developers haven&#8217;t had the most basic tooling enjoyed by even the lowliest VB6 developers.  Namely &#8212; the ability to drag and drop controls onto a design surface and set their properties right in the designer.</p>
<p>Specifically, here&#8217;s what you couldn&#8217;t do.  If you look at the split window for Silverlight controls in the designer, you&#8217;ll notice that the upper pane is labeled &#8220;Preview&#8221;.</p>
<p><a href="http://spsexton.files.wordpress.com/2009/07/sldes-001.jpg"><img class="alignnone size-full wp-image-1014" title="Preview Pane" src="http://spsexton.files.wordpress.com/2009/07/sldes-001.jpg?w=321&#038;h=98" alt="Preview Pane" width="321" height="98" /></a></p>
<p>This was a &#8220;Preview&#8221; pane because all it could do was to render your XAML on the screen as a preview of how it would eventually look in your Silverlight application.  You couldn&#8217;t drag controls onto this surface.  You also couldn&#8217;t select any controls in order to reposition them or to set their properties.</p>
<p>In Visual Studio 2008, if you try dragging Silverlight controls onto this Preview window, you just get a big fat &#8220;don&#8217;t do this&#8221; icon.  Even sadder, you can&#8217;t select any controls.  If you look at the properties window in Visual Studio, you just see the following sad message:</p>
<p><a href="http://spsexton.files.wordpress.com/2009/07/sldes-002.jpg"><img class="alignnone size-full wp-image-1015" title="No Property Editing" src="http://spsexton.files.wordpress.com/2009/07/sldes-002.jpg?w=326&#038;h=237" alt="No Property Editing" width="326" height="237" /></a></p>
<p>Thankfully, you could at least drag and drop controls down into your XAML.  This would at least insert the proper XAML tags for the control that you&#8217;d selected.  But you just got an empty tag.  (In the picture below, I&#8217;ve just dragged a <strong>Button</strong> into my XAML).</p>
<p><a href="http://spsexton.files.wordpress.com/2009/07/sldes-003.jpg"><img class="alignnone size-full wp-image-1016" title="Drag Into XAML" src="http://spsexton.files.wordpress.com/2009/07/sldes-003.jpg?w=607&#038;h=178" alt="Drag Into XAML" width="607" height="178" /></a></p>
<p>And, although we weren&#8217;t able to set property values in the property editor, there was some consolation in that Intellisense worked in the XAML code.</p>
<p><a href="http://spsexton.files.wordpress.com/2009/07/sldes-004.jpg"><img class="alignnone size-full wp-image-1017" title="Intellisense in XAML" src="http://spsexton.files.wordpress.com/2009/07/sldes-004.jpg?w=613&#038;h=329" alt="Intellisense in XAML" width="613" height="329" /></a></p>
<p>So the Silverlight development environment was workable, but not ideal.  Also, you could always author/edit your UIs in Expression Blend.  But then there was a big learning curve to tackle.</p>
<p><span style="text-decoration:underline;"><strong>Enter Visual Studio 2010</strong></span></p>
<p>In Visual Studio 2010, we <strong>finally </strong>have full designer support for Silverlight applications.  In the picture below, I&#8217;ve just dragged a Button from the toolbox onto the design surface.</p>
<p><a href="http://spsexton.files.wordpress.com/2009/07/sldes-005.jpg"><img class="alignnone size-full wp-image-1019" title="Silverlight Design Surface" src="http://spsexton.files.wordpress.com/2009/07/sldes-005.jpg?w=1024&#038;h=795" alt="Silverlight Design Surface" width="1024" height="795" /></a></p>
<p>It makes me want to weep.  (Who would have thought that a developer would be so happy with being able to drag a button onto a form)?</p>
<p>Not only did the designer let me drag the button onto a design surface, but now it actually gives me a little more than an empty/default <strong>Button</strong> tag in my XAML.  I actually get a sensibly configured button object, with a reasonable size and a preset label.  Also notice that the upper pane is now labeled &#8220;Design&#8221;, rather than &#8220;Preview&#8221;.</p>
<p>But don&#8217;t weep yet.  It gets better.  You can actually left-click to select the button in the designer.  When you do this, you&#8217;ll see that you can now actually set properties for the button in the property window.</p>
<p><a href="http://spsexton.files.wordpress.com/2009/07/sldes-006.jpg"><img class="alignnone size-full wp-image-1020" title="Property Window" src="http://spsexton.files.wordpress.com/2009/07/sldes-006.jpg?w=335&#038;h=545" alt="Property Window" width="335" height="545" /></a></p>
<p>Now you may weep or cheer, depending on your particular emotional reaction.</p>
<p>You&#8217;ll also notice that you can now click on the little event icon and then double-click to generate event handlers in your code-behind.  (As opposed to using Intellisense in the XAML to discover relevant events).</p>
<p><a href="http://spsexton.files.wordpress.com/2009/07/sldes-007.jpg"><img class="alignnone size-full wp-image-1021" title="Event Properties" src="http://spsexton.files.wordpress.com/2009/07/sldes-007.jpg?w=342&#038;h=504" alt="Event Properties" width="342" height="504" /></a></p>
<p>This is great, although I still don&#8217;t understand why there is no dropdown in the properties window to select the individual controls.  Is there a good reason why neither WPF or Silverlight applications allow selecting individual controls from the property window?</p>
<p>Also note that all of the above is possible in both Silverlight 2 and Silverlight 3.</p>
<p><span style="text-decoration:underline;"><strong>Where Are We?</strong></span></p>
<p>So clearly, Silverlight is now a full-fledged citizen in Visual Studio, with full tooling.  This may not seem like much, but for anyone who works with Silverlight a lot, it will make a huge difference.  Not to mention a much shallower learning curve for developers coming up to speed with Silverlight.</p>
<p>Mr. Socks Fox wasn&#8217;t spouting blibber blubber after all.</p>
<br />Posted in Silverlight, Visual Studio Tagged: Silverlight, Visual Studio 2010 <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/spsexton.wordpress.com/1012/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/spsexton.wordpress.com/1012/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/spsexton.wordpress.com/1012/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/spsexton.wordpress.com/1012/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/spsexton.wordpress.com/1012/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/spsexton.wordpress.com/1012/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/spsexton.wordpress.com/1012/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/spsexton.wordpress.com/1012/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/spsexton.wordpress.com/1012/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/spsexton.wordpress.com/1012/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=1012&subd=spsexton&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://stuff.seans.com/2009/07/02/silverlight-gets-full-fledged-designer-support-in-visual-studio-2010/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8922e4d5254d602ba3ed32dd073b5a4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">spsexton</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/07/sldes-001.jpg" medium="image">
			<media:title type="html">Preview Pane</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/07/sldes-002.jpg" medium="image">
			<media:title type="html">No Property Editing</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/07/sldes-003.jpg" medium="image">
			<media:title type="html">Drag Into XAML</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/07/sldes-004.jpg" medium="image">
			<media:title type="html">Intellisense in XAML</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/07/sldes-005.jpg" medium="image">
			<media:title type="html">Silverlight Design Surface</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/07/sldes-006.jpg" medium="image">
			<media:title type="html">Property Window</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/07/sldes-007.jpg" medium="image">
			<media:title type="html">Event Properties</media:title>
		</media:content>
	</item>
		<item>
		<title>Installing Silverlight 3 with Visual Studio 2010 &#8211; Step by Step</title>
		<link>http://stuff.seans.com/2009/06/30/installing-silverlight-3-with-visual-studio-2010-step-by-step/</link>
		<comments>http://stuff.seans.com/2009/06/30/installing-silverlight-3-with-visual-studio-2010-step-by-step/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 18:01:26 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Silverlight 3]]></category>
		<category><![CDATA[Visual Studio 2010]]></category>

		<guid isPermaLink="false">http://stuff.seans.com/?p=986</guid>
		<description><![CDATA[A beta version of Silverlight 3 was released at MIX09 in March.  Since a beta version of Visual Studio 2010 was also just released&#8211;in May&#8211;it makes sense to set up a Silverlight 3 and Visual Studio 2010 development environment.  My last post included screenshots of the installation process for Visual Studio 2010.  This post will [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=986&subd=spsexton&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>A beta version of Silverlight 3 was released at MIX09 in March.  Since a beta version of Visual Studio 2010 was also just released&#8211;in May&#8211;it makes sense to set up a Silverlight 3 and Visual Studio 2010 development environment.  My <a href="http://stuff.seans.com/2009/06/29/visual-studio-2010-install-screenshots/" target="_blank">last post</a> included screenshots of the installation process for Visual Studio 2010.  This post will cover installing the remaining bits needed for a Silverlight 3 development environment.</p>
<p>Note: Also take a look at the official <a href="http://silverlight.net/getstarted/silverlight3/default.aspx" target="_blank">Getting Started page for Silverlight 3</a>.</p>
<p>This post will describe installing Silverlight 3 bits on top of a clean Windows 7 / Visual Studio 2010 environment.  I won&#8217;t install the Silverlight 2 components, so the resulting environment will be targeted exclusively at Silverlight 3.</p>
<p>At the moment, the Silverlight 3 beta is targeted at Visual Studio 2008 SP1, rather than Visual Studio 2010.  (See <a href="http://timheuer.com/blog/archive/2009/05/20/silverlight-and-visual-studio-2010-beta.aspx" target="_blank">Tim Heuer&#8217;s blog post</a> explaining this).  What this means is that we can&#8217;t just run the Silverlight 3 Tools installer.  If you try, you&#8217;ll get the following error.</p>
<p><a href="http://spsexton.files.wordpress.com/2009/06/sl3vs2010-001.jpg"><img class="alignnone size-full wp-image-988" title="Can't Install on VS 2010" src="http://spsexton.files.wordpress.com/2009/06/sl3vs2010-001.jpg?w=544&#038;h=470" alt="Can't Install on VS 2010" width="544" height="470" /></a></p>
<p><span style="text-decoration:underline;"><strong>Installing the Silverlight 3 Beta SDK</strong></span></p>
<p>Instead, you&#8217;ll need to just install the <a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=d09b6ecf-9a45-4d99-b752-2a330a937bc4" target="_blank">Silverlight 3 Beta SDK</a> manually.  Once you download the SDK installer and launch it, you&#8217;ll get the following screen:</p>
<p><a href="http://spsexton.files.wordpress.com/2009/06/sl3vs2010-002.jpg"><img class="alignnone size-full wp-image-990" title="SDK Welcome" src="http://spsexton.files.wordpress.com/2009/06/sl3vs2010-002.jpg?w=509&#038;h=389" alt="SDK Welcome" width="509" height="389" /></a></p>
<p>Then you get a license dialog.  Note the comment about this beta license expiring 30 days after the commercial release of Silverlight 3, but no later than 30 Sep, 2009.  Does this imply that we&#8217;ll see a final release of Silverlight 3 by 30 Aug, 2009?</p>
<p><a href="http://spsexton.files.wordpress.com/2009/06/sl3vs2010-003.jpg"><img class="alignnone size-full wp-image-991" title="License Dialog" src="http://spsexton.files.wordpress.com/2009/06/sl3vs2010-003.jpg?w=510&#038;h=387" alt="License Dialog" width="510" height="387" /></a></p>
<p>If you do a custom install, you&#8217;ll see the following features and components listed:</p>
<p><a href="http://spsexton.files.wordpress.com/2009/06/sl3vs2010-004.jpg"><img class="alignnone size-full wp-image-992" title="Custom Install" src="http://spsexton.files.wordpress.com/2009/06/sl3vs2010-004.jpg?w=506&#038;h=385" alt="Custom Install" width="506" height="385" /></a></p>
<p>Here&#8217;s a quick summary of what is being installed:</p>
<ul>
<li>Silverlight Tools &#8211; Components needed for building Silverlight applications
<ul>
<li>The core Silverlight DLLs, e.g. agcore.dll, coreclr.dll, et al</li>
</ul>
</li>
<li>Build Components &#8211; Components used to build Silverlight projects
<ul>
<li>Microsoft.Silverlight.Build.Tasks.dll,  et al</li>
</ul>
</li>
<li>Client Libraries &#8211; Silverlight Client Libraries and Controls
<ul>
<li>System.Xml.Serialization.dll, System.Xml.Linq.dll, System.Windows.Controls.Navigation, et al</li>
</ul>
</li>
<li>Server Libraries &#8211; Silverlight Server Libraries and Controls
<ul>
<li>System.Web.Silverlight.dll, et al</li>
</ul>
</li>
</ul>
<p>Now we&#8217;re ready to install:</p>
<p><a href="http://spsexton.files.wordpress.com/2009/06/sl3vs2010-005.jpg"><img class="alignnone size-full wp-image-993" title="Ready to Install" src="http://spsexton.files.wordpress.com/2009/06/sl3vs2010-005.jpg?w=506&#038;h=386" alt="Ready to Install" width="506" height="386" /></a></p>
<p>Install continues:</p>
<p><a href="http://spsexton.files.wordpress.com/2009/06/sl3vs2010-006.jpg"><img class="alignnone size-full wp-image-994" title="Installing" src="http://spsexton.files.wordpress.com/2009/06/sl3vs2010-006.jpg?w=510&#038;h=388" alt="Installing" width="510" height="388" /></a></p>
<p>The install completes, and a dialog reminds us that the actual Silverlight 3 Beta runtime is not yet present.  (Actually, there is an error in this dialog &#8212; it&#8217;s reminding us that the Silverlight 2 runtime is not present).</p>
<p><a href="http://spsexton.files.wordpress.com/2009/06/sl3vs2010-007.jpg"><img class="alignnone size-full wp-image-995" title="SDK Done" src="http://spsexton.files.wordpress.com/2009/06/sl3vs2010-007.jpg?w=506&#038;h=385" alt="SDK Done" width="506" height="385" /></a></p>
<p><span style="text-decoration:underline;"><strong>Installing the Silverlight 3 Developer Runtime</strong></span></p>
<p>Now we need to install the actual Silverlight 3 runtime, which you can download from <a href="http://go.microsoft.com/fwlink/?LinkID=143433" target="_blank">here</a>.</p>
<p>We start with the familiar Silverlight install splash screen (now branded as Silverlight 3 for Developers).</p>
<p><a href="http://spsexton.files.wordpress.com/2009/06/sl3vs2010-008.jpg"><img class="alignnone size-full wp-image-996" title="For Devs" src="http://spsexton.files.wordpress.com/2009/06/sl3vs2010-008.jpg?w=508&#038;h=238" alt="For Devs" width="508" height="238" /></a></p>
<p>Off we go..</p>
<p><a href="http://spsexton.files.wordpress.com/2009/06/sl3vs2010-009.jpg"><img class="alignnone size-full wp-image-997" title="Installing Runtime" src="http://spsexton.files.wordpress.com/2009/06/sl3vs2010-009.jpg?w=510&#038;h=237" alt="Installing Runtime" width="510" height="237" /></a></p>
<p>The runtime install completes quickly.</p>
<p><a href="http://spsexton.files.wordpress.com/2009/06/sl3vs2010-010.jpg"><img class="alignnone size-full wp-image-998" title="Runtime Installed" src="http://spsexton.files.wordpress.com/2009/06/sl3vs2010-010.jpg?w=514&#038;h=241" alt="Runtime Installed" width="514" height="241" /></a></p>
<p>Pretty simple.  You now have all of the important stuff that you need for developing Silverlight 3 applications with Visual Studio.</p>
<p><span style="text-decoration:underline;"><strong>Building a Silverlight Application with Visual Studio 2010</strong></span></p>
<p>When you bring up the New Project wizard in Visual Studio, you&#8217;ll see two types of Silverlight projects listed:</p>
<ul>
<li>Silverlight Application</li>
<li>Silverlight Class Library</li>
</ul>
<p><a href="http://spsexton.files.wordpress.com/2009/06/sl3vs2010-011.jpg"><img class="alignnone size-full wp-image-999" title="New Project" src="http://spsexton.files.wordpress.com/2009/06/sl3vs2010-011.jpg?w=957&#038;h=663" alt="New Project" width="957" height="663" /></a></p>
<p>If you create a new Silverlight Application, you&#8217;ll see the <strong>Add Silverlight Application</strong> dialog.  But notice that there is now a dropdown labeled <strong>Silverlight Version</strong>.  This defaults to Silverlight 2.0, but you can select Silverlight v3.0 to create a Silverlight 3 application.</p>
<p><a href="http://spsexton.files.wordpress.com/2009/06/sl3vs2010-0121.jpg"><img class="alignnone size-full wp-image-1002" title="Create Silverlight 3 Application" src="http://spsexton.files.wordpress.com/2009/06/sl3vs2010-0121.jpg?w=460&#038;h=423" alt="Create Silverlight 3 Application" width="460" height="423" /></a></p>
<p>You&#8217;ll see a similar dialog if you try to create a <strong>Silverlight Class Library</strong>.</p>
<p><a href="http://spsexton.files.wordpress.com/2009/06/sl3vs2010-013.jpg"><img class="alignnone size-full wp-image-1003" title="Create Silverlight Class Library" src="http://spsexton.files.wordpress.com/2009/06/sl3vs2010-013.jpg?w=444&#038;h=145" alt="Create Silverlight Class Library" width="444" height="145" /></a></p>
<p><span style="text-decoration:underline;"><strong>The Silverlight Navigation Application</strong></span></p>
<p>But notice that there is one Visual Studio template that shows up if you install Silverlight 3 Beta in Visual Studio 2008 SP1 that does <strong>not</strong> show up in Visual Studio 2010 &#8212; the <strong>Silverlight Navigation Application</strong>.  This is installed as part of the Silverlight 3 Tools installer, which we were unable to run.</p>
<p>We need to pull this particular template from Visual Studio 2008 SP1 into Visual Studio 2010.  To do this, install the <a href="http://go.microsoft.com/fwlink/?LinkID=143571" target="_blank">Silverlight 3 Tools</a> installer on a machine that is running Visual Studio 2008 SP1.  Then fire up Visual Studio 2008, create a Silverlight Navigation Application project, and select <strong>Export Template</strong> from the <strong>File</strong> menu.</p>
<p><a href="http://spsexton.files.wordpress.com/2009/06/sl3vs2010-014.jpg"><img class="alignnone size-full wp-image-1004" title="Export Template" src="http://spsexton.files.wordpress.com/2009/06/sl3vs2010-014.jpg?w=301&#038;h=456" alt="Export Template" width="301" height="456" /></a></p>
<p>You&#8217;ll see a dialog asking you to select the project to export a template for.  We&#8217;ll select the main navigation application.</p>
<p><a href="http://spsexton.files.wordpress.com/2009/06/sl3vs2010-015.jpg"><img class="alignnone size-full wp-image-1005" title="Export Template" src="http://spsexton.files.wordpress.com/2009/06/sl3vs2010-015.jpg?w=612&#038;h=538" alt="Export Template" width="612" height="538" /></a></p>
<p>You can also give the new template a description and select an icon.</p>
<p><a href="http://spsexton.files.wordpress.com/2009/06/sl3vs2010-016.jpg"><img class="alignnone size-full wp-image-1006" title="Template Part II" src="http://spsexton.files.wordpress.com/2009/06/sl3vs2010-016.jpg?w=612&#038;h=536" alt="Template Part II" width="612" height="536" /></a></p>
<p>When you&#8217;re done, a new Windows Explorer window will pop up, containing a .zip file for your new template.  Now copy this .zip file to the following directory on your Visual Studio 2010 machine:</p>
<p style="padding-left:30px;">C:\Users\myname\Documents\Visual Studio 10\Templates\ProjectTemplates\Visual C#</p>
<p>Now when you bring up the <strong>New Project</strong> wizard in Visual Studio 2010, you&#8217;ll see a new template that you can use to create a <strong>Silverlight Navigation Application</strong>.</p>
<p><a href="http://spsexton.files.wordpress.com/2009/06/sl3vs2010-017.jpg"><img class="alignnone size-full wp-image-1007" title="New Template in Action" src="http://spsexton.files.wordpress.com/2009/06/sl3vs2010-017.jpg?w=718&#038;h=518" alt="New Template in Action" width="718" height="518" /></a></p>
<p><span style="text-decoration:underline;"><strong>Wrapping Up</strong></span></p>
<p>That<strong> </strong>should do it &#8212; you now have a fully functional Silverlight 3 / Visual Studio 2010 environment.</p>
<p>Technorati tags: <a href="http://technorati.com/tags/silverlight" target="_blank">Silverlight</a>, <a href="http://technorati.com/tags/silverlight+3" target="_blank">Silverlight 3</a>, <a href="http://technorati.com/tags/visual+studio+2010" target="_blank">Visual Studio 2010</a></p>
<br />Posted in Silverlight, Visual Studio Tagged: Silverlight 3, Visual Studio 2010 <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/spsexton.wordpress.com/986/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/spsexton.wordpress.com/986/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/spsexton.wordpress.com/986/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/spsexton.wordpress.com/986/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/spsexton.wordpress.com/986/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/spsexton.wordpress.com/986/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/spsexton.wordpress.com/986/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/spsexton.wordpress.com/986/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/spsexton.wordpress.com/986/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/spsexton.wordpress.com/986/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=986&subd=spsexton&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://stuff.seans.com/2009/06/30/installing-silverlight-3-with-visual-studio-2010-step-by-step/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8922e4d5254d602ba3ed32dd073b5a4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">spsexton</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/06/sl3vs2010-001.jpg" medium="image">
			<media:title type="html">Can't Install on VS 2010</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/06/sl3vs2010-002.jpg" medium="image">
			<media:title type="html">SDK Welcome</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/06/sl3vs2010-003.jpg" medium="image">
			<media:title type="html">License Dialog</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/06/sl3vs2010-004.jpg" medium="image">
			<media:title type="html">Custom Install</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/06/sl3vs2010-005.jpg" medium="image">
			<media:title type="html">Ready to Install</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/06/sl3vs2010-006.jpg" medium="image">
			<media:title type="html">Installing</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/06/sl3vs2010-007.jpg" medium="image">
			<media:title type="html">SDK Done</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/06/sl3vs2010-008.jpg" medium="image">
			<media:title type="html">For Devs</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/06/sl3vs2010-009.jpg" medium="image">
			<media:title type="html">Installing Runtime</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/06/sl3vs2010-010.jpg" medium="image">
			<media:title type="html">Runtime Installed</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/06/sl3vs2010-011.jpg" medium="image">
			<media:title type="html">New Project</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/06/sl3vs2010-0121.jpg" medium="image">
			<media:title type="html">Create Silverlight 3 Application</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/06/sl3vs2010-013.jpg" medium="image">
			<media:title type="html">Create Silverlight Class Library</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/06/sl3vs2010-014.jpg" medium="image">
			<media:title type="html">Export Template</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/06/sl3vs2010-015.jpg" medium="image">
			<media:title type="html">Export Template</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/06/sl3vs2010-016.jpg" medium="image">
			<media:title type="html">Template Part II</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/06/sl3vs2010-017.jpg" medium="image">
			<media:title type="html">New Template in Action</media:title>
		</media:content>
	</item>
		<item>
		<title>Visual Studio 2010 Install Screenshots</title>
		<link>http://stuff.seans.com/2009/06/29/visual-studio-2010-install-screenshots/</link>
		<comments>http://stuff.seans.com/2009/06/29/visual-studio-2010-install-screenshots/#comments</comments>
		<pubDate>Mon, 29 Jun 2009 17:57:44 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[Visual Studio 2010]]></category>

		<guid isPermaLink="false">http://stuff.seans.com/?p=961</guid>
		<description><![CDATA[Beta 1 of Visual Studio is now available on MSDN.  (If you have the appropriate MSDN subscription).  Here is a complete set of screenshots, outlining the installation experience.
Note: I installed VS 2010 Beta 1 on a clean virtual machine running Windows 7 Build 7100 (RC).
We start with the familiar install startup menu:

Then we get a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=961&subd=spsexton&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>Beta 1 of Visual Studio is now available on MSDN.  (If you have the appropriate MSDN subscription).  Here is a complete set of screenshots, outlining the installation experience.</p>
<p>Note: I installed VS 2010 Beta 1 on a clean virtual machine running Windows 7 Build 7100 (RC).</p>
<p>We start with the familiar install startup menu:</p>
<p><a href="http://spsexton.files.wordpress.com/2009/06/vs10-001.jpg"><img class="alignnone size-full wp-image-962" title="First screen" src="http://spsexton.files.wordpress.com/2009/06/vs10-001.jpg?w=502&#038;h=406" alt="First screen" width="502" height="406" /></a></p>
<p>Then we get a banner page, as things start up.</p>
<p><a href="http://spsexton.files.wordpress.com/2009/06/vs10-002.jpg"><img class="alignnone size-full wp-image-963" title="Install Banner" src="http://spsexton.files.wordpress.com/2009/06/vs10-002.jpg?w=761&#038;h=582" alt="Install Banner" width="761" height="582" /></a></p>
<p>Next, we get a license page, as well as an overview of what is going to be installed.  The key components are:</p>
<ul>
<li>VC 9.0 and 10.0 runtime libraries</li>
<li>.NET Framework 4 Beta 1    (<a href="http://msdn.microsoft.com/en-us/library/w0x726c2(VS.100).aspx" target="_blank">more info</a>)</li>
<li>Help 3.0 Beta 1    (<a href="http://helpware.net/mshelp3/h3intro.htm" target="_blank">more info</a>)</li>
<li>Visual Studio Macro Tools</li>
<li>Visual Studio 2010 Professional Beta 1    (<a href="http://msdn.microsoft.com/en-us/vstudio/dd582936.aspx" target="_blank">more info</a>)</li>
</ul>
<p><a href="http://spsexton.files.wordpress.com/2009/06/vs10-003.jpg"><img class="alignnone size-full wp-image-964" title="License Page" src="http://spsexton.files.wordpress.com/2009/06/vs10-003.jpg?w=762&#038;h=579" alt="License Page" width="762" height="579" /></a></p>
<p>Next up is an options page:</p>
<p><a href="http://spsexton.files.wordpress.com/2009/06/vs10-004.jpg"><img class="alignnone size-full wp-image-965" title="Options Page" src="http://spsexton.files.wordpress.com/2009/06/vs10-004.jpg?w=759&#038;h=581" alt="Options Page" width="759" height="581" /></a></p>
<p>Now the actual installation begins and we can see a more complete list of all the components that will be installed.  For completeness, here&#8217;s the full list:</p>
<ul>
<li>VC 9.0 Runtime</li>
<li>VC 10.0 Runtime</li>
<li>Microsoft .NET Framework 4 Beta 1</li>
<li>Microsoft Help 3.0 Beta 1</li>
<li>Microsoft Visual Studio Macro Tools</li>
<li>Microsoft Visual Studio 2010 Professional Beta 1</li>
<li>Microsoft Web Deployment Tool</li>
<li>Visual Studio Tools for the Office System 4.0 Runtime</li>
<li>Microsoft Office Development Tools for Visual Studio 2010</li>
<li>Dotfuscator Software Services &#8211; Community Edition</li>
<li>Microsoft SQL Server Compact 3.5 SP1</li>
<li>SQL Server Compact Tools for Visual Studio 2010 Beta 1</li>
<li>Microsoft Sync Framework Runtime v1.0</li>
<li>Microsoft Sync Services for ADO.NET v2.0</li>
<li>Microsoft Sync Framework Services v1.0</li>
<li>Microsoft Sync Framework SDK v1.0</li>
<li>Microsoft SQL Publishing Wizard 1.4</li>
<li>SQL Server System CLR Types</li>
<li>Shared Management Objects</li>
<li>Microsoft SQL Server 2008 Express Edition</li>
</ul>
<p>Wow.  This is going to take a while.</p>
<p><a href="http://spsexton.files.wordpress.com/2009/06/vs10-005.jpg"><img class="alignnone size-full wp-image-966" title="Installation Begins" src="http://spsexton.files.wordpress.com/2009/06/vs10-005.jpg?w=761&#038;h=582" alt="Installation Begins" width="761" height="582" /></a></p>
<p>You&#8217;ll have to reboot after the .NET Framework 4 installation.</p>
<p><a href="http://spsexton.files.wordpress.com/2009/06/vs10-006.jpg"><img class="alignnone size-full wp-image-967" title="Reboot Required" src="http://spsexton.files.wordpress.com/2009/06/vs10-006.jpg?w=757&#038;h=582" alt="Reboot Required" width="757" height="582" /></a></p>
<p>Go get a cup of coffee while the remaining components install..</p>
<p><a href="http://spsexton.files.wordpress.com/2009/06/vs10-0072.jpg"><img class="alignnone size-full wp-image-972" title="Coffee Break" src="http://spsexton.files.wordpress.com/2009/06/vs10-0072.jpg?w=758&#038;h=581" alt="Coffee Break" width="758" height="581" /></a></p>
<p>You&#8217;ll get a warning dialog, indicating that SQL Server 2008 has compatibility issues on Windows 7 and suggesting that you install SP1.</p>
<p><a href="http://spsexton.files.wordpress.com/2009/06/vs10-008.jpg"><img class="alignnone size-full wp-image-973" title="Compatibility" src="http://spsexton.files.wordpress.com/2009/06/vs10-008.jpg?w=758&#038;h=580" alt="Compatibility" width="758" height="580" /></a></p>
<p>I just clicked the <strong>Run Program</strong> button and proceeded with the install.  A little bit later, I got a second compatibility warning dialog, also mentioning SQL Server 2008.  An external DOS window was also spawned, running a setup.exe command.</p>
<p><a href="http://spsexton.files.wordpress.com/2009/06/vs10-009.jpg"><img class="alignnone size-full wp-image-975" title="Compatibility #2" src="http://spsexton.files.wordpress.com/2009/06/vs10-009.jpg?w=762&#038;h=581" alt="Compatibility #2" width="762" height="581" /></a></p>
<p>Finally, everything finishes up and we&#8217;re done!</p>
<p><a href="http://spsexton.files.wordpress.com/2009/06/vs10-010.jpg"><img class="alignnone size-full wp-image-976" title="Installation Complete" src="http://spsexton.files.wordpress.com/2009/06/vs10-010.jpg?w=761&#038;h=583" alt="Installation Complete" width="761" height="583" /></a></p>
<p>After the install completes, we get the main autorun window again and the link for checking for service releases is now active.</p>
<p><a href="http://spsexton.files.wordpress.com/2009/06/vs10-011.jpg"><img class="alignnone size-full wp-image-977" title="Autorun #2" src="http://spsexton.files.wordpress.com/2009/06/vs10-011.jpg?w=507&#038;h=409" alt="Autorun #2" width="507" height="409" /></a></p>
<p>If you click the <strong>Check for Service Releases</strong> link, you&#8217;ll be redirected to an update web page, which in turn allows firing up the Windows Update applet.  When I tried this (29 Jun 2009), no updates were found.</p>
<p>Finally, we bring up Visual Studio 2010 for the first time.</p>
<p><a href="http://spsexton.files.wordpress.com/2009/06/vs10-012.jpg"><img class="alignnone size-full wp-image-978" title="Splash Screen" src="http://spsexton.files.wordpress.com/2009/06/vs10-012.jpg?w=543&#038;h=330" alt="Splash Screen" width="543" height="330" /></a></p>
<p>As with earlier versions, when you start Visual Studio for the first time, you&#8217;re asked to choose a language, which dictates how the environment is set up.  I&#8217;m a C# guy.</p>
<p>When things finally start up, we see the new Start Page for the first time.</p>
<p><a href="http://spsexton.files.wordpress.com/2009/06/vs10-013.jpg"><img class="alignnone size-full wp-image-979" title="Start Page" src="http://spsexton.files.wordpress.com/2009/06/vs10-013.jpg?w=1024&#038;h=789" alt="Start Page" width="1024" height="789" /></a></p>
<p>The <strong>New Project</strong> dialog also gets a fresh look.</p>
<p><a href="http://spsexton.files.wordpress.com/2009/06/vs10-014.jpg"><img class="alignnone size-full wp-image-980" title="New Project" src="http://spsexton.files.wordpress.com/2009/06/vs10-014.jpg?w=962&#038;h=667" alt="New Project" width="962" height="667" /></a></p>
<p>Finally, we create an empty WPF Application.</p>
<p><a href="http://spsexton.files.wordpress.com/2009/06/vs10-015.jpg"><img class="alignnone size-full wp-image-981" title="WPF Application" src="http://spsexton.files.wordpress.com/2009/06/vs10-015.jpg?w=1024&#038;h=788" alt="WPF Application" width="1024" height="788" /></a></p>
<br />Posted in Visual Studio Tagged: .NET, Visual Studio, Visual Studio 2010 <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/spsexton.wordpress.com/961/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/spsexton.wordpress.com/961/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/spsexton.wordpress.com/961/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/spsexton.wordpress.com/961/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/spsexton.wordpress.com/961/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/spsexton.wordpress.com/961/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/spsexton.wordpress.com/961/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/spsexton.wordpress.com/961/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/spsexton.wordpress.com/961/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/spsexton.wordpress.com/961/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=961&subd=spsexton&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://stuff.seans.com/2009/06/29/visual-studio-2010-install-screenshots/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8922e4d5254d602ba3ed32dd073b5a4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">spsexton</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/06/vs10-001.jpg" medium="image">
			<media:title type="html">First screen</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/06/vs10-002.jpg" medium="image">
			<media:title type="html">Install Banner</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/06/vs10-003.jpg" medium="image">
			<media:title type="html">License Page</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/06/vs10-004.jpg" medium="image">
			<media:title type="html">Options Page</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/06/vs10-005.jpg" medium="image">
			<media:title type="html">Installation Begins</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/06/vs10-006.jpg" medium="image">
			<media:title type="html">Reboot Required</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/06/vs10-0072.jpg" medium="image">
			<media:title type="html">Coffee Break</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/06/vs10-008.jpg" medium="image">
			<media:title type="html">Compatibility</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/06/vs10-009.jpg" medium="image">
			<media:title type="html">Compatibility #2</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/06/vs10-010.jpg" medium="image">
			<media:title type="html">Installation Complete</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/06/vs10-011.jpg" medium="image">
			<media:title type="html">Autorun #2</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/06/vs10-012.jpg" medium="image">
			<media:title type="html">Splash Screen</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/06/vs10-013.jpg" medium="image">
			<media:title type="html">Start Page</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/06/vs10-014.jpg" medium="image">
			<media:title type="html">New Project</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/06/vs10-015.jpg" medium="image">
			<media:title type="html">WPF Application</media:title>
		</media:content>
	</item>
		<item>
		<title>Quick Tip &#8211; Making Windows on 2nd Monitor Visible</title>
		<link>http://stuff.seans.com/2009/06/08/quick-tip-making-windows-on-2nd-monitor-visible/</link>
		<comments>http://stuff.seans.com/2009/06/08/quick-tip-making-windows-on-2nd-monitor-visible/#comments</comments>
		<pubDate>Mon, 08 Jun 2009 17:00:20 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[Windows]]></category>
		<category><![CDATA[Second monitor]]></category>
		<category><![CDATA[Window not visible]]></category>

		<guid isPermaLink="false">http://stuff.seans.com/?p=954</guid>
		<description><![CDATA[I&#8217;m a big believer in using two (or even three) monitors on my main development machine.  I have two monitors on my home development machine (24&#8243; Dell and 22&#8243; off-brand) and having the extra real estate of that second monitor is invaluable.  I use it often, putting different applications over on the 2nd monitor and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=954&subd=spsexton&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m a big believer in using two (or even three) monitors on my main development machine.  I have two monitors on my home development machine (24&#8243; Dell and 22&#8243; off-brand) and having the extra real estate of that second monitor is invaluable.  I use it often, putting different applications over on the 2nd monitor and then dragging-dropping work/files between the monitors.</p>
<p>But I have a slight problem when I remote into my home machine from work.  Windows 7 supports mapping multiple monitors on the remote machine to multiple monitors on the local machine.  But at work, I just use a single monitor.  So I only see the windows that are being shown on the main monitor of my home machine.</p>
<p>The problem arises when I click on an icon in the taskbar to see a window and it doesn&#8217;t show up&#8211;because it exists on my second monitor.  Because I&#8217;m only seeing my main monitor, I don&#8217;t see the application&#8217;s window and can&#8217;t click on it.</p>
<p>The fix is simple.  Do the following:</p>
<ul>
<li>Left-click on the application&#8217;s icon in the taskbar, to make it active</li>
<li>Right-click on the icon in the taskbar and select Move</li>
<li>Click one of the arrow keys once (it doesn&#8217;t matter which)</li>
<li>Now move your mouse&#8211;you&#8217;ll see an outline of the application appear on the screen and you can place it where you like</li>
</ul>
<p>This works on both Windows XP and Windows Vista.  Windows placement in Windows 7 works a bit differently, so I&#8217;m not exactly sure the best way to do this in 7.</p>
<br />Posted in Windows Tagged: Second monitor, Window not visible, Windows <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/spsexton.wordpress.com/954/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/spsexton.wordpress.com/954/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/spsexton.wordpress.com/954/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/spsexton.wordpress.com/954/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/spsexton.wordpress.com/954/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/spsexton.wordpress.com/954/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/spsexton.wordpress.com/954/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/spsexton.wordpress.com/954/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/spsexton.wordpress.com/954/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/spsexton.wordpress.com/954/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=954&subd=spsexton&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://stuff.seans.com/2009/06/08/quick-tip-making-windows-on-2nd-monitor-visible/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8922e4d5254d602ba3ed32dd073b5a4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">spsexton</media:title>
		</media:content>
	</item>
		<item>
		<title>.NET Basics &#8211; Do Work in Background Thread to Keep GUI Responsive</title>
		<link>http://stuff.seans.com/2009/05/21/net-basics-do-work-in-background-thread-to-keep-gui-responsive/</link>
		<comments>http://stuff.seans.com/2009/05/21/net-basics-do-work-in-background-thread-to-keep-gui-responsive/#comments</comments>
		<pubDate>Thu, 21 May 2009 17:45:22 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Asynchronous]]></category>
		<category><![CDATA[Background Thread]]></category>
		<category><![CDATA[BackgroundWorker]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Cancel Button]]></category>
		<category><![CDATA[Publish-Subscribe]]></category>

		<guid isPermaLink="false">http://stuff.seans.com/?p=893</guid>
		<description><![CDATA[One of the most important things that differentiates a &#8220;quick and dirty&#8221; application from one that has been designed well is how the application&#8217;s user interface behaves during lengthy operations.  The quick-and-dirty approach is to just do all of your work in a button&#8217;s Click event handler and not worry about the user interface.  The [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=893&subd=spsexton&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>One of the most important things that differentiates a &#8220;quick and dirty&#8221; application from one that has been designed well is how the application&#8217;s user interface behaves during lengthy operations.  The quick-and-dirty approach is to just do all of your work in a button&#8217;s Click event handler and not worry about the user interface.  The problem with this is that the GUI will freeze up while the application does whatever work it needs to do.</p>
<p>A well designed application, on the other hand, is one that is careful to do as much work as possible in background threads, keeping the GUI responsive and making sure that it makes it obvious to the user that work is going on in the background and adjusts the GUI to disallow any user actions that don&#8217;t apply until after the work finishes.</p>
<p>Under .NET 2.0, doing work on a background thread has become a lot easier, with the introduction of the <strong>BackgroundWorker</strong> class.  You no longer have to worry about cross-threading exceptions and checking a control&#8217;s <strong>InvokeRequired</strong> property.</p>
<h2>A Simple Example of Using the BackgroundWorker Class</h2>
<p>In this post, I&#8217;ll create a simple example of how you might use the <strong>BackgroundWorker </strong>class to do some work on a background thread and keep your GUI responsive.  We&#8217;ll start with a simple example that demonstrates how the GUI can become blocked and then evolve the application to make full use of the capabilities of the <strong>BackgroundWorker</strong> class.</p>
<p>Here are the basic players.  We&#8217;ll have a <strong>FileReader</strong> class/object that reads text from a text file.  And a Win Forms form with a button to initiate the file read operation and some GUI elements to display the status/results of the read operation.</p>
<p>Note: All code samples presented here can be found in CodePlex, at <a href="http://threadsafepubsub.codeplex.com/" target="_blank">threadsafepubsub.codeplex.com</a></p>
<h2>Iteration #1 &#8211; The Simplest Possible Solution</h2>
<p>Let&#8217;s say that we just want to read a text file and return/display the number of lines found in the file.  We can just make a call to our <strong>FileReader</strong> object, which returns the number of lines, and then display that number in our UI.  Super simple.</p>
<p>This iteration is implemented in the files <strong>Form1.cs</strong> and <strong>FileReader1.cs</strong>.</p>
<p>Here&#8217;s what the GUI looks like.  If you click on the <strong>Read File</strong> button, you get a File Open dialog where you can select a file to read.  The file is read in and then we write out the # lines read, below the button.</p>
<p><a href="http://spsexton.files.wordpress.com/2009/05/001-iter1client1.jpg"><img class="alignnone size-full wp-image-897" title="001-Iter1Client" src="http://spsexton.files.wordpress.com/2009/05/001-iter1client1.jpg?w=339&#038;h=195" alt="001-Iter1Client" width="339" height="195" /></a></p>
<p>So far, so good.  This is how most simple user interfaces are written&#8211;you click on a button, which launches a Click callback, which does some work, and then returns to the caller.</p>
<p>Here&#8217;s what the <strong>FileReader1</strong> class looks like, with a simple <strong>ReadTheFile</strong> method:</p>
<pre class="brush: csharp;">
using System;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;

namespace ThreadSafePubSubUI
{
    public class FileReader1
    {
        // Read specified text file &amp; return # lines
        public int ReadTheFile(string fileName)
        {
            int numLines = 0;

            using (StreamReader sr = new StreamReader(fileName))
            {
                string nextLine;
                while ((nextLine = sr.ReadLine()) != null)
                {
                    numLines++;
                }
            }

            return numLines;
        }
    }
}
</pre>
<p>And here&#8217;s the click event handler for the form: the guy that invokes <strong>ReadTheFile</strong>.</p>
<pre class="brush: csharp;">
        private void btnSelect_Click(object sender, EventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();
            ofd.CheckFileExists = true;
            ofd.CheckPathExists = true;

            if (ofd.ShowDialog() == DialogResult.OK)
            {
                FileReader1 fr = new FileReader1();
                int numLines = fr.ReadTheFile(ofd.FileName);

                lblResults.Text = string.Format(&quot;We read {0} lines&quot;, numLines.ToString());
            }
        }
</pre>
<p>But what if the function that does the work takes a longer amount of time?  It&#8217;s pretty common for some action initiated by the user to take a little time.  What happens to the GUI while they are waiting?  We can simulate this by just adding a <strong>Thread.Sleep</strong> call in the <strong>ReadTheFile</strong> method.</p>
<pre class="brush: csharp;">
            Thread.Sleep(3000);     // Simulate lengthy operation
</pre>
<p>Let&#8217;s also add a line in the <strong>btnSelect_Click</strong> method, to write a &#8220;busy&#8221; message to the GUI while we are processing.  Here is the updated click event handler:</p>
<pre class="brush: csharp;">
        private void btnSelect_Click(object sender, EventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();
            ofd.CheckFileExists = true;
            ofd.CheckPathExists = true;

            if (ofd.ShowDialog() == DialogResult.OK)
            {
                lblResults.Text = &quot; ... reading the file ...&quot;;
                FileReader1 fr = new FileReader1();
                int numLines = fr.ReadTheFile(ofd.FileName);

                lblResults.Text = string.Format(&quot;We read {0} lines&quot;, numLines.ToString());
            }
        }
</pre>
<p>What happens is not good.  Two bad things happen, from a user&#8217;s point of view:</p>
<ul>
<li>The user interface is completely unresponsive during the file read operation</li>
<li>Our &#8220;reading the file&#8221; message is not displayed</li>
</ul>
<p>What happened?  Well, because <em>everything is on one thread</em>, our user interface thread doesn&#8217;t respond to mouse clicks until <strong>ReadTheFile</strong> finishes.  Worse, even though we set the label&#8217;s Text property <em>before</em> we call <strong>ReadTheFile</strong>, the message loop doesn&#8217;t get a chance to process that change, and update the text, before we go out to lunch in <strong>ReadTheFile</strong>.</p>
<p>What we need to do to fix this is: <em>do the file read operation on a different thread</em></p>
<p>The easiest way to do some work on a background thread, keeping the GUI responsive, is to use the <strong>BackgroundWorker</strong> class.</p>
<h2>Iteration #2 &#8211; Using the BackgroundWorker Class</h2>
<p>You should be doing very little actual work in GUI control event handlers like the Button.Click method.  It&#8217;s a good idea to:</p>
<ul>
<li>Move code that does actual work outside of the user interface class</li>
<li>Do all work on a background thread.</li>
</ul>
<p>We want to move code into a separate library or class, rather than having it in our Click event handler, to keep our user interface code separate from our functional code.  This is just a cleaner architecture and makes our code more maintainable, easier to test, and more extensible.</p>
<p>We also want to do as much work as possible on a different thread from the main thread handling the GUI.  If you do your work on the same thread, you risk locking up the user interface.  (As we saw in Iteration #1).</p>
<p>If you&#8217;re using the .NET Framework version 2.0 or later, the best way to do work on a background thread is to use the <strong>BackgroundWorker</strong> class.  This class gives us the ability to do some work on a background thread, provides progress and completed events &#8220;out of the box&#8221; and also ensures that these callbacks execute on the correct (GUI thread).</p>
<p>What do I mean by &#8220;execute on the correct thread&#8221;?  Here&#8217;s how it works.  To ensure that the GUI stays responsive, we want to do any non-trivial work on a background thread.  This thread can run in parallel to the GUI thread, so the user will still be able to interact with the GUI while the work is being done.</p>
<p>When the work finishes, we likely want to update something in the GUI to indicate this.  (E.g. change the text on a label to indicate that the operation is done).  Our GUI object will be notified by handling an event that the worker object fires.  But since we need to update the GUI, this event handler <em>must be executing on the same thread as the user interface</em>.</p>
<p>This last point is very important.  The core rule in Windows UI programming to remember is: <em>the only thread that can update/change a user interface control is the thread that created it</em>.  (This is true for Windows Forms applications, which use the Single Threaded Apartment model).</p>
<p>The beauty of the <strong>BackgroundWorker</strong> class is that it automatically handles all of this thread logic:</p>
<ul>
<li>It does work on a background thread</li>
<li>It ensures that completed/progress events are fired on the original GUI thread</li>
</ul>
<p>Let&#8217;s change our earlier file-reading example to use the <strong>BackgroundWorker</strong>.  This example can be found in the <a href="http://threadsafepubsub.codeplex.com/">threadsafepubsub.codeplex.com</a> project in the Form2/FileWorker2 classes.</p>
<p>Here&#8217;s the new Click event handler, where we create the background worker, attach our event handlers, and then tell it to go do some work.</p>
<pre class="brush: csharp;">
private void btnSelect_Click(object sender, EventArgs e)
        private void btnSelect_Click(object sender, EventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();
            ofd.CheckFileExists = true;
            ofd.CheckPathExists = true;

            if (ofd.ShowDialog() == DialogResult.OK)
            {
                lblResults.Text = &quot; ... reading the file ...&quot;;

                // Set up background worker object &amp; hook up handlers
                BackgroundWorker bgWorker;
                bgWorker = new BackgroundWorker();
                bgWorker.DoWork += new DoWorkEventHandler(bgWorker_DoWork);
                bgWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(bgWorker_RunWorkerCompleted);

                // Launch background thread to do the work of reading the file.  This will
                // trigger BackgroundWorker.DoWork().  Note that we pass the filename to
                // process as a parameter.
                bgWorker.RunWorkerAsync(ofd.FileName);
            }
        }
</pre>
<p>We first create an instance of the <strong>BackgroundWorker</strong> class and then wire up the <strong>DoWork</strong> and <strong>RunWorkerCompleted</strong> methods.  <strong>DoWork</strong> is the event that will fire when we call the <strong>RunWorkerAsync</strong> method.  And it will run asynchronously, in a background thread, freeing up the user interface.  Because <strong>RunWorkerAsync</strong> is launched in a background thread, control returns from the <strong>btnSelect_Click</strong> method quickly, and the UI is responsive, even while the file-read work is going on.</p>
<p>We also hook a handler to the <strong>RunWorkerCompleted</strong> event, which will fire when our <strong>bgWorker_DoWork</strong> method has finished doing the work.  This event, however, will execute on the original GUI thread&#8211;allowing is to update GUI elements directly within our <strong>gbWorker_RunWorkerCompleted</strong> handler.</p>
<p>Here&#8217;s the body of our <strong>DoWork</strong> handler.</p>
<pre class="brush: csharp;">
        void bgWorker_DoWork(object sender, DoWorkEventArgs e)
        {
            FileReader2 fr = new FileReader2();

            // Filename to process was passed to RunWorkerAsync(), so it's available
            // here in DoWorkEventArgs object.
            string sFileToRead = (string)e.Argument;
            e.Result = fr.ReadTheFile(sFileToRead);
        }
</pre>
<p>Notice that we just use our earlier <strong>FileReader</strong> class to do the actual work of reading the file.  But there are two additions.</p>
<p>First, because this method is invoked from the <strong>BackgroundWorker</strong> object, we need to somehow get the name of the file to process.  We knew this filename back in the <strong>btnSelect_Click</strong> method and we hand it off by passing it as a parameter to <strong>RunWorkerAsync</strong> and then reading it out of the <strong>DoWorkEventArgs</strong> parameter.</p>
<p>Similarly, when we finish doing our work (reading the file), we need to make sure the result (# lines read) gets passed back to our <strong>RunWorkerCompleted</strong> handler.  We do this by setting the <strong>Result</strong> properly of the <strong>DoWorkEventArgs</strong> parameter.</p>
<p>Here&#8217;s the code for our <strong>RunWorkerCompleted</strong> event handler:</p>
<pre class="brush: csharp;">
        void bgWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            if (e.Error != null)
            {
                MessageBox.Show(e.Error.Message);
            }
            else
            {
                int numLines = (int)e.Result;
                lblResults.Text = string.Format(&quot;We read {0} lines&quot;, numLines.ToString());
            }
        }
</pre>
<p>Here we see the other side of the e.Result handoff&#8211;we read the <strong>FileReader.ReadTheFile</strong> return value out of the <strong>RunWorkerCompletedEventArgs</strong> parameter.  We also check this parameter to see if an error occurred.</p>
<p>If you now run this example, you&#8217;ll see a couple of important things that work better than they did in iteration #1:</p>
<ul>
<li>We now correctly see the &#8220;reading the file&#8221; label, indicating that work is in progress</li>
<li>While the file is being read, we can interact with the GUI normally</li>
</ul>
<p>You can demonstrate the second part of this by clicking on the &#8220;Tell Me a Joke&#8221; button.  You&#8217;ll get a message box with a clever joke and you can then dismiss the dialog&#8211;all while the file read operation is still going on.</p>
<h2>Iteration #3 &#8211; Application State and Cancel Logic</h2>
<p>You might be tempted at this point to think that we&#8217;re done and our application has everything that it needs.  But we&#8217;re missing a few critical things.  Any time that you do work in a background worker thread, you should also consider:</p>
<ul>
<li><em>Busy indicator </em>&#8211; making it easy for the user to know when work is being done in the background</li>
<li><em>Application state </em>&#8211; what can/can&#8217;t the user do while the work is in progress?</li>
<li><em>Progress indicator </em>&#8211; give the user a visual sense of how much work is left to be done</li>
<li><em>Cancel logic </em>&#8211; optionally, give the user a method to cancel the background work</li>
</ul>
<p><span style="text-decoration:underline;">Busy Indicator</span></p>
<p>Let&#8217;s start with the busy indicator.  It&#8217;s important to make it obvious to your users that something is happening in the background, and what that something is.</p>
<p><span style="text-decoration:underline;">Application State</span></p>
<p>We have some subtle behavior in our current implementation that is probably not desirable.  Try the following:</p>
<ul>
<li>Click on the <strong>Read File </strong>button and select a file, to initiate a file read operation</li>
<li>Before the read has completed, click on the button again and select a new file</li>
</ul>
<p>You now have two file read operations running in parallel.  Is this really what we want?  Do we want to prohibit it?  If not, how do we handle the results of two different file read operations, when the operations complete?  How do we avoid mixing up the results?  How do we know which operation the results are coming from?  Is there a chance that the two operations will attempt to work on/with the same data?</p>
<p>For our purposes, let&#8217;s agree that we really only want to allow the user to do one operation at a time.  While one operation is in progress, a user cannot initiate another one.  We&#8217;ll modify the GUI to enforce this.</p>
<p><span style="text-decoration:underline;">Progress Indicator</span></p>
<p>More than just indicating that some work is going on in the background, it would be nice to indicate how much work we&#8217;ve already done and how much work is left to do.  This lets a user judge how long the entire process will take.</p>
<p><span style="text-decoration:underline;">Cancel Logic</span></p>
<p>Whenever you support doing some work on a background thread, you also need to consider whether a user might want to cancel this background activity.  Unless it&#8217;s something that happens quite quickly, it&#8217;s probably a good idea to allow a user to cancel the operation and return to the original state (no file is being read and they are able to select a new file to be read).</p>
<p>At this point, it&#8217;s probably a good idea to do a rough sketch of a state diagram, showing what a user can do and during what state:</p>
<p><a href="http://spsexton.files.wordpress.com/2009/05/002-pubsubstates.jpg"><img class="alignnone size-full wp-image-926" title="Application State Diagram" src="http://spsexton.files.wordpress.com/2009/05/002-pubsubstates.jpg?w=378&#038;h=418" alt="Application State Diagram" width="378" height="418" /></a></p>
<p>Notice that we enter the &#8220;reading file&#8221; state when the user clicks the &#8220;Read File&#8221; button.  But while in this state, the user cannot press that button again&#8211;they either press the &#8220;Cancel&#8221; button, or we return to the original state when the file read operation completes.</p>
<p>Also note that we should be able to display a joke while in either state.  This confirms what we said earlier&#8211;the GUI won&#8217;t lock up during the file read operation.</p>
<p><span style="text-decoration:underline;">Our Modified Example</span></p>
<p>Here&#8217;s how our file reader example works, after adding a progress indicator, cancel logic, and the ability to keep track of application state.  Here&#8217;s the new GUI during a file read operation:</p>
<p><a href="http://spsexton.files.wordpress.com/2009/05/003-progress.jpg"><img class="alignnone size-full wp-image-931" title="Progress" src="http://spsexton.files.wordpress.com/2009/05/003-progress.jpg?w=403&#038;h=239" alt="Progress" width="403" height="239" /></a></p>
<p>Note that we now tell the user what file we&#8217;re reading and we display a progress indicator, showing how far into the read operation we are.  We also give them a Cancel button, allowing them to Cancel the operation before it completes normally.  Also notice that the <strong>Read File</strong> button is greyed out&#8212;the user can&#8217;t initiate another operation until the first one completes.</p>
<p>If the user lets the file read operaton complete normally, they&#8217;ll see the following:</p>
<p><a href="http://spsexton.files.wordpress.com/2009/05/004-success1.jpg"><img class="alignnone size-full wp-image-933" title="Success" src="http://spsexton.files.wordpress.com/2009/05/004-success1.jpg?w=405&#038;h=242" alt="Success" width="405" height="242" /></a></p>
<p>Notice that when we finish reading the file, returning to the Idle state, we hide all of the progress/cancel widgets.  The <strong>Read File</strong> button is also enabled again.</p>
<p>If the user cancels the file read operation, they&#8217;ll see the following:</p>
<p><a href="http://spsexton.files.wordpress.com/2009/05/005-cancelled.jpg"><img class="alignnone size-full wp-image-934" title="Cancelled" src="http://spsexton.files.wordpress.com/2009/05/005-cancelled.jpg?w=406&#038;h=237" alt="Cancelled" width="406" height="237" /></a></p>
<p>Again, all of the progress/cancel widgets are gone, since we&#8217;re back in the Idle state.  And the <strong>Read File</strong> button is available again.  But this time, we tell the user that they cancelled the operation.</p>
<p>The code for this iteration can be found in <a href="http://threadsafepubsub.codeplex.com/" target="_blank">threadsafepubsub.codeplex.com</a>, as Form3.cs and FileReader3.cs.</p>
<p>We added a couple of things at the top of the class&#8211;an enumeration to keep track of our state, and a class-level BackgroundWorker instance.  (We move this variable into class scope because our Cancel button will need access to the BackgroundWorker object.</p>
<pre class="brush: csharp;">
    private enum AppStates { Idle, ReadingFile };

    private BackgroundWorker _worker;
</pre>
<p>Here&#8217;s our new Form3 constructor, where we now call a method to set the initial application state:</p>
<pre class="brush: csharp;">
        public Form3()
        {
            InitializeComponent();

            // Set up initial state
            SetAppState(AppStates.Idle, null);
        }
</pre>
<p>Here&#8217;s the actual code for the new <strong>SetAppState </strong>function, as well as a helper function that sets visibility for several controls.</p>
<pre class="brush: csharp;">
        // Set new application state, handling button sensitivity, labels, etc.
        private void SetAppState(AppStates newState, string filename)
        {
            switch (newState)
            {
                case AppStates.Idle:
                    // Hide progress widgets
                    SetFileReadWidgetsVisible(false);
                    btnSelect.Enabled = true;
                    break;

                case AppStates.ReadingFile:
                    // Display progress widgets &amp; file info
                    SetFileReadWidgetsVisible(true);
                    lblProgress.Text = string.Format(&quot;Reading file: {0}&quot;, filename);
                    pbProgress.Value = 0;
                    lblResults.Text = &quot;&quot;;
                    btnSelect.Enabled = false;
                    break;
            }
        }

        private void SetFileReadWidgetsVisible(bool visible)
        {
            lblProgress.Visible = visible;
            pbProgress.Visible = visible;
            btnCancel.Visible = visible;
        }
</pre>
<p>We&#8217;re basically just changing the visibility of the various progress widgets in the StatusStrip at the bottom of the form.  We also handle enabling/disabling the <strong>File Read</strong> button here.</p>
<p>The Click event handler for our <strong>File Read</strong> button is also slightly different.  We add a line that sets the application state to indicate that a file is being read, we attach a handler to track progress, and we add an exception handler to ensure that the application state is set back to idle if anything goes wrong.</p>
<pre class="brush: csharp;">
        private void btnSelect_Click(object sender, EventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();
            ofd.CheckFileExists = true;
            ofd.CheckPathExists = true;

            if (ofd.ShowDialog() == DialogResult.OK)
            {
                FileInfo fi = new FileInfo(ofd.FileName);
                SetAppState(AppStates.ReadingFile, fi.Name);

                try
                {
                    // Set up background worker object &amp; hook up handlers
                    _worker = new BackgroundWorker();
                    _worker.DoWork += new DoWorkEventHandler(bgWorker_DoWork);
                    _worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(bgWorker_RunWorkerCompleted);
                    _worker.WorkerReportsProgress = true;
                    _worker.WorkerSupportsCancellation = true;
                    _worker.ProgressChanged += new ProgressChangedEventHandler(bgWorker_ProgressChanged);

                    // Launch background thread to do the work of reading the file.  This will
                    // trigger BackgroundWorker.DoWork().  Note that we pass the filename to
                    // process as a parameter.
                    _worker.RunWorkerAsync(ofd.FileName);
                }
                catch
                {
                    SetAppState(AppStates.Idle, null);
                    throw;
                }
            }
        }
</pre>
<p>Note also that we have to explicitly tell the <strong>BackgroundWorker</strong> that it should support both progress and cancellation functionality.</p>
<p>We also now have a new event handler for the <strong>ProgressChanged</strong> event, which looks like this:</p>
<pre class="brush: csharp;">
        // Get info on progress of file-read operation (% complete)
        void bgWorker_ProgressChanged(object sender, ProgressChangedEventArgs e)
        {
            // Just update progress bar with % complete
            pbProgress.Value = e.ProgressPercentage;
        }
</pre>
<p>This one is pretty simple&#8212;we just set the value of the progress bar, which runs from 0 to 100, to the reported % complete value.</p>
<p>Our <strong>DoWork</strong> handler has just a few changes.  Here is the new version:</p>
<pre class="brush: csharp;">
        // Do work--runs on a background thread
        void bgWorker_DoWork(object sender, DoWorkEventArgs e)
        {
            // Note about exceptions:  If an exception originates anywhere in
            // this method, or methods that it calls, the BackgroundWorker will
            // automatically populate the Error property of the RunWorkerCompletedEventArgs
            // parameter that gets passed into the RunWorkerCompleted event handler.
            // So we can handle the exception in that method.

            FileReader3 fr = new FileReader3();

            // Filename to process was passed to RunWorkerAsync(), so it's available
            // here in DoWorkEventArgs object.
            BackgroundWorker bw = sender as BackgroundWorker;
            string sFileToRead = (string)e.Argument;

            e.Result = fr.ReadTheFile(bw, sFileToRead);

            // If operation was cancelled (triggered by CancellationPending),
            // we bailed out of ReadTheFile() early.  But still need to set
            // Cancel flag, because RunWorkerCompleted event will still fire.
            if (bw.CancellationPending)
                e.Cancel = true;
        }
</pre>
<p>I added a note to remind us that exceptions originating in this chunk of code (or on this thread) are automatically made available to us in the <strong>RunWorkerCompleted</strong> handler.</p>
<p>Notice also that we&#8217;re now passing the <strong>BackgroundWorker</strong> object into the <strong>ReadTheFile</strong> method.  We do this because we need access to it, within this message, to check for user cancellation and to report progress.</p>
<p>Finally, we see a piece of the cancellation infrastructure here.  Below is another code chunk to help us understand how the cancel operation works&#8212;the click handler for the <strong>Cancel </strong>button.</p>
<pre class="brush: csharp;">
        private void btnCancel_Click(object sender, EventArgs e)
        {
            _worker.CancelAsync();
        }
</pre>
<p>This is pretty simple.  When the user clicks the <strong>Cancel</strong> button, we tell the <strong>BackgroundWorker</strong> object to initiate a cancel operation.  Here&#8217;s a summary of the entire cancel operation (what happens when):</p>
<ul>
<li>User clicks Cancel button</li>
<li><strong>btnCancel_Click</strong> handler invokes <strong>BackgroundWorker</strong>.<strong>CancelAsync</strong> on active worker object</li>
<li>Method doing actual work (reading file) periodically checks <strong>BackgroundWorker.CancellationPending</strong> and aborts if it sees this property set</li>
<li>Control returns to <strong>bgWorker_DoWork</strong> method</li>
<li><strong>DoWork</strong> method checks <strong>CancellationPending</strong> property and sets <strong>DoWorkEventArgs.Cancel</strong> to true if operation was cancelled</li>
<li><strong>BackgroundWorker.RunWorkerCompleted</strong> fires</li>
<li>We can check <strong>RunWorkerCompletedEventArgs.Cancelled</strong>, in our <strong>RunWorkerCompleted</strong> handler, to detect whether operation was cancelled</li>
</ul>
<p>This is a little involved, but if you walk through the code, you&#8217;ll see how things work.</p>
<p>Finally, here is our <strong>RunWorkerCompleted</strong> event handler:</p>
<pre class="brush: csharp;">
        void bgWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            try
            {
                if (e.Error != null)
                {
                    MessageBox.Show(e.Error.Message, &quot;Error During File Read&quot;);
                }
                else if (e.Cancelled)
                {
                    lblResults.Text = &quot;** Cancelled **&quot;;
                }
                else
                {
                    int numLines = (int)e.Result;
                    lblResults.Text = string.Format(&quot;We read {0} lines&quot;, numLines.ToString());
                }
            }
            finally
            {
                // State now goes back to idle
                SetAppState(AppStates.Idle, null);
            }
        }
</pre>
<p>There are just a couple of new things here.  We now check the <strong>Cancelled</strong> property and display a message if the operation was cancelled.  We also add a finally block, where we ensure that we transition back to the Idle state, whether things completed normally, the user cancelled, or there was an error.</p>
<p>I have one final block of code to share&#8212;the <strong>ReadTheFile</strong> method that does the actual work:</p>
<pre class="brush: csharp;">
        public int ReadTheFile(BackgroundWorker bw, string fileName)
        {
            int numLines = 0;
            FileInfo fi = new FileInfo(fileName);
            long totalBytes = fi.Length;
            long bytesRead = 0;

            using (StreamReader sr = new StreamReader(fileName))
            {
                // Note: When BackgroundWorker has CancellationPending set, we bail
                // out and fall back to the _DoWork method that called us.
                string nextLine;
                while (((nextLine = sr.ReadLine()) != null) &amp;&amp;
                       !bw.CancellationPending)
                {
                    bytesRead += sr.CurrentEncoding.GetByteCount(nextLine);
                    numLines++;
                    int pctComplete = (int)(((double)bytesRead / (double)totalBytes)* 100);
                    bw.ReportProgress(pctComplete);
                    Thread.Sleep(10);  // ms
                }
            }

            return numLines;
        }
</pre>
<p>We&#8217;ve basically added two things here: support for cancellation and for progress reporting.</p>
<p>To support user-initiated cancellation, we just check to see if the operation has been cancelled, after each line in the file that we read.  The frequency with which you check for cancellation is important.  If you don&#8217;t check often enough, the application will appear to not be responding to the cancel request and the user may become frustrated.</p>
<p>We report progress (% complete) by invoking the <strong>ReportProgress</strong> method on the background worker.  We do this after calculating the actual progress, in terms of # bytes read so far.</p>
<br />Posted in .NET Tagged: .NET, Asynchronous, Background Thread, BackgroundWorker, C#, Cancel Button, Publish-Subscribe <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/spsexton.wordpress.com/893/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/spsexton.wordpress.com/893/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/spsexton.wordpress.com/893/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/spsexton.wordpress.com/893/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/spsexton.wordpress.com/893/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/spsexton.wordpress.com/893/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/spsexton.wordpress.com/893/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/spsexton.wordpress.com/893/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/spsexton.wordpress.com/893/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/spsexton.wordpress.com/893/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=893&subd=spsexton&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://stuff.seans.com/2009/05/21/net-basics-do-work-in-background-thread-to-keep-gui-responsive/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8922e4d5254d602ba3ed32dd073b5a4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">spsexton</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/05/001-iter1client1.jpg" medium="image">
			<media:title type="html">001-Iter1Client</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/05/002-pubsubstates.jpg" medium="image">
			<media:title type="html">Application State Diagram</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/05/003-progress.jpg" medium="image">
			<media:title type="html">Progress</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/05/004-success1.jpg" medium="image">
			<media:title type="html">Success</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/05/005-cancelled.jpg" medium="image">
			<media:title type="html">Cancelled</media:title>
		</media:content>
	</item>
		<item>
		<title>How Do I Bring Up Task Manager from a Remote Desktop Session?</title>
		<link>http://stuff.seans.com/2009/04/23/how-do-i-bring-up-task-manager-from-a-remote-desktop-session/</link>
		<comments>http://stuff.seans.com/2009/04/23/how-do-i-bring-up-task-manager-from-a-remote-desktop-session/#comments</comments>
		<pubDate>Thu, 23 Apr 2009 14:31:36 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[Windows]]></category>
		<category><![CDATA[Keyboard Shortcuts]]></category>
		<category><![CDATA[Remote Desktop]]></category>
		<category><![CDATA[Task Manager]]></category>

		<guid isPermaLink="false">http://stuff.seans.com/?p=881</guid>
		<description><![CDATA[Here&#8217;s another little trick that I assume most people know, but perhaps not.
When you&#8217;re connected using Remote Desktop and you need to kill a task, or to check on CPU or memory performance, how do you bring up Task Manager?  If you press Ctrl-Alt-Delete, you&#8217;ll get the Windows Security dialog in the host machine&#8211;not on [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=881&subd=spsexton&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s another little trick that I assume most people know, but perhaps not.</p>
<p>When you&#8217;re connected using Remote Desktop and you need to kill a task, or to check on CPU or memory performance, how do you bring up Task Manager?  If you press Ctrl-Alt-Delete, you&#8217;ll get the Windows Security dialog in the host machine&#8211;not on the remote machine.</p>
<p>To bring up Task Manager in a remote session, just use the keyboard shortcut: Ctrl-Shift-ESC.  This will directly open the Windows Task Manager on the machine that you&#8217;re connected to.  Voila.</p>
<br />Posted in Windows Tagged: Keyboard Shortcuts, Remote Desktop, Task Manager, Windows <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/spsexton.wordpress.com/881/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/spsexton.wordpress.com/881/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/spsexton.wordpress.com/881/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/spsexton.wordpress.com/881/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/spsexton.wordpress.com/881/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/spsexton.wordpress.com/881/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/spsexton.wordpress.com/881/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/spsexton.wordpress.com/881/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/spsexton.wordpress.com/881/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/spsexton.wordpress.com/881/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=881&subd=spsexton&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://stuff.seans.com/2009/04/23/how-do-i-bring-up-task-manager-from-a-remote-desktop-session/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8922e4d5254d602ba3ed32dd073b5a4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">spsexton</media:title>
		</media:content>
	</item>
		<item>
		<title>After Signing My Assembly, Why Do I Get Errors About Signing Referenced Assemblies?</title>
		<link>http://stuff.seans.com/2009/04/22/after-signing-my-assembly-why-do-i-get-errors-about-signing-referenced-assemblies/</link>
		<comments>http://stuff.seans.com/2009/04/22/after-signing-my-assembly-why-do-i-get-errors-about-signing-referenced-assemblies/#comments</comments>
		<pubDate>Wed, 22 Apr 2009 15:11:48 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[assemly]]></category>
		<category><![CDATA[strong names]]></category>
		<category><![CDATA[vsto]]></category>

		<guid isPermaLink="false">http://stuff.seans.com/?p=876</guid>
		<description><![CDATA[This is a note-to-self quickie blog post.
I&#8217;m in the process of deploying a VSTO solution that includes two DLLs&#8211;a data access layer DLL and an Excel Workbook (VSTO) project that contains that code-behind for the actual Excel workbook.  In my case, my Excel code creates controls that live on the Action Pane in Excel and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=876&subd=spsexton&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>This is a note-to-self quickie blog post.</p>
<p>I&#8217;m in the process of deploying a VSTO solution that includes two DLLs&#8211;a data access layer DLL and an Excel Workbook (VSTO) project that contains that code-behind for the actual Excel workbook.  In my case, my Excel code creates controls that live on the Action Pane in Excel and allow the user to interact with pre-created graphs that are fed data from a database.</p>
<p>When you deploy a VSTO solution, you need to grant full trust to the class library associated with the Excel Workbook (or other Office document).  This in turn means that you need to sign your assembly, i.e. attach a strong name to it.</p>
<p>When I sign my main assembly (e.g. ExcelWorkbook1.dll), and try to build it, I now get the following error:</p>
<p><em>Error    1    Assembly generation failed &#8212; Referenced assembly &#8216;MyDataAccessLayer&#8217; does not have a strong name </em></p>
<p>What&#8217;s going on here is that when you sign an assembly, all referenced assemblies must now also have strong names.  Let&#8217;s say that again, the rule to remember is:</p>
<p><strong>All assemblies referenced by a strong-named assembly must also have a strong name.</strong></p>
<p>This makes sense, when you think about security concerns.  The purpose of signing an assembly is to prevent someone from replacing your assembly with one that has the same API, but does something bad&#8211;i.e. spoofing it.  Signing your main assembly helps, but if it then references a weakly-named (not signed) assembly, someone could spoof <strong>that</strong> assembly and still make your assembly behave badly.  That&#8217;s a security hole.</p>
<p>So when you think about signing your assemblies, giving them strong names, remember that it&#8217;s a domino effect&#8211;you&#8217;ll need to (and want to) sign all of your assemblies.  And any third-party assemblies that you use/reference need to also have strong names.</p>
<br />Posted in .NET Tagged: .NET, assemly, strong names, vsto <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/spsexton.wordpress.com/876/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/spsexton.wordpress.com/876/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/spsexton.wordpress.com/876/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/spsexton.wordpress.com/876/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/spsexton.wordpress.com/876/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/spsexton.wordpress.com/876/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/spsexton.wordpress.com/876/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/spsexton.wordpress.com/876/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/spsexton.wordpress.com/876/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/spsexton.wordpress.com/876/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=876&subd=spsexton&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://stuff.seans.com/2009/04/22/after-signing-my-assembly-why-do-i-get-errors-about-signing-referenced-assemblies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8922e4d5254d602ba3ed32dd073b5a4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">spsexton</media:title>
		</media:content>
	</item>
		<item>
		<title>A Simple .NET Twitter API Wrapper Using LINQ</title>
		<link>http://stuff.seans.com/2009/04/04/a-simple-net-twitter-api-wrapper-using-linq/</link>
		<comments>http://stuff.seans.com/2009/04/04/a-simple-net-twitter-api-wrapper-using-linq/#comments</comments>
		<pubDate>Sat, 04 Apr 2009 06:06:24 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[LINQ]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[Twitter API]]></category>

		<guid isPermaLink="false">http://stuff.seans.com/?p=837</guid>
		<description><![CDATA[In the world of software demos, doing something with Twitter has replaced Hello World as the most common target of a demo.  At the risk of polluting the world with yet another chunk of code that does something with Twitter&#8211;I&#8217;d like to play around a bit with Silverlight charting and Twitter seems a great context [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=837&subd=spsexton&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>In the world of software demos, doing something with Twitter has replaced Hello World as the most common target of a demo.  At the risk of polluting the world with yet another chunk of code that does something with Twitter&#8211;I&#8217;d like to play around a bit with Silverlight charting and Twitter seems a great context for demoing what is possible.</p>
<p>But before I can start creating a Silverlight demo, I need a basic Twitter API wrapper in .NET.  So here&#8217;s a starting point&#8211;a simple example that uses LINQ to get a list of people that you follow.  This is a good starting point for later demos.</p>
<p>Twitter provides a simple REST API that lets you do basically everything you&#8217;d want to do using simple HTTP GET, POST and DELETE requests.</p>
<p>You can learn everything you need to know about the Twitter API at the <a href="http://apiwiki.twitter.com/REST+API+Documentation" target="_blank">Twitter API Wiki</a>.</p>
<h3>Basic Concepts</h3>
<p>I&#8217;ll assume that you generally know how Twitter works&#8211;you follow some folks, some folks follow you, and you all post status messages&#8211;which your followers can read.  That&#8217;s the beauty of Twitter&#8211;pretty simple.</p>
<p>But here are some things that you should know about the Twitter API.</p>
<ul>
<li>How it works
<ul>
<li>You post an HTTP request to a URL</li>
<li>You get XML data back in the HTTP response</li>
</ul>
</li>
<li>Authentication
<ul>
<li>Some API method calls require authentication, using <a href="http://en.wikipedia.org/wiki/Basic_authentication_scheme" target="_blank">HTTP Basic Authentication</a>.</li>
<li>Any app invoking calls that require authentication will need to supply the proper credentials.</li>
</ul>
</li>
<li>Rate limits
<ul>
<li>Your app is limited to 100 requests per hour.    <em>(whether you&#8217;re authenticating or not)</em></li>
<li>You can receive a special dispensation from the Twitter gurus to be allowed up to 20,000 requests/hr.</li>
</ul>
</li>
<li>Paging
<ul>
<li>Many API methods requires multiple requests, retrieving a page of data at a time</li>
<li>The <em>page </em>parameter allows you to specify which page of data to retrieve</li>
<li>The <em>count </em>parameter allows specifying # items per page</li>
</ul>
</li>
</ul>
<p>What happens when you hit your rate limit?  Well, basically your application (your IP address, actually) can no longer make requests of Twitter&#8211;until the rate limit resets.</p>
<h3>The API Calls That I Use</h3>
<p>Here are the two Twitter API calls (URLs) that I use in this example:</p>
<ul>
<li>Get list of people someone follows
<ul>
<li>http://twitter.com/statuses/friends/screenname.xml?page=1</li>
</ul>
</li>
<li>Get info about a specific user
<ul>
<li>http://twitter.com/users/show.xml?screen_name=screenname</li>
</ul>
</li>
</ul>
<p>You can see how these work by just entering the above URLs into your browser and looking at the XML data stream that comes back.</p>
<p>Here&#8217;s an example of the data returned by the <strong>friends</strong> call:</p>
<p><img class="size-full wp-image-841 alignnone" title="Output of Friends Request" src="http://spsexton.files.wordpress.com/2009/04/friendsdata1.jpg?w=563&#038;h=652" alt="Output of Friends Request" width="563" height="652" /></p>
<p>An here&#8217;s an example of the data returned from the <strong>users </strong>call:</p>
<p><img class="alignnone size-full wp-image-842" title="Data Returned from Users Request" src="http://spsexton.files.wordpress.com/2009/04/userdata.jpg?w=523&#038;h=602" alt="Data Returned from Users Request" width="523" height="602" /></p>
<h3>The Peep Class</h3>
<p>Let&#8217;s start building a simple Twitter API wrapper in .NET with a <strong>very </strong>simple class to encapsulate information about a single user&#8211;either yourself, a follower, or someone that you follow.  This doesn&#8217;t cover absolutely everything that we can find out about a Twitter user, but encapsulates some of the basic stuff that we care about.</p>
<p><em>(For these examples, I&#8217;m using Visual Studio 2008 &#8212; C# 3.0</em>).</p>
<p>Here&#8217;s the code for the <strong>Peep</strong> class:</p>
<pre class="brush: csharp;">
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Xml;
using System.Xml.Linq;

namespace TwitterLibGUI
{
    public class Peep
    {
        public string ScreenName { get; set; }
        public string Name { get; set; }
        public string Location { get; set; }
        public string Description { get; set; }
        public Uri ProfileImageURL { get; set; }
        public Uri URL { get; set; }
        public int ID { get; set; }

        public int NumFollowers { get; set; }
        public int NumFollowing { get; set; }
        public int NumUpdates { get; set; }

        public string LastUpdateText { get; set; }
        public DateTime LastUpdateDateTime { get; set; }

        public new string ToString()
        {
            return string.Format(&quot;{0} - {1}&quot;, ScreenName, Name);
        }
    }
}
</pre>
<p>Super simple class, made much easier through the user of C#&#8217;s automatic properties.  As an example, using me as a Twitter user, my <strong>ScreenName</strong> would be &#8220;spsexton&#8221; and my <strong>Name</strong> would be &#8220;Sean Sexton&#8221;.</p>
<h3>The Peeps Class</h3>
<p>Now that we have an object that wraps a &#8220;peep&#8221;, let&#8217;s create a special class that represents a collection of Peep instances&#8211;or &#8220;peeps&#8221;.  For example, an instances of <strong>Peeps</strong> could be used to store a list of everyone that we follow (or everyone that follows us).</p>
<p>We&#8217;ll use our old friend, the <strong>List(T)</strong> class, from <strong>System.Collections.Generic</strong>, which implements a strongly typed collection.</p>
<p>Basically, a collection of <strong>Peep</strong> objects will look like this:  <strong>List&lt;Peep&gt;</strong>.  But we&#8217;ll create a subclass so that we can add a static method for building up a list of everyone that we follow.</p>
<p>Here&#8217;s the full code for <strong>Peeps.cs</strong>, followed by an explanation of how we do things.</p>
<pre class="brush: csharp;">
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Net;
using System.Text;
using System.Xml;
using System.Xml.Linq;

namespace TwitterLibGUI
{
    /// &lt;summary&gt;
    /// Peep collection class
    /// &lt;/summary&gt;
    public class Peeps : List&lt;Peep&gt;
    {
        // Partial Twitter API
        private const string getFriendsURI = &quot;http://twitter.com/statuses/friends/{0}.xml?page={1}&quot;;

        /// &lt;summary&gt;
        /// Return list of Peeps followed by a specified person
        /// &lt;/summary&gt;
        ///
&lt;param name=&quot;ScreenName&quot;&gt;The Twitter username, e.g. spsexton&lt;/param&gt;
        /// &lt;returns&gt;&lt;/returns&gt;
        public static Peeps PeopleFollowedBy(string ScreenName, out int RateLimit, out int LimitRemaining)
        {
            if ((ScreenName == null) || (ScreenName == &quot;&quot;))
                throw new ArgumentException(&quot;PeopleFollowedBy: Invalid ScreenName&quot;);

            int nPageNum = 1;
            int userCount = 0;      // # users read on last call

            int rateLimit = 0;          // Max # API calls per hour
            int limitRemaining = 0;     // # API calls remaining

            XDocument docFriends;
            Peeps peeps = new Peeps();

            // Retrieve people I'm following, 100 people at a time
            // (each call to Twitter API results in one &quot;page&quot; of results--up to 100 users)
            try
            {
                do
                {
                    // Example of constituting XDocument directly from the URI
                    // docFriends = XDocument.Load(string.Format(getFriendsURI, ScreenName, nPageNum));

                    // Manually create an HTTP request, so that we can pull information out of the
                    // headers in the response.  (Then later constitute the XDocument).
                    HttpWebRequest req = (HttpWebRequest)WebRequest.Create(string.Format(getFriendsURI, ScreenName, nPageNum));
                    HttpWebResponse resp = (HttpWebResponse)req.GetResponse();
                    TwitterUtility.GetInfoFromResponse(resp, out rateLimit, out limitRemaining);
                    XmlReader reader = XmlReader.Create(resp.GetResponseStream());
                    docFriends = XDocument.Load(reader);

                    IEnumerable&lt;XElement&gt; users = docFriends.Elements(&quot;users&quot;).Elements(&quot;user&quot;);

                    userCount = users.Count();
                    if (userCount &gt; 0)
                    {
                        List&lt;Peep&gt; nextPage = (from user in users
                                               orderby (string)user.Element(&quot;screen_name&quot;)
                                               select new Peep
                                               {
                                                   ID = (int)user.Element(&quot;id&quot;),
                                                   ScreenName = (string)user.Element(&quot;screen_name&quot;),
                                                   Name = (string)user.Element(&quot;name&quot;),
                                                   Location = (string)user.Element(&quot;location&quot;),
                                                   Description = (string)user.Element(&quot;description&quot;),
                                                   ProfileImageURL = TwitterUtility.UriFromString((string)user.Element(&quot;profile_image_url&quot;)),
                                                   URL = TwitterUtility.UriFromString((string)user.Element(&quot;url&quot;)),
                                                   NumFollowers = (int)user.Element(&quot;followers_count&quot;),
                                                   LastUpdateDateTime = TwitterUtility.SafeUpdateDateTime(user.Element(&quot;status&quot;)),
                                                   LastUpdateText = TwitterUtility.SafeUpdateText(user.Element(&quot;status&quot;))
                                               }).ToList();

                        peeps.AddRange(nextPage);
                    }
                    nPageNum++;
                } while (userCount &gt; 0);
            }
            catch (WebException xcp)
            {
                throw new ApplicationException(
                    string.Format(&quot;Twitter rate limit exceeded, max of {0}/hr allowed. Remaining = {1}&quot;,
                        rateLimit,
                        limitRemaining),
                    xcp);
            }
            finally
            {
                RateLimit = rateLimit;
                LimitRemaining = limitRemaining;
            }

            return peeps;
        }
    }
}
</pre>
<p>Notice that all we have in the <strong>Peeps</strong> class at this point is a static method, <strong>PeopleFollowedBy</strong>, that returns a collection of <strong>Peep</strong> objects, one for each person that the specified screen name follows.</p>
<p>The first thing that you&#8217;ll notice about the code is a loop where we get consecutive pages from the Twitter \statuses\friends\screenname.xml page.  By default, you get only 100  users at a time when invoking this URL.  So the easiest way to get all people that someone follows (their &#8220;friends&#8221;), is to request consecutive pages until you get one back that contains no users.</p>
<p>At each step through the loop, we construct a <strong>List&lt;Peep&gt;</strong> object from the XML results and then add that collection to a master collection (which this function will return).</p>
<p>Before we look at the code at the top of the loop that constructs an HTTP request to get the next page, take a look at the commented out line at the top of the loop:</p>
<pre class="brush: csharp;">
                    // Example of constituting XDocument directly from the URI
                    // docFriends = XDocument.Load(string.Format(getFriendsURI, ScreenName, nPageNum));
</pre>
<p>This is actually the simplest way to get the results of the Twitter API calll into an XDocument, and ready for querying.  Using this single line, you could replace the next five lines of code that end with another <strong>XDocument</strong>.<strong>Load</strong>.  What&#8217;s going on here is the core of what we want to do&#8211;load up an XDocument from the URI that represents the Twitter API call.</p>
<p>But in my code, I go to a little more effort to create an <strong>HttpWebRequest </strong>and then get the <strong>HttpWebResponse </strong>for that request.  I do this solely for the purpose of getting Twitter rate limit information out of the header of the response.  If you&#8217;ll recall, Twitter has a 100 calls per hour rate limit by default.  The nice thing is that the API tells us the rate limit, as well as the # calls remaining, after each request.  So we read that from the header and keep track of it.</p>
<p>For now, this rate limit information is just returned to the caller.  But my intent is to use it in a future example to actually slow down my Twitter calls, as needed.  This will be helpful when we want to batch up a large # of Twitter calls, but we don&#8217;t want to risk maxing out our rate limit.  More on this later.</p>
<p>I get the rate limit info from the header in the <strong>TwitterUtility.GetInfoFromResponse</strong> method, described below.</p>
<h3>Here&#8217;s Where LINQ Comes In</h3>
<p>Now for the LINQ part.  Once we load up the XDocument from Twitter&#8217;s response, we can build up a collection of <strong>XElement</strong> objects corresponding to the list of users in the XML stream.  But this isn&#8217;t <em><strong>quite</strong></em> what we want..  To get the data from the <strong>XElement</strong> objects into our <strong>List&lt;Peep&gt;</strong> collection, we need to do a simple LINQ query.</p>
<p>(Thanks to a post by Wally McClure on the basic idea for the LINQ query: <a href="http://morewally.com/cs/blogs/wallym/archive/2009/03/17/calling-the-twitter-api-in-c.aspx" target="_blank">Calling the Twitter API in C#</a>).</p>
<p>The LINQ query is pretty simple&#8211;we grab each <strong>user</strong> element from the XML stream and create a <strong>Peep</strong> object for that user.  We initialize all the fields of the new <strong>Peep</strong> object for which we can get data from this XML stream.  (We <strong>can&#8217;t</strong> get NumFollowing or NumUpdates&#8211;we&#8217;ll have to make a different API call to get that information).</p>
<p>In most cases, we&#8217;re asking for the value of an XML element that is a child of the <strong>&lt;user&gt;</strong> element.  E.g. the <strong>&lt;id&gt;</strong> element.  And we call helper methods in some cases, since the elements that we&#8217;re trying to read might by null.  <em>(Actually, I haven&#8217;t tested this thoroughly&#8211;some of the other elements might occasionally be null and so it wouldn&#8217;t be a bad idea to use a &#8220;safe&#8221; accessor method on all of the elements).</em></p>
<p>Finally, we need to convert the result of our query&#8211;which is <strong>IEnumerable&lt;Peep&gt;</strong>&#8211;to a <strong>List&lt;Peep&gt;</strong> by calling the <strong>ToList()</strong> method.  Then we add this new list to the master list that we are building.</p>
<h3>Handling the Rate Limit Exception</h3>
<p>One final thing remains for this function&#8211;handling the case when we exceed our rate limit.  I added a simple handler, to make it a little more obvious to the client that we&#8217;ve exceeded our rate limit, rather than letting the underlying <strong>WebException</strong> bubble up.  This is a little bit sloppy, since there are other things that might throw a <strong>WebException</strong>.  But this is a good start at giving the caller a little info on the rate limit issue.</p>
<h3>The Helper Class</h3>
<p>Here is the full code for the <strong>TwitterUtility</strong> class, which just contains a handful of helper methods that we make use of in the <strong>Peeps</strong> and <strong>Peep</strong> (see below) classes.</p>
<pre class="brush: csharp;">
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Net;
using System.Text;
using System.Xml;
using System.Xml.Linq;

namespace TwitterLibGUI
{
    /// &lt;summary&gt;
    /// Various global utility methods for Twitter library
    /// &lt;/summary&gt;
    public class TwitterUtility
    {
        /// &lt;summary&gt;
        /// Convert a string to a valid Uri object (or null)
        /// &lt;/summary&gt;
        ///
&lt;param name=&quot;sUri&quot;&gt;String represent Uri, e.g. http://blahblah.com&lt;/param&gt;
        /// &lt;returns&gt;&lt;/returns&gt;
        public static Uri UriFromString(string sUri)
        {
            return ((sUri != null) &amp;&amp; (sUri.Length &gt; 0)) ? new Uri(sUri) : null;
        }

        /// &lt;summary&gt;
        /// Pull a couple fields out of the header--specifically, the Twitter API rate limit info.
        /// &lt;/summary&gt;
        ///
&lt;param name=&quot;resp&quot;&gt;&lt;/param&gt;
        ///
&lt;param name=&quot;rateLimit&quot;&gt;&lt;/param&gt;
        ///
&lt;param name=&quot;limitRemaining&quot;&gt;&lt;/param&gt;
        public static void GetInfoFromResponse(WebResponse resp, out int rateLimit, out int limitRemaining)
        {
            rateLimit = 0;
            limitRemaining = 0;

            for (int i = 0; i &lt; resp.Headers.Keys.Count; i++)
            {
                string s = resp.Headers.GetKey(i);
                if (s == &quot;X-RateLimit-Limit&quot;)
                {
                    rateLimit = int.Parse(resp.Headers.GetValues(i).First());
                }
                if (s == &quot;X-RateLimit-Remaining&quot;)
                {
                    limitRemaining = int.Parse(resp.Headers.GetValues(i).First());
                }
            }
        }

        /// &lt;summary&gt;
        /// Parse twitter date string into .NET DateTime
        /// &lt;/summary&gt;
        ///
&lt;param name=&quot;dateString&quot;&gt;&lt;/param&gt;
        /// &lt;returns&gt;&lt;/returns&gt;
        public static DateTime ParseTwitterDate(string dateString)
        {
            return DateTime.ParseExact(dateString, &quot;ddd MMM dd HH:mm:ss zzz yyyy&quot;, CultureInfo.InvariantCulture);
        }

        /// &lt;summary&gt;
        /// Return a valid DateTime for status.created_at and handle the case
        /// of the status element not being present.
        /// &lt;/summary&gt;
        ///
&lt;param name=&quot;user&quot;&gt;Represents status element (child of user element)&lt;/param&gt;
        /// &lt;returns&gt;&lt;/returns&gt;
        public static DateTime SafeUpdateDateTime(XElement user)
        {
            DateTime creAt = new DateTime();        // Default constructor is 1/1/0001 12AM

            if (user != null)
            {
                XElement elemCreAt = user.Element(&quot;created_at&quot;);
                if (elemCreAt != null)
                {
                    creAt = ParseTwitterDate((string)elemCreAt);
                }
            }

            return creAt;
        }

        /// &lt;summary&gt;
        /// Return a valid update text string, whether or not the &lt;status&gt; element
        /// was present.
        /// &lt;/summary&gt;
        ///
&lt;param name=&quot;user&quot;&gt;Represents status element (child of user element)&lt;/param&gt;
        /// &lt;returns&gt;&lt;/returns&gt;
        public static string SafeUpdateText(XElement user)
        {
            string sText = &quot;&quot;;

            if (user != null)
            {
                XElement elemText = user.Element(&quot;text&quot;);
                if (elemText != null)
                {
                    sText = (string)elemText;
                }
            }

            return sText;
        }
    }
}
</pre>
<p>Here&#8217;s what&#8217;s in this class:</p>
<ul>
<li><strong>UriFromString</strong> &#8212; &#8220;Safe&#8221; assignment, creating either a valid <strong>Uri</strong> object, or null</li>
<li><strong>GetInfoFromResponse</strong> &#8212; Read the Headers collection from the HTTP response to pull out the rate limit and # remaining API calls</li>
<li><strong>ParseTwitterDate</strong> &#8212; Parse the funky Twitter date/time string into a <strong>DateTime</strong> object</li>
<li><strong>SafeUpdateDateTime</strong> &#8212; Another &#8220;safe&#8221; method, filling in a <strong>DateTime</strong> object only if the <strong>created_at</strong> element exists</li>
<li><strong>SafeUpdateText</strong> &#8212; And a &#8220;safe&#8221; assignment from the <strong>text</strong> element</li>
</ul>
<p>(Note: Both the <strong>&lt;created_at&gt; </strong>and <strong>&lt;text&gt; </strong>elements are under the <strong>&lt;status&gt; </strong>element).</p>
<h3>NumFollowing and NumUpdates</h3>
<p>My goal when I started throwing together this example was to fully populate the <strong>Peep</strong> class that I listed at the top of the post.  This includes not just # of followers for everybody in my &#8220;friends&#8221; list, but the # of people that <em>they</em> follow, and their total updates.  I can get everything from the API call that we just saw&#8211;the &#8220;friends&#8221; call.  But to get # following and # updates, I need to make a different call:</p>
<p style="padding-left:30px;">http://twitter.com/users/show.xml?screen_name=screenname</p>
<p>This method returns a bunch of info about a particular user, including # following and # updates.  (See the XML output at the top of the post).</p>
<p>So the obvious thing to do would be to add an assignment in our LINQ query, calling a helper method to go off and call this other Twitter API method, right?  For each user, we could call show.xml and get the remaining two fields.</p>
<p>The problem with including this 2nd Twitter call in the LINQ is that we&#8217;ll blow out our Twitter rate limit.  We only get 100 requests per hour, so we&#8217;d run out of steam trying to flesh out the first 100 users.  (And any Twitter user worth his salt follows at least 100 people).</p>
<p>So what is to be done?  For now, I add code to the <strong>Peep</strong> class (see below) to get the remaining info on a &#8220;peep by peep&#8221; basis, rather than getting everything all at once.  This is a bit of a cop out, since we leave it up to the client to decide how often to call this method.</p>
<p>I&#8217;ll do a 2nd post where I actually add code to make these additional calls, but in a &#8220;rate limit safe&#8221; manner.  (Hint&#8211;we&#8217;ll use timers to slow down our use of the Twitter API).</p>
<p>So until we get some &#8220;rate limit smart&#8221; code, here&#8217;s the expanded code for <strong>Peep.cs</strong>, including a method that calls show.xml to get the additional info.</p>
<pre class="brush: csharp;">
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Xml;
using System.Xml.Linq;

namespace TwitterLibGUI
{
    public class Peep
    {
        private const string userInfoURI = &quot;http://twitter.com/users/show.xml?screen_name={0}&quot;;

        public string ScreenName { get; set; }
        public string Name { get; set; }
        public string Location { get; set; }
        public string Description { get; set; }
        public Uri ProfileImageURL { get; set; }
        public Uri URL { get; set; }
        public int ID { get; set; }

        public int NumFollowers { get; set; }
        public int NumFollowing { get; set; }
        public int NumUpdates { get; set; }

        public string LastUpdateText { get; set; }
        public DateTime LastUpdateDateTime { get; set; }

        public new string ToString()
        {
            return string.Format(&quot;{0} - {1}&quot;, ScreenName, Name);
        }

        /// &lt;summary&gt;
        /// Calculate NumFollowing &amp; NumUpdates, since these two fields'
        /// data isn't available from an API call that gets a list of
        /// multiple users, but must be retrieve for each user individually.
        /// &lt;/summary&gt;
        public void CalcAddlInfo()
        {
            if ((ScreenName == null) || (ScreenName == &quot;&quot;))
                throw new ArgumentException(&quot;CalcNumFollowing: Invalid ScreenName&quot;);

            int rateLimit = 0;          // Max # API calls per hour
            int limitRemaining = 0;     // # API calls remaining

            XDocument docUser;

            try
            {
                HttpWebRequest req = (HttpWebRequest)WebRequest.Create(string.Format(userInfoURI, ScreenName));
                HttpWebResponse resp = (HttpWebResponse)req.GetResponse();
                TwitterUtility.GetInfoFromResponse(resp, out rateLimit, out limitRemaining);
                XmlReader reader = XmlReader.Create(resp.GetResponseStream());
                docUser = XDocument.Load(reader);

                XElement user = docUser.Element(&quot;user&quot;);

                NumFollowing = (int)user.Element(&quot;friends_count&quot;);
                NumUpdates = (int)user.Element(&quot;statuses_count&quot;);
            }
            catch (WebException xcp)
            {
                throw new ApplicationException(
                    string.Format(&quot;Twitter rate limit exceeded, max of {0}/hr allowed. Remaining = {1}&quot;,
                        rateLimit,
                        limitRemaining),
                    xcp);
            }

        }

        /// &lt;summary&gt;
        /// Variant that just takes screen name, rather than acting on existing
        /// instance.
        /// &lt;/summary&gt;
        ///
&lt;param name=&quot;ScreenName&quot;&gt;&lt;/param&gt;
        public void CalcAddlInfo(string screenName)
        {
            Peep p = new Peep { ScreenName = screenName };
            p.CalcAddlInfo();
        }
    }
}
</pre>
<p>The <strong>CalcAddlInfo</strong> method just invokes the show.xml API call and then reads the <strong>friends_count</strong> and <strong>statuses_count</strong> fields.</p>
<h3>Hey, Where&#8217;s My GUI?</h3>
<p>Ok, so at this point, we have the following code chunks:</p>
<ul>
<li><strong>Peep.cs</strong> &#8212; wraps data for a single user and gives us method to get a few additional fields</li>
<li><strong>Peeps.cs</strong> &#8212; subclasses <strong>List&lt;Peep&gt;</strong> and gives us method to get list of people that we follow</li>
<li><strong>TwitterUtility.cs</strong> &#8212; some miscellaneous helper functions</li>
</ul>
<p>Now let&#8217;s throw a simple Win Forms GUI on top of these classes, so that we can test things out.  Here&#8217;s what the final result will look like, after calling our <strong>PeopleFollowedBy</strong> method:</p>
<p><img class="alignnone size-full wp-image-854" title="ourgui" src="http://spsexton.files.wordpress.com/2009/04/ourgui.jpg?w=821&#038;h=577" alt="ourgui" width="821" height="577" /></p>
<p>The code for this couldn&#8217;t be simpler.  I just call the <strong>Peeps.PeopleFollowedBy</strong> method, which returns an instance of the <strong>Peeps</strong> class (which is really a <strong>List&lt;Peep&gt;</strong>).  And then I bind the collection to a <strong>DataGridView</strong>.  Presto.</p>
<p>(If you&#8217;re paying attention, you&#8217;ll also notice that my rate limit is listed as 20,000/hr, rather than the default 100/hr.  This is because I requested &#8220;white list&#8221; status and the Twitter crew kindly consented to bump my rate limit.  This applies whenever I&#8217;m making API calls from my specific IP address).</p>
<p>For what it&#8217;s worth, here&#8217;s the event handler code for the Load Grid button in the GUI.  Notice that I also make a test call to the <strong>CalcAddlInfo</strong> method&#8211;so we can step through the call in the debugger and see how it works.</p>
<pre class="brush: csharp;">
        private void btnLoadGrid_Click(object sender, EventArgs e)
        {
            int rateLimit;
            int limitRemaining;

            Cursor = Cursors.WaitCursor;
            Peeps peeps = Peeps.PeopleFollowedBy(txtScreenName.Text, out rateLimit, out limitRemaining);

            lblNumFollowing.Text = peeps.Count.ToString();
            lblRateLimit.Text = rateLimit.ToString();
            lblRemaining.Text = limitRemaining.ToString();

            peeps[5].CalcAddlInfo();

            dgvPeeps.DataSource = peeps;
            Cursor = Cursors.Default;
        }
</pre>
<h3>Wrapping Up and Next Steps</h3>
<p>That&#8217;s all there is to it&#8211;the process of making calls to the Twitter API from .NET code and consuming the resulting XML data using LINQ is pretty straightforward.</p>
<p>Where am I headed next, on my way to doing some Silverlight demos?  Here&#8217;s what I&#8217;ll cover in the next post:</p>
<ul>
<li>Making my API methods smart about rate limits, using timers to acquire Twitter data quietly in the background&#8211;at a rate that is just slow enough to not trigger the rate limit.</li>
<li>Possibly caching the data on the client</li>
</ul>
<p>If we were going to productize the code that I&#8217;ve presented, we&#8217;d also want to think about:</p>
<ul>
<li>Moving the Twitter API stuff out of the data objects and into a separate class</li>
<li>Better exception handling</li>
<li>Wrapping the entire Twitter API, rather than just a couple methods</li>
</ul>
<br />Posted in LINQ Tagged: .NET, C#, LINQ, Twitter, Twitter API <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/spsexton.wordpress.com/837/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/spsexton.wordpress.com/837/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/spsexton.wordpress.com/837/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/spsexton.wordpress.com/837/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/spsexton.wordpress.com/837/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/spsexton.wordpress.com/837/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/spsexton.wordpress.com/837/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/spsexton.wordpress.com/837/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/spsexton.wordpress.com/837/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/spsexton.wordpress.com/837/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=837&subd=spsexton&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://stuff.seans.com/2009/04/04/a-simple-net-twitter-api-wrapper-using-linq/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8922e4d5254d602ba3ed32dd073b5a4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">spsexton</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/04/friendsdata1.jpg" medium="image">
			<media:title type="html">Output of Friends Request</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/04/userdata.jpg" medium="image">
			<media:title type="html">Data Returned from Users Request</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/04/ourgui.jpg" medium="image">
			<media:title type="html">ourgui</media:title>
		</media:content>
	</item>
		<item>
		<title>The Baby Has Two Eyeballs</title>
		<link>http://stuff.seans.com/2009/03/24/the-baby-has-two-eyeballs/</link>
		<comments>http://stuff.seans.com/2009/03/24/the-baby-has-two-eyeballs/#comments</comments>
		<pubDate>Tue, 24 Mar 2009 17:55:43 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[Concurrency]]></category>
		<category><![CDATA[Multiprocessor]]></category>
		<category><![CDATA[Parallel Programming]]></category>

		<guid isPermaLink="false">http://stuff.seans.com/?p=668</guid>
		<description><![CDATA[
Driving home the other night, I was teasing my 4-yr old daughter (as I often do).  We were talking about what sorts of games to play when we got home and I suggested that we could spend our time poking Lucy&#8217;s baby brother Daniel in the eye.  I also pointed out that we&#8217;d have to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=668&subd=spsexton&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-medium wp-image-790" title="eyeballs" src="http://spsexton.files.wordpress.com/2009/03/eyeballs.jpg?w=300&#038;h=270" alt="eyeballs" width="300" height="270" /></p>
<p>Driving home the other night, I was teasing my 4-yr old daughter (as I often do).  We were talking about what sorts of games to play when we got home and I suggested that we could spend our time poking Lucy&#8217;s baby brother Daniel in the eye.  I also pointed out that we&#8217;d have to take turns and asked Lucy which of us should go first.</p>
<p>Lucy protested.  &#8220;Daddy&#8221;, she said excitedly, &#8220;we don&#8217;t have to take turns&#8211;Daniel has two eyeballs&#8221;!</p>
<p>After I stopped laughing at this, I realized that Lucy had seen something very important, which hadn&#8217;t even occurred to me:</p>
<p><em><strong>Poking a baby in the eye is something that can be done in parallel!</strong></em></p>
<p>Yes, yes, of course&#8211;you should <strong>never</strong> poke a baby in the eye.  And if you have a pre-schooler, you should <strong>never</strong> suggest eye-poking as a legitimate game to play, even jokingly.  Of course I did explain to Lucy that we really can&#8217;t poke Daniel in the eye(s).</p>
<p>But Lucy&#8217;s observation pointed out to me how limited I&#8217;d been in my thinking.  I&#8217;d just assumed that poking Daniel in the eye was something that we&#8217;d do serially.  First I would poke Dan in the eye.  And then, once finished, Lucy would step up and take <strong>her</strong> turn poking Dan in the eye.  Lucy hadn&#8217;t made this assumption.  She immediately realized that we could make use of both eyeballs at the same time.</p>
<p>There&#8217;s an obvious parallel here to how we think about writing software.  We&#8217;ve been programming on single-CPU systems for so long, that we automatically think of an algorithm as a series of steps to be performed one at a time.  We all remember the first programs that we wrote and how we learned about how computers work.  The computer takes our list of instructions and patiently executes one at a time, from top to bottom.</p>
<p>But, of course, we no longer program in a single-CPU environment.  Most of today&#8217;s desktop (and even laptop) machines come with dual-core CPUs.  We&#8217;re also seeing more and more quad-core machines appear on desktops, even in the office.  We&#8217;ll likely see an 8-core system from Intel in early 2010 and even 16-core machines before too long.</p>
<p>So what does this mean to the average software developer?</p>
<p>We need to stop thinking serially when writing new software.  It just doesn&#8217;t cut it anymore to write an application that does all of its work in a single thread, from start to finish.  Customers are going to be buying &#8220;faster&#8221; machines which are not technically faster, but have more processors.  And they&#8217;ll want to know why your software doesn&#8217;t run any faster.</p>
<p>As developers, we need to start thinking in parallel.  We have to learn how to decompose our algorithms into groups of related tasks, many of which can be done in parallel.</p>
<p>This is a paradigm shift in how we design software.  In the same way that we&#8217;ve been going through a multiprocessing hardware revolution, we need to embark on a similar revolution in the world of software design.</p>
<p>There are plenty of resources out there to help us dive into the world of parallel computing.  A quick search for books reveals:</p>
<p style="padding-left:30px;"><a href="http://www.amazon.com/Introduction-Parallel-Computing-Ananth-Grama/dp/0201648652/ref=sr_1_6?ie=UTF8&amp;s=books&amp;qid=1237915533&amp;sr=1-6" target="_blank">Introduction to Parallel Computing</a> &#8211; Grama, Karypis, Kumar &amp; Gupta, 2003.</p>
<p style="padding-left:30px;"><a href="http://www.amazon.com/Art-Multiprocessor-Programming-Maurice-Herlihy/dp/0123705916/ref=sr_1_5?ie=UTF8&amp;s=books&amp;qid=1237915533&amp;sr=1-5" target="_blank">The Art of Multiprocessor Programming</a> &#8211; Herlihy &amp; Shavit, 2008.</p>
<p style="padding-left:30px;"><a href="http://www.amazon.com/Principles-Parallel-Programming-Calvin-Lin/dp/0321487907/ref=sr_1_3?ie=UTF8&amp;s=books&amp;qid=1237915533&amp;sr=1-3" target="_blank">Principles of Parallel Programming</a> &#8211; Lin &amp; Snyder, 2008.</p>
<p style="padding-left:30px;"><a href="http://www.amazon.com/Patterns-Parallel-Programming-Software/dp/0321228111/ref=sr_1_2?ie=UTF8&amp;s=books&amp;qid=1237915533&amp;sr=1-2" target="_blank">Patterns for Parallel Programming</a> &#8211; Mattson, Sanders &amp; Massengill, 2004.</p>
<p>The following paper is also a good overview of hardware and software issues:</p>
<p style="padding-left:30px;"><a href="http://www.eecs.berkeley.edu/Pubs/TechRpts/2006/EECS-2006-183.pdf" target="_blank">The Landscape of Parallel Computing Research: A View from Berkeley</a> &#8211; Asanovic et al, 18 Dec 2006.</p>
<p>My point here is this:  As a software developer, it&#8217;s <strong>critical </strong>that you start thinking about parallel computing&#8211;not just as some specialized set of techniques that you might use someday, but as one of the primary tools in your toolbox.</p>
<p>After all, today&#8217;s two-eyed baby will be sporting 16 eyes before we know it.  Are you ready to do some serious eye-poking?</p>
<br />Posted in Miscellaneous Tagged: Concurrency, Multiprocessor, Parallel Programming <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/spsexton.wordpress.com/668/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/spsexton.wordpress.com/668/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/spsexton.wordpress.com/668/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/spsexton.wordpress.com/668/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/spsexton.wordpress.com/668/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/spsexton.wordpress.com/668/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/spsexton.wordpress.com/668/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/spsexton.wordpress.com/668/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/spsexton.wordpress.com/668/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/spsexton.wordpress.com/668/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=668&subd=spsexton&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://stuff.seans.com/2009/03/24/the-baby-has-two-eyeballs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8922e4d5254d602ba3ed32dd073b5a4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">spsexton</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/03/eyeballs.jpg?w=300" medium="image">
			<media:title type="html">eyeballs</media:title>
		</media:content>
	</item>
		<item>
		<title>Hello Silverlight World, part 3 &#8211; The Lifecycle of a Silverlight Control</title>
		<link>http://stuff.seans.com/2009/03/23/hello-silverlight-world-part-3-the-lifecycle-of-a-silverlight-control/</link>
		<comments>http://stuff.seans.com/2009/03/23/hello-silverlight-world-part-3-the-lifecycle-of-a-silverlight-control/#comments</comments>
		<pubDate>Mon, 23 Mar 2009 17:27:13 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[CoreCLR]]></category>
		<category><![CDATA[Silverlight Plug-in]]></category>
		<category><![CDATA[Silverlight Presentation Core]]></category>
		<category><![CDATA[XAP File]]></category>

		<guid isPermaLink="false">http://stuff.seans.com/?p=707</guid>
		<description><![CDATA[Ok, continuing with building a simple Wizard-generated Silverlight application and then staring at it to see how it works..  Last time, I talked about the Application object in Silverlight vs. WPF.  This time I&#8217;ll continue looking at the pieces in the sample Silverlight application, looking at the Page class that was generated and what happens [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=707&subd=spsexton&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:left;">Ok, continuing with building a simple Wizard-generated Silverlight application and then staring at it to see how it works..  Last time, I talked about <a href="http://stuff.seans.com/2009/03/10/hello-silverlight-world-part-2-the-application-object/" target="_blank">the Application object in Silverlight vs. WPF</a>.  This time I&#8217;ll continue looking at the pieces in the sample Silverlight application, looking at the Page class that was generated and what happens to this control at runtime on a client machine.</p>
<p style="text-align:justify;"><span style="text-decoration:underline;"><strong>Pages vs. Windows</strong></span></p>
<p>I pointed out a couple of posts back the interesting difference here, just in the terminology.  In Silverlight, your main design surface is a &#8220;page&#8221;, which sort of comes from the fact that you&#8217;re serving up a series of web &#8220;pages&#8221; with some content in each.  (Nevermind that a Silverlight control can never be an entire page by itself, but must be hosted in an .html or .aspx page).  In WPF, the main design surface is a &#8220;window&#8221;, which seems appropriate because it runs in a bordered window.</p>
<p style="text-align:justify;"><strong><span style="text-decoration:underline;">Silverlight&#8217;s UserControl Class</span><br />
</strong></p>
<p>In<strong> </strong>Silverlight, you render all of your content in a class that derives from <strong>System.Windows.Controls.UserControl</strong>.  When you use the wizard to generate a Silverlight application, it creates a class named <strong>Page</strong>, e.g.:</p>
<pre class="brush: csharp;">
    public partial class Page : UserControl
    {
        public Page()
        {
            InitializeComponent();
        }
    }
</pre>
<p>One other quick thing to look at, is what else we&#8217;re doing in our child class at runtime, beyond what we get in the <strong>UserControl </strong>base class.  If you build your Silverlight application and then look at the other half of the partial class, i.e. the generated code in <strong>Page.g.cs</strong>, you&#8217;ll see:</p>
<pre class="brush: csharp;">
    public partial class Page : System.Windows.Controls.UserControl {

        internal System.Windows.Controls.Grid LayoutRoot;

        private bool _contentLoaded;

        /// &lt;summary&gt;
        /// InitializeComponent
        /// &lt;/summary&gt;
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        public void InitializeComponent() {
            if (_contentLoaded) {
                return;
            }
            _contentLoaded = true;
            System.Windows.Application.LoadComponent(this, new System.Uri(&quot;/SilverlightApplication2;component/Page.xaml&quot;, System.UriKind.Relative));
            this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName(&quot;LayoutRoot&quot;)));
        }
    }
</pre>
<p>So, like our <strong>App </strong>class that derived from <strong>System.Windows.Application</strong>, the <strong>Page</strong> class defines an <strong>InitializeComponent</strong> method that just calls the static <strong>Application.LoadComponent</strong> method, which just constitutes an object in question, based on its .xaml.  So for both our <strong>App</strong> and our <strong>Page</strong> class, the class is getting instantiated and then <strong>InitializeComponent</strong> causes it to finish initializing by reading the associated .xaml file and then setting properties and creating child objects based on what is in the .xaml.  This is the magic fairy dust that allows .xaml to work&#8211;at runtime, the .xaml is just interpreted and associated objects are created.</p>
<p>The second half of this process is happening at the point where we are setting the <strong>LayoutRoot</strong> property.  The wizard generated some .xaml for our page that has a Grid as the topmost element, with the name &#8220;LayoutRoot&#8221;.  Then, at code generation time, we get a <strong>Grid</strong> object declared and then point it to the object that we loaded from the .xaml.  (Using the <strong>FindName</strong> method).</p>
<p style="text-align:justify;"><span style="text-decoration:underline;"><strong>Where Are We?</strong></span></p>
<p>Ok, so we&#8217;ve seen that there really isn&#8217;t much to our <strong>Page </strong>class, other than the fact that it constitutes itself from the .xaml.  But what is really going on at runtime, on the client where this control will be hosted?</p>
<p><span style="text-decoration:underline;"><strong>The Lifecycle of a Silverlight Control</strong></span></p>
<p>To answer that, let&#8217;s just walk through the entire lifecycle of our Silverlight control, starting from how the code is downloaded from the server and continuing on to how the Silverlight runtime on the client&#8217;s machine loads and renders the control.</p>
<p><span style="text-decoration:underline;"><strong>It All Starts With a Web Page</strong></span></p>
<p><img class="size-full wp-image-763 alignleft" title="plugin-model" src="http://spsexton.files.wordpress.com/2009/03/plugin-model.jpg?w=287&#038;h=210" alt="plugin-model" width="287" height="210" /></p>
<p>Here&#8217;s a diagram from the <a href="http://msdn.microsoft.com/en-us/library/cc221363(VS.95).aspx" target="_blank">MSDN documentation</a> that gives us the big picture.  Your Silverlight control runs in a managed environment (the Silverlight Common Language Runtime), which in turn runs in the context of a browser plug-in.  And that plug-in runs in the context of a web page that is downloaded from a web server to the client machine.</p>
<p>Remember that when we created our Silverlight application using the Visual Studio wizard, it also generated an ASP.NET web application in which to host our control.  (e.g. <strong>SilverlightApplication1.Web</strong>).  If you look at the web application, you&#8217;ll see that we&#8217;ve been given a couple examples of pages hosting our Silverlight control.  Specifically, you&#8217;ll see an .aspx and an .html page.  For now, let&#8217;s look at the more basic of the two&#8211;the .html page.</p>
<p>If you open this test page, e.g. <strong>SilverlightApplication1TestPage.html</strong>, and scroll to the bottom, you&#8217;ll see an &lt;object&gt; tag that mentions Silverlight:</p>
<pre class="brush: xml;">
    &lt;object data=&quot;data:application/x-silverlight-2,&quot; type=&quot;application/x-silverlight-2&quot; width=&quot;100%&quot; height=&quot;100%&quot;&gt;&lt;param name=&quot;source&quot; value=&quot;ClientBin/SilverlightApplication1.xap&quot;/&gt;&lt;param name=&quot;onerror&quot; value=&quot;onSilverlightError&quot; /&gt;&lt;param name=&quot;background&quot; value=&quot;white&quot; /&gt;&lt;param name=&quot;minRuntimeVersion&quot; value=&quot;2.0.31005.0&quot; /&gt;&lt;param name=&quot;autoUpgrade&quot; value=&quot;true&quot; /&gt;&lt;a href=&quot;http://go.microsoft.com/fwlink/?LinkID=124807&quot; style=&quot;text-decoration: none;&quot;&gt;
            &lt;img src=&quot;http://go.microsoft.com/fwlink/?LinkId=108181&quot; alt=&quot;Get Microsoft Silverlight&quot; style=&quot;border-style: none&quot;/&gt;
        &lt;/a&gt;
    &lt;/object&gt;
</pre>
<p>What we see here is a standard HTML &lt;object&gt; tag, which allows us to embed a 3rd party plug-in into the browser on the client&#8217;s machine.  When rendering the web page, the browser will set aside an area of the page and let the plug-in render directly to that area.  In this case, the 3rd party is Microsoft and the plug-in is Silverlight.</p>
<p>So here&#8217;s how things get rolling with our Silverlight control, on the client&#8217;s machine (whoever is pointing their browser at your .html page):</p>
<ul>
<li>Client starts up their browser and points it at <strong>SilverlightApplication1TestPage.html </strong>(let&#8217;s assume that the test page is on a web server somewhere)</li>
<li>The .html page is downloaded from the web server to the client and the browser begins rendering the HTML content</li>
<li>The browser reaches the &lt;object&gt; tag, which indicates that a plugin should be loaded, started up, and allowed to render that part of the page</li>
<li>To figure out how to call the plugin, the browser uses the value of the <strong>type</strong> attribute on the <strong>object </strong>tag.</li>
<li>In our cases, this type is <strong>application/x-silverlight-2</strong>.  This is a <a href="http://en.wikipedia.org/wiki/MIME_type" target="_blank">MIME type</a>, which maps to Silverlight 2</li>
<li>Using the MIME type, the browser loads the plugin
<ul>
<li>Under Windows, there is a registry entry that associates this MIME type with an ActiveX control named AgControl.AgControl, which in turn is implemented by a DLL npctrl.dll, located in C:\Program Files\Microsoft Silverlight\2.0.40115.0</li>
<li>So npctrl.dll is the actual plugin implementation&#8211;an unmanaged Windows DLL that implements the plugin API and, in turn, launches the Silverlight CLR&#8211;the execution environment in which your Silverlight control actually runs</li>
</ul>
</li>
</ul>
<p>Ok, if you were paying attention, you may have noticed something surprising in that last bullet point:  ActiveX??  Isn&#8217;t ActiveX dead and buried, now that we&#8217;re dealing with a managed environment?</p>
<p>Well, yes and no.  The code that <strong>we </strong>are authoring&#8211;our Silverlight control&#8211;does run in a managed environment on the client machine, in that it runs inside of the Silverlight CLR/runtime.  But the Silverlight plugin itself has to interact with the web browser and, as such, is unmanaged code that implements that standard browser plug-in API(s) that allow it to run within the browser.</p>
<p>So clearly, npctrl.dll is unmanaged code.  But ActiveX?  The MSDN documentation is not 100% clear on this point, but here&#8217;s what I think is going on.  npctrl.dll is both a classic Win32 DLL (non-COM), as well as an ActiveX control (COM server).  Which mode it runs in depends on the browser.   When running inside of Internet Explorer, the plug-in runs as an ActiveX control, implementing the <strong>IXcpControl</strong> COM interface.  However, when Silverlight is hosted in other browsers, like Mozilla, it implements the Netscape Plug-in API, running as a classic Win32 DLL.  (It implements functions like <strong>NP_Initialize</strong> and <strong>NP_GetEntryPoints</strong>).  <em>[This paragraph is mostly conjecture].</em></p>
<p><span style="text-decoration:underline;"><strong>Silverlight Presentation Core<br />
</strong></span></p>
<p><img class="size-full wp-image-767 alignnone" title="silverlight-architecture" src="http://spsexton.files.wordpress.com/2009/03/silverlight-architecture.jpg?w=502&#038;h=440" alt="silverlight-architecture" width="502" height="440" /></p>
<p>Within the Silverlight plug-in, the next layer to take control is the <strong>Silverlight Presentation Core</strong>.  You can see the Presentation Core as the bottom blue box in this diagram (also found in <a href="http://msdn.microsoft.com/en-us/library/bb404713(VS.95).aspx" target="_blank">MSDN documentation</a>).</p>
<p>The <strong>Presentation Core</strong> is responsible for rendering everything in the browser, handling user interaction, playing video, and parsing XAML.  It&#8217;s implemented in <strong>agcore.dll</strong>, which is a classic Win32 DLL.  (Not a COM server and not a .NET executable).</p>
<p>When your browser starts up (in Firefox, at least), both npctrl.dll (Plug-in) and agcore.dll (Presentation Core) are loaded.  The remaining Silverlight runtime libraries described below are only loaded when you actually load a page containing a Silverlight control.</p>
<p><span style="text-decoration:underline;"><strong>Silverlight CoreCLR<br />
</strong></span></p>
<p>After your browser has loaded the Silverlight plug-in, it does three basic things: <em></em></p>
<ul>
<li>Starts up the <strong>Silverlight Common Language Runtime</strong></li>
<li>Downloads the .xap file containing your Silverlight control and Application object from the server</li>
<li>Instantiates your Application object and loads it</li>
</ul>
<p>The <strong>CoreCLR</strong>, or <strong>Silverlight Common Language Runtime</strong>, is the Silverlight version of the CLR that runs inside the Silverlight plug-in.  (Labeled <em>CLR Execution Engine </em>in the above diagram).  This is the managed environment that your Silverlight applications run inside, similar to the CLR that hosts thick-client .NET applications.</p>
<p>The <strong>CoreCLR</strong> is implemented in coreclr.dll, also in C:\Program Files\Microsoft Silverlight\2.0.xxxxx.0.  The CoreCLR is based on the same codebase as the desktop version of the CLR, but much smaller, and with features not required in a browser environment removed.  (In the desktop world, the equivalent DLLs are mscoree.dll and mscorwks.dll).</p>
<p>Note: coreclr.dll is also just a &#8220;plain old&#8221; unmanaged Win32 DLL.  It is the implementation of the .NET CLR, so it does not run in a managed environment itself.</p>
<p><span style="text-decoration:underline;"><strong>The XAP File</strong></span></p>
<p>Before Silverlight can run any of your code on the client machine, it has to download it from the server.  Your Silverlight application is packaged into a .xap file.  The .xap file is nothing more than a .zip file that has been renamed.  You can prove this to yourself by building your application and then renaming the resulting .xap file as a .zip file.</p>
<p><img class="alignnone size-full wp-image-776" title="silverlight-application-structure" src="http://spsexton.files.wordpress.com/2009/03/silverlight-application-structure.jpg?w=600&#038;h=365" alt="silverlight-application-structure" width="600" height="365" /></p>
<p>If you look at the files inside your .xap, for a typical wizard-generated Silverlight application, you&#8217;ll find two files:</p>
<ul>
<li>AppManifest.xaml</li>
<li>SilverlightApplication1.dll</li>
</ul>
<p>The <strong>AppManifest.xaml</strong> file is the application manifest, which tells the Silverlight runtime what DLLs are present in this package and which one contains the entry point, or startup object, for your Silverlight application.  For example, you might see something like the following:</p>
<pre class="brush: xml;">
&lt;Deployment xmlns=&quot;http://schemas.microsoft.com/client/2007/deployment&quot; xmlns:x=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;
    EntryPointAssembly=&quot;SilverlightApplication1&quot;
    EntryPointType=&quot;SilverlightApplication1.App&quot;
    RuntimeVersion=&quot;2.0.31005.0&quot;&gt;
  &lt;Deployment.Parts&gt;
    &lt;AssemblyPart x:Name=&quot;SilverlightApplication1&quot; Source=&quot;SilverlightApplication1.dll&quot; /&gt;
  &lt;/Deployment.Parts&gt;
&lt;/Deployment&gt;
</pre>
<p>Note that the manifest tells Silverlight to load the assembly located in <strong>SilverlightApplication1.dll </strong>and that the startup object is <strong>SilverlightApplication1.App</strong>, which is the class that derives from <strong>System.Windows.Application</strong>.</p>
<p><span style="text-decoration:underline;"><strong>Starting Up</strong></span></p>
<p>Once the .xap file is downloaded, the <strong>CoreCLR </strong>can instantiate your object and get things started.  It does this by:</p>
<ul>
<li>Instantiating an instance of your entry point type, e.g. <strong>SilverlightApplication1.App</strong></li>
<li>Firing<strong> </strong>the <strong>Application.Startup</strong> event</li>
</ul>
<p>Our wizard-generated Silverlight application included wizard-generated code to get everything up and running as follows:</p>
<ul>
<li>During the <strong>App</strong> constructor
<ul>
<li>Wire a handler for the <strong>Application.Startup</strong> event</li>
<li>Call <strong>App.InitializeComponent</strong></li>
</ul>
</li>
<li><strong>App.InitializeComponent</strong>, also wizard-generated :
<ul>
<li>Calls <strong>Application.LoadComponent</strong>, to reconstitute our <strong>App</strong> object from the .xaml  <em>(like WPF, the XAML <a href="http://stuff.seans.com/2008/07/13/hello-wpf-world-part-2-why-xaml/" target="_blank">lives inside your assembly as compiled BAML</a>)</em></li>
</ul>
</li>
<li>The handler for the <strong>Application.Startup</strong> event
<ul>
<li>Instantiates a new <strong>Page</strong> object  (the actual Silverlight control to be displayed)</li>
<li>Sets the <strong>RootVisual</strong> property of the parent <strong>App</strong> object to point to the <strong>Page</strong></li>
</ul>
</li>
<li>During<strong> </strong>the <strong>Page</strong> constructor
<ul>
<li>Call <strong>Page.InitializeComponent</strong></li>
</ul>
</li>
<li><strong>Page.InitializeComponent</strong>
<ul>
<li>Calls <strong>Application.LoadComponent</strong>, reconstituting the <strong>Page </strong>object from the associated XAML (BAML)</li>
</ul>
</li>
</ul>
<p>That&#8217;s really all there is to it.  At this point, through the magic of the browser plug-in architecture and the fact that the Silverlight CoreCLR is running on the client&#8217;s PC, you have a native .NET (Silverlight) application running on the client, hosted in the browser.</p>
<p><span style="text-decoration:underline;"><strong>References</strong></span></p>
<p style="padding-left:30px;"><a href="http://blogs.msdn.com/tess/archive/2008/08/21/debugging-silverlight-applications-with-windbg-and-sos-dll.aspx" target="_blank">Debugging Silverlight Applications with windbg and sos.dll</a> &#8211; 21 Aug 2008 &#8211; Tess Ferrandez<br />
<a href="http://www.microsoft.com/whdc/devtools/debugging/debugstart.mspx" target="_blank">Debugging Tools and Symbols: Getting Started</a> &#8211; Windows Hardware Developer Central<br />
<a href="http://blogs.zdnet.com/Burnette/?p=297" target="_blank">Dissecting Silverlight</a> &#8211; 1 May 2007 &#8211; Ed Burnette<br />
<a href="http://www.netfxharmonics.com/2009/01/Setting-a-Silverlight-2-Startup-Breakpoint-using-WinDBG" target="_blank">Setting a Silverlight 2 Startup Breakpoint Using WinDBG</a> &#8211; 10 Jan 2009 &#8211; David Betz<br />
<a href="http://msdn.microsoft.com/en-us/library/cc221363(VS.95).aspx" target="_blank">Silverlight Application Services</a> &#8211; MSDN<br />
<a href="http://msdn.microsoft.com/en-us/library/cc838120(VS.95).aspx" target="_blank">Silverlight Application Structure</a> &#8211; MSDN<br />
<a href="http://msdn.microsoft.com/en-us/library/bb404713(VS.95).aspx" target="_blank">Silverlight Architecture</a> &#8211; MSDN<br />
<a href="http://msdn.microsoft.com/en-us/library/cc838259(VS.95).aspx" target="_blank">Silverlight Plug-In Object Reference</a> &#8211; MSDN</p>
<p style="text-align:justify;">
<br />Posted in Silverlight Tagged: CoreCLR, Silverlight, Silverlight Plug-in, Silverlight Presentation Core, XAP File <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/spsexton.wordpress.com/707/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/spsexton.wordpress.com/707/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/spsexton.wordpress.com/707/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/spsexton.wordpress.com/707/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/spsexton.wordpress.com/707/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/spsexton.wordpress.com/707/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/spsexton.wordpress.com/707/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/spsexton.wordpress.com/707/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/spsexton.wordpress.com/707/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/spsexton.wordpress.com/707/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=707&subd=spsexton&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://stuff.seans.com/2009/03/23/hello-silverlight-world-part-3-the-lifecycle-of-a-silverlight-control/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8922e4d5254d602ba3ed32dd073b5a4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">spsexton</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/03/plugin-model.jpg" medium="image">
			<media:title type="html">plugin-model</media:title>
		</media:content>

		<media:content url="http://go.microsoft.com/fwlink/?LinkId=108181" medium="image">
			<media:title type="html">Get Microsoft Silverlight</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/03/silverlight-architecture.jpg" medium="image">
			<media:title type="html">silverlight-architecture</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/03/silverlight-application-structure.jpg" medium="image">
			<media:title type="html">silverlight-application-structure</media:title>
		</media:content>
	</item>
		<item>
		<title>Hello Silverlight World, part 2 &#8211; The Application Object</title>
		<link>http://stuff.seans.com/2009/03/10/hello-silverlight-world-part-2-the-application-object/</link>
		<comments>http://stuff.seans.com/2009/03/10/hello-silverlight-world-part-2-the-application-object/#comments</comments>
		<pubDate>Tue, 10 Mar 2009 17:48:27 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Silverlight Application]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://stuff.seans.com/?p=659</guid>
		<description><![CDATA[In my last Silverlight post, Hello Silverlight part 1 &#8211; Generating the Project, I started creating a Silverlight-based Hello World application.  I described the various pieces that get created by the Project Wizard in Visual Studio 2008.  I also started comparing the Silverlight application to a wizard-generated WPF application.
Let me continue looking at the individual [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=659&subd=spsexton&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>In my last Silverlight post, <a href="http://stuff.seans.com/2009/01/29/hello-silverlight-world-part-1-generating-the-project/" target="_blank">Hello Silverlight part 1 &#8211; Generating the Project</a>, I started creating a Silverlight-based Hello World application.  I described the various pieces that get created by the Project Wizard in Visual Studio 2008.  I also started comparing the Silverlight application to a wizard-generated WPF application.</p>
<p>Let me continue looking at the individual pieces that make up a bare-bones Silverlight application.  Maybe the convention should be to call it a &#8220;Silverlight control&#8221;, since that seems a bit more accurate.  For now, I&#8217;ll stick with Visual Studio&#8217;s terminology and call it a &#8220;Silverlight application&#8221;.</p>
<p><strong>App.xaml</strong></p>
<p>Like our WPF application, the main entry point of the Silverlight application is described by the <strong>App.xaml</strong> / <strong>App.xaml.cs</strong> files.  In both WPF and Silverlight, these files define a subclass of <strong>System.Windows.Application</strong>, which serves as the main object loaded at runtime.</p>
<p>In both WPF and Silverlight, we can look at the code in <strong>App.xaml.cs</strong> and <strong>App.g.cs</strong> (generated at build time) to get a sense of how the application gets loaded and run.  What we see is very different behavior, despite the fact that both <strong>App</strong> classes appear to derive from <strong>System.Windows.Application</strong>.</p>
<p>In the WPF application, here&#8217;s what happens:</p>
<ul>
<li>There is an entry point named Main()</li>
<li>Main()
<ul>
<li>Creates an instance of the <strong>App</strong> class</li>
<li>Calls the <strong>InitializeComponent</strong> method of the <strong>App </strong>object</li>
<li>Calls the <strong>Run</strong> method of the <strong>App </strong>object</li>
</ul>
</li>
<li><strong>App.InitializeComponent</strong>
<ul>
<li>Sets <strong>App.StartupUri</strong> property to point to a <strong>Uri</strong> object pointing to <strong>Window1.xaml</strong>, our main window</li>
</ul>
</li>
</ul>
<p>In the Silverlight application, something very different is going on at startup:</p>
<ul>
<li>There is no Main() method</li>
<li>The <strong>App</strong> constructor
<ul>
<li>Wires up the <strong>Application_Startup</strong> event handler to the <strong>App.Startup</strong> property</li>
<li>Wires up the <strong>Application_Exit</strong> event handler to the <strong>App.Exit</strong> property</li>
<li>Wires up the <strong>Application_UnhandledException</strong> event handler to the <strong>UnhandledException</strong> property</li>
<li>Invokes <strong>InitializeComponent</strong></li>
</ul>
</li>
<li><strong>Application_Startup</strong>
<ul>
<li>Instantiates a new <strong>Page </strong>object (the class for our main page)</li>
<li>Sets <strong>App.RootVisual</strong> to point to this page object</li>
</ul>
</li>
<li><strong>InitializeComponent</strong>
<ul>
<li>Calls <strong>Application.LoadComponent</strong>, passing it a new <strong>Uri </strong>object pointing to <strong>App.xaml</strong></li>
</ul>
</li>
</ul>
<p>Why is the startup behavior so radically different, between WPF and Silverlight, given that the main application appears to be inherited from <strong>System.Windows.Application</strong> in both cases?</p>
<p>The answer is that, while the class name and namespace are identical, the <strong>Application</strong> object in Silverlight is a very different animal than the one that is part of WPF.  Remember that the WPF application is running against an entirely different .NET Framework than the Silverlight application.  WPF is referencing/using the full .NET Framework 3.5 (with pieces from 2.0, 3.0 and 3.5), while the Silverlight application is referencing/using the Silverlight Framework, which is an entirely different set of libraries.  While much of the Silverlight framework is a subset of the WPF framework, the <strong>Application</strong> object is entirely different.</p>
<ul>
<li>In WPF, the <strong>System.Windows.Application</strong> class lives in PresentationFramework.dll</li>
<li>In Silverlight, <strong>System.Windows.Application</strong> lives in System.Windows.dll</li>
</ul>
<p>PresentationFramework.dll is part of the .NET Framework 3.0 and exists on a  client system when they install the full .NET Framework (3.0 or 3.5).  System.Windows.dll is part of the Silverlight framework and exists on a client system when they install Silverlight.</p>
<p>You can see this by reading the documentation (MSDN).  Or you can see how different these <strong>Application</strong> classes are by doing the following:</p>
<ul>
<li>In the WPF application, open the <strong>App.xaml.cs</strong> file, right-click on <strong>Application</strong> and choose Go To Definition
<ul>
<li>You&#8217;ll see that the <strong>Application</strong> class has a <strong>Run</strong> method and a <strong>StartupUri</strong> property, but no <strong>RootVisual</strong> property</li>
<li>Now hover over the tab for this window in Visual Studio&#8211;you&#8217;ll see a temp filename that contains the name &#8220;PresentationFramework.dll&#8221;</li>
</ul>
</li>
<li>In the Silverlight application, open the <strong>App.xaml.cs</strong> file, right-click on <strong>Application</strong> and choose Go To Definition
<ul>
<li>You&#8217;ll see a very different <strong>Application</strong> class, with a <strong>RootVisual</strong> property, but no <strong>Run</strong> method</li>
<li>Hover over the tab again&#8211;you&#8217;ll see a temp file name containing &#8220;System.Windows.dll&#8221;</li>
</ul>
</li>
</ul>
<p><strong>Let&#8217;s Stop Here</strong></p>
<p>That&#8217;s a good stopping point, for now.  We&#8217;ve looked just a little bit under the covers in the Silverlight application&#8211;enough to see that the main <strong>Application</strong> object loaded at runtime is very different from the object loaded in the WPF application.</p>
<br />Posted in Silverlight Tagged: Silverlight, Silverlight Application, WPF <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/spsexton.wordpress.com/659/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/spsexton.wordpress.com/659/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/spsexton.wordpress.com/659/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/spsexton.wordpress.com/659/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/spsexton.wordpress.com/659/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/spsexton.wordpress.com/659/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/spsexton.wordpress.com/659/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/spsexton.wordpress.com/659/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/spsexton.wordpress.com/659/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/spsexton.wordpress.com/659/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=659&subd=spsexton&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://stuff.seans.com/2009/03/10/hello-silverlight-world-part-2-the-application-object/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8922e4d5254d602ba3ed32dd073b5a4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">spsexton</media:title>
		</media:content>
	</item>
		<item>
		<title>Learning Out Loud</title>
		<link>http://stuff.seans.com/2009/02/13/learning-out-loud/</link>
		<comments>http://stuff.seans.com/2009/02/13/learning-out-loud/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 01:14:30 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[blogging]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://stuff.seans.com/?p=649</guid>
		<description><![CDATA[I&#8217;ve always sort of figured that this blog was a place to post things I was just learning, rather than a place to publish tutorials about technologies that I have more expertise in.
Because of the nature of our field, and the amount of new technologies that are always coming out, I&#8217;m far more interested in [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=649&subd=spsexton&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve always sort of figured that this blog was a place to post things I was just learning, rather than a place to publish tutorials about technologies that I have more expertise in.</p>
<p>Because of the nature of our field, and the amount of new technologies that are always coming out, I&#8217;m far more interested in learning than I am in teaching.  There are already plenty of great teachers out there who are blogging, writing or lecturing.  I don&#8217;t really aspire to sell myself as a teacher of technologies&#8212;that would take far too much time and energy.</p>
<p>Instead, I see this blog as a forum for my attempts to learn new technologies&#8212;e.g. WPF and Silverlight.  I&#8217;m always looking for new ways to motivate myself to learn new technologies and having a blog is a good way to force myself to dive in and start learning something new.  When I realize that I haven&#8217;t posted anything for a few days, I feel the urge to start pulling together the next post.  Then, because I know I&#8217;m going to have to write about it, I find that I force myself to explore whatever the topic is in a much deeper manner than I would if I were just reading a book or attending a class.</p>
<p>This has been working out great so far.  I&#8217;m discouraged by how little time I have to study these new technologies.  I&#8217;d like to post far more frequently than I do.  But at least I&#8217;m gradually learning some new bits and pieces, about technologies like WPF and Silverlight.</p>
<p>Reminding myself of my goals also helps me to just relax and not worry so much about making mistakes.  I&#8217;m just capturing on &#8220;paper&#8221; what I&#8217;m learning, as I learn it.  Since I&#8217;m only beginning the journey of grokking whatever it is, I don&#8217;t need to worry about whether I get it right or not.</p>
<p>Remembering all of this led me to change the tagline of this blog.  Instead of offering up my thoughts on various topics, I now see this as &#8220;learning out loud&#8221;.  That perfectly describes what I think I&#8217;m doing&#8212;learning new stuff, stumbling through it, and capturing the current state of my knowledge so that I can come back and refer to it later.</p>
<p>So let the journey continue&#8212;there&#8217;s still so much to learn!</p>
<br />Posted in Miscellaneous Tagged: blogging, Learning, Silverlight, Technology, WPF <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/spsexton.wordpress.com/649/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/spsexton.wordpress.com/649/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/spsexton.wordpress.com/649/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/spsexton.wordpress.com/649/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/spsexton.wordpress.com/649/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/spsexton.wordpress.com/649/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/spsexton.wordpress.com/649/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/spsexton.wordpress.com/649/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/spsexton.wordpress.com/649/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/spsexton.wordpress.com/649/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=649&subd=spsexton&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://stuff.seans.com/2009/02/13/learning-out-loud/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8922e4d5254d602ba3ed32dd073b5a4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">spsexton</media:title>
		</media:content>
	</item>
		<item>
		<title>Windows Vista is the High School Slut</title>
		<link>http://stuff.seans.com/2009/02/05/windows-vista-is-the-high-school-slut/</link>
		<comments>http://stuff.seans.com/2009/02/05/windows-vista-is-the-high-school-slut/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 18:49:58 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[PC]]></category>
		<category><![CDATA[Hardware drivers]]></category>
		<category><![CDATA[Vista]]></category>
		<category><![CDATA[Vista drivers]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Windows Vista]]></category>

		<guid isPermaLink="false">http://stuff.seans.com/?p=651</guid>
		<description><![CDATA[In most high schools, there is a girl labeled simply as &#8220;the slut&#8221;.  This is the girl that everyone knows is a total slut&#8212;her reputation precedes her.
But every once in a while, someone discovers that a girl&#8217;s reputation is completely unfounded.  You actually get to know &#8220;the slut&#8221; and discover that the rumors all derive [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=651&subd=spsexton&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>In most high schools, there is a girl labeled simply as &#8220;the slut&#8221;.  This is the girl that everyone knows is a total slut&#8212;her reputation precedes her.</p>
<p>But every once in a while, someone discovers that a girl&#8217;s reputation is completely unfounded.  You actually get to know &#8220;the slut&#8221; and discover that the rumors all derive from some mean comments that one guy said about her several years ago.  (Ironically, likely because her behavior is the opposite of what the boy claims).</p>
<p>What&#8217;s interesting is how fast a negative impression can spread, whether it&#8217;s true or not.  In the case of the slut, word spreads quickly and pretty soon everyone simply labels her as &#8220;the slut&#8221;, without questioning where the label came from.  Even people who have never met her don&#8217;t bother to question the label.  It&#8217;s also not a reputation that she can hope to overturn, short of moving to a new school or changing her name.  People who get to know her might realize how untrue the label is.  But the majority of the school continues to think of her as the slut, because that&#8217;s what everyone says.</p>
<p><strong>Windows Vista as the Slut</strong></p>
<p>In the world of PC-based operating systems, Windows Vista is the slut.</p>
<p>Vista&#8217;s reputation has been trashed by bloggers, technical reviewers and pundits all over the web.  The bad impression is so pervasive that even the non-technical guy at the water cooler admits that he just special-ordered a PC with Windows XP because &#8220;Vista sucks&#8221;.  Even Google agrees with his assessment&#8212;the phrase &#8220;vista sucks&#8221; will net you 210,000 results, while &#8220;xp sucks&#8221; will only turn up 16,100.</p>
<p>Does Vista really suck?  If not, how did it get such a horrible reputation?</p>
<p>Vista does not suck.  In fact, many people believe that it works even better than Windows XP.  I&#8217;ve been running Vista on a number of machines for well over a year now and I haven&#8217;t had a single problem with it.  Every piece of software I&#8217;ve ever installed has worked fine.  Every hardware device I&#8217;ve hooked up to it has also worked fine.  The user experience is just prettier, cleaner, and more efficient than Windows XP.  Performance has been fine&#8212;it actually doesn&#8217;t seem to degrade over time like Windows XP used to, as you install more and more applications.  If you don&#8217;t believe me, go read some in-depth reviews done by people like Paul Thurrott and his <a href="http://www.winsupersite.com/" target="_blank">Windows SuperSite</a>.</p>
<p>Like the high school slut, Vista got her bad reputation mostly through word-of-mouth&#8212;and because people delight in sharing negative information.  Some high profile bloggers posted some very negative reviews when it first came out, and other bloggers wrote posts of their own, merely repeating the same bad impressions.  Before long, everyone&#8217;s bad impression of Vista was cemented, despite the fact that many people harshly critical of Vista had never installed or used it in any meaningful way.</p>
<p>That&#8217;s not to say that Vista didn&#8217;t have some problems when it was first released.  Many hardware vendors failed to write new drivers, so their older hardware just didn&#8217;t work with Vista.  If people tried upgrading an older system, or tried using older peripherals with Vista, they found that the hardware didn&#8217;t work.</p>
<p>The problem with drivers is really the fault of the hardware vendors, rather than Microsoft&#8217;s fault.  For these vendors, writing new drivers for old hardware is a low priority.  They&#8217;d much rather sell you new hardware (which did work with Vista) for your new machine.  This is also nothing new&#8212;we saw exactly the same thing with Windows XP when it first released, in that the older Windows NT drivers didn&#8217;t work.</p>
<p>The driver problems are old news, though.  These days, it&#8217;s hard to find a piece of hardware built in the past few years that doesn&#8217;t just work when you plug it into a Vista machine.</p>
<p><strong>Should You Be Using Vista?</strong></p>
<p>Like the slut, Vista&#8217;s reputation clears up completely once you get to know her.  Once you start using Vista on a regular basis, you start wondering what all the fuss is about.  And you find it hard to go back to Windows XP.</p>
<p>So should you use Vista?  If you&#8217;re buying a new machine, the answer is&#8212;absolutely, yes.  You&#8217;ll find that everything will just work, both hardware and software.  Unless you&#8217;re buying a really low-end machine, the performance will be just fine.  Just shoot for at least 1GB RAM (2GB is even better) and at least 2 GHz dual-core processor.  (You can get a Dell Inspiron 1525 laptop with 2GHz dual-core and 3GB RAM for under $500).</p>
<p>What about if you&#8217;re running an older machine&#8212;should you upgrade to Vista?  The simple answer is&#8212;no.  If you have an older machine running Windows XP and you&#8217;re happy with it, stick with it.  There&#8217;s no compelling reason to jump to Vista.  And&#8212;all other things being equal&#8212;Vista will perform more slowly than XP.  This has always been true.  If you had installed XP on your old Windows 98 box, it would have been pretty slow.  The truth is that hardware gets faster and faster all the time and newer versions of Windows take advantage of those performance gains.  That&#8217;s a good thing.</p>
<p><strong>Where Do We Go From Here?</strong></p>
<p>If we agree that Vista&#8217;s reputation has been unfairly tarnished, is there anything to be done about it?</p>
<p>No.</p>
<p>At this point, too many bad things have been said about Vista.  The damage has been done and it will never recover its reputation.</p>
<p>So, like the high school slut, Vista is doing the only thing it <strong>can</strong> do.  It&#8217;s moving, changing its name, making a new start.  Sometime later this year it will surface again&#8212;and we&#8217;ll be calling it &#8220;Windows 7&#8243;.</p>
<br />Posted in PC Tagged: Hardware drivers, Vista, Vista drivers, Windows, Windows Vista <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/spsexton.wordpress.com/651/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/spsexton.wordpress.com/651/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/spsexton.wordpress.com/651/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/spsexton.wordpress.com/651/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/spsexton.wordpress.com/651/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/spsexton.wordpress.com/651/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/spsexton.wordpress.com/651/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/spsexton.wordpress.com/651/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/spsexton.wordpress.com/651/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/spsexton.wordpress.com/651/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=651&subd=spsexton&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://stuff.seans.com/2009/02/05/windows-vista-is-the-high-school-slut/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8922e4d5254d602ba3ed32dd073b5a4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">spsexton</media:title>
		</media:content>
	</item>
		<item>
		<title>Hello Silverlight World, part 1 &#8211; Generating the Project</title>
		<link>http://stuff.seans.com/2009/01/29/hello-silverlight-world-part-1-generating-the-project/</link>
		<comments>http://stuff.seans.com/2009/01/29/hello-silverlight-world-part-1-generating-the-project/#comments</comments>
		<pubDate>Thu, 29 Jan 2009 18:56:48 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Application Manifest]]></category>
		<category><![CDATA[Resource Files]]></category>
		<category><![CDATA[Silverlight Project]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://stuff.seans.com/?p=615</guid>
		<description><![CDATA[In my last Silverlight post, we got all of the Silverlight bits installed.  Now it&#8217;s time to build a super simple &#8220;Hello world&#8221; example and then look at the bits and pieces that go into a basic Silverlight app.  I&#8217;ll also compare the wizard-generated Silverlight application with the same application done in WPF.  (See my [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=615&subd=spsexton&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>In my last Silverlight post, we got all of the Silverlight bits installed.  Now it&#8217;s time to build a super simple &#8220;Hello world&#8221; example and then look at the bits and pieces that go into a basic Silverlight app.  I&#8217;ll also compare the wizard-generated Silverlight application with the same application done in WPF.  (See my WPF hello-world samples: <a href="http://stuff.seans.com/2008/07/11/hello-wpf-world-part-1/" target="_blank">part 1</a>, <a href="http://stuff.seans.com/2008/07/13/hello-wpf-world-part-2-why-xaml/" target="_blank">part 2 &#8211; Why XAML</a>, and <a href="http://stuff.seans.com/2008/07/16/hello-wpf-world-part-3-forms-and-windows/" target="_blank">part 3 &#8211; Forms and Windows</a>.</p>
<p>Let&#8217;s start with the obvious&#8211;create a Silverlight project in Visual Studio 2008, using the New Project wizard.  (I&#8217;m assuming that you&#8217;ve <a href="http://stuff.seans.com/2009/01/16/silverlight-day-1-installing-everything/" target="_blank">installed everything that you need</a> for Silverlight).</p>
<p>We&#8217;re going to use C# and target version 3.5 of the .NET Framework.  You&#8217;ll see that there are templates for two different Silverlight project types:</p>
<ul>
<li>Silverlight Application</li>
<li>Silverlight Class Library</li>
</ul>
<p><img class="alignnone size-full wp-image-617" title="Project wizard" src="http://spsexton.files.wordpress.com/2009/01/1-projectwizard.jpg?w=804&#038;h=542" alt="Project wizard" width="804" height="542" /></p>
<p>Lovely.  We&#8217;ll create a simple &#8220;Silverlight Application&#8221;.</p>
<p>Before the project is actually created, we see a dialog asking us where we want to host our Silverlight Application.  Because Silverlight is a web-based technology, it has to actually be hosted in a web page somewhere.  Visual Studio is willing to generate a new project that will contain the test page.  Here&#8217;s the dialog that is shown, when creating a new Silverlight project in an empty solution:</p>
<p><img class="alignnone size-full wp-image-620" title="Hosting Options" src="http://spsexton.files.wordpress.com/2009/01/2-hostingoptions.jpg?w=443&#038;h=395" alt="Hosting Options" width="443" height="395" /></p>
<p>Here&#8217;s some more detail on what each of the three options means:</p>
<ul>
<li><strong>Add new ASP.NET Web project to the solution </strong>- creates a new solution with two projects: your Silverlight Application project and a new ASP.NET Web Application project.  The ASP.NET project will look like a typical new ASP.NET Web Application, except that it will also contain a test .aspx page and test .html page for hosting the Silverlight content.  You can also choose &#8220;ASP.NET Web Site&#8221; as your ASP.NET project type, rather than &#8220;ASP.NET Web Application&#8221;.  With a Web Application, you have to rebuild and re-publish a DLL to deploy, rather than having everything compiled dynamically (see this <a href="http://stackoverflow.com/questions/398037/asp-net-web-site-or-web-application" target="_blank">addressed in StackOverflow</a>).  In most cases, you&#8217;ll want an ASP.NET Web Application.</li>
<li><strong>Automatically generate a test page to host Silverlight at build time</strong> &#8211; In this case, you get a new solution with a single project&#8212;the Silverlight Application project.  You don&#8217;t have the overhead of a full test project for hosting the Silverlight content.  Instead, when you build the project, you&#8217;ll get a test page (TestPage.html) that shows up in your \Bin\Debug or \Bin\Release directory.  The test page is automatically set up to host the Silverlight content from your Silverlight Application project.</li>
<li><strong>Link this Silverlight control into an existing Web site</strong> &#8211; This option will be available if you start with a solution containing an ASP.NET Web Application or Web Site and add your new Silverlight project to that solution.  The Silverlight Application project will be created in the existing solution.  The wizard will also offer to create a test page in the existing site (see below).  If you choose to create the test page, you&#8217;ll get an .aspx and an .html version, as before.</li>
</ul>
<p><img class="alignnone size-full wp-image-624" title="Link to Existing Site" src="http://spsexton.files.wordpress.com/2009/01/3-linkintoexistingwebsite.jpg?w=443&#038;h=395" alt="Link to Existing Site" width="443" height="395" /></p>
<p>In general, if you&#8217;re starting fresh, you&#8217;ll want the first option&#8212;Add a new ASP.NET Web project to the solution.</p>
<p><strong>The Project Structure</strong></p>
<p>If we choose the first option, here is what the resulting solution looks like:</p>
<p><img class="alignnone size-full wp-image-625" title="Solution" src="http://spsexton.files.wordpress.com/2009/01/4-solution.jpg?w=278&#038;h=353" alt="Solution" width="278" height="353" /></p>
<p>So at this point, we have a project for our Silverlight content&#8212;<strong>HelloSilverlight</strong>, and an ASP.NET Web Application project to host the content&#8212;<strong>HelloSilverlight.Web</strong>.</p>
<p>For the moment, let&#8217;s focus on the <strong>HelloSilverlight</strong> project and compare it to its counterpart WPF Application.  Here are both projects, laid out side by side (WPF on the left):</p>
<p><img class="alignnone size-full wp-image-626" title="WPF Vs Silverlight" src="http://spsexton.files.wordpress.com/2009/01/5-wpfvssilverlight.jpg?w=493&#038;h=252" alt="WPF Vs Silverlight" width="493" height="252" /></p>
<p><strong>Forms, Windows and Pages</strong></p>
<p>Before we dive into the pieces of the project, there is some interesting terminology to talk about.  In my <a href="http://stuff.seans.com/2008/07/16/hello-wpf-world-part-3-forms-and-windows/" target="_blank">Hello WPF World, part 3</a> post, I talked about the difference between a classic Win Forms application and a WPF application.  Under Win Forms, your main window is called a &#8220;form&#8221;, and this technology goes back at least as far as Visual Basic 3.  (Further)?  With WPF, the terminology changed slightly, in that you&#8217;re working with a &#8220;window&#8221;, rather than a &#8220;form&#8221;.  And with Silverlight, our main GUI surface is called a &#8220;page&#8221;.</p>
<p>In one sense, this is just semantics.  Whether we call our main design surface a form, a window, or a page, it&#8217;s really just an area of the screen that a user interacts with.  But it&#8217;s interesting to think about where these terms come from, especially when thinking about &#8220;forms&#8221; vs. &#8220;pages&#8221;.  If we think about paper equivalents to what we&#8217;re creating in software, we started creating &#8220;forms&#8221;&#8212;bringing to the computer the process of a human filling out a paper form.  The idea is that they had a sheet with a bunch of empty boxes and they filled in the information.  In the case of a &#8220;page&#8221;, we inherit the term from the world of web &#8220;pages&#8221;.  Here the paper equivalent is very different&#8212;a page is just a static sheet containing information that you read.</p>
<p>Maybe I&#8217;m belaboring the point.  I just find it interesting that in the past we&#8217;ve used both &#8220;form&#8221; and &#8220;page&#8221; to refer to a user interface surface, and that the corresponding elements in the paper-based world are so different from each other.</p>
<p>In the case of Silverlight, we&#8217;re working with &#8220;pages&#8221;.  We inherit the terminology because we&#8217;re writing web-based software, and the web started out serving up static &#8220;pages&#8221; of content&#8211;a very good match for the corresponding real-world idea of a paper page.  But even though Silverlight is presenting a fully interactive user surface&#8211;more of a &#8220;form&#8221;&#8211;we&#8217;re using the term &#8220;page&#8221; because of the history.  Perhaps it&#8217;s just the case that the term &#8220;page&#8221; has evolved to mean something new&#8212;an interactive and dynamic surface for displaying information and gathering input.</p>
<p><strong>Back to the Silverlight Project</strong></p>
<p>Let&#8217;s get back on track and go compare our new Silverlight project to its counterpart in the WPF world.</p>
<p><strong>The Application Manifest<br />
</strong></p>
<p><strong>AppManifest.xml </strong>is a file that we have in our Silverlight application, but not in the WPF application.  In Silverlight, AppManifest is the application level manifest that describes the constituent DLLs that we are deploying, and their entry points.  In our project, you&#8217;ll see that <strong>AppManifest.xml </strong>is basically empty.  But if you build the application, you&#8217;ll see that an <strong>AppManifest.xaml </strong>file is generated in the output directory.  Looking at <strong>AppManifest.xaml</strong>, you&#8217;ll see that we list one DLL that we are deploying, HelloSilverlight.dll, and that the name of this assembly is &#8220;HelloSilverlight&#8221;.</p>
<p>So the application manifest is basically a bootstrapper for the Silverlight runtime, telling it which assemblies need to be loaded.  Note that we also still have a manifest inside our HelloSilverlight.dll file, as well.  This is just a standard .NET assembly manifest.</p>
<p><strong>AssemblyInfo</strong></p>
<p>Comparing the <strong>AssemblyInfo.cs</strong> file in the Silverlight app to its counterpart in our WPF application, they are quite similar.  The obvious difference is that the Silverlight application does not include the <strong>ThemeInfo</strong> attribute for defining theme-specific resource dictionaries.  As far as I can tell, this is not supported in Silverlight.</p>
<p><strong>Resources</strong></p>
<p>The next difference between the WPF and Silverlight projects is that the default WPF application contains the <strong>Resources.resx </strong>and <strong>Resources.Designer.cs </strong>files.  If you haven&#8217;t used resources before, the general idea is to move all of your localizable strings from the code out into a resource file and then create a separate resource file for each target language that you want to support.  The appropriate resource file is then loaded automatically at run-time and your code picks up the localized string because it is loading strings from the resource file, rather than the strings coming directly from your XAML (or from the code).</p>
<p>The default Silverlight application project doesn&#8217;t have a resource file in the project by default.  You can easily add one, however, and load your strings from the resource file.  It&#8217;s not completely clear why the file is not created by default.  Perhaps the goal is just to reduce the size of the final .xap file, since it will be downloaded to the client.  Or perhaps the thinking is that you&#8217;d be less likely to want to localize a web-based application vs. a thick client.</p>
<p><strong>Settings File</strong></p>
<p>Similarly, the Silverlight project does not include a settings file (<strong>Settings.settings</strong>).  In WPF, this is where you would write/read application settings which you want to persist between sessions.  You end up with a configuration file, e.g. <strong>Myapp.exe.config</strong>, in the same directory as your .exe.  But because the Silverlight control running on the client has no access to the file system, you can&#8217;t use .config files as a mechanism for persisting application settings.</p>
<p><strong>Let&#8217;s Stop There</strong></p>
<p>This is a good place to stop.  I&#8217;ll continue comparing the WPF and Silverlight applications next time and we&#8217;ll start looking at what happens at runtime, when rendering the Silverlight control in a browser.</p>
<br />Posted in Silverlight Tagged: Application Manifest, Resource Files, Silverlight, Silverlight Project, WPF <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/spsexton.wordpress.com/615/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/spsexton.wordpress.com/615/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/spsexton.wordpress.com/615/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/spsexton.wordpress.com/615/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/spsexton.wordpress.com/615/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/spsexton.wordpress.com/615/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/spsexton.wordpress.com/615/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/spsexton.wordpress.com/615/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/spsexton.wordpress.com/615/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/spsexton.wordpress.com/615/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=615&subd=spsexton&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://stuff.seans.com/2009/01/29/hello-silverlight-world-part-1-generating-the-project/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8922e4d5254d602ba3ed32dd073b5a4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">spsexton</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/01/1-projectwizard.jpg" medium="image">
			<media:title type="html">Project wizard</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/01/2-hostingoptions.jpg" medium="image">
			<media:title type="html">Hosting Options</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/01/3-linkintoexistingwebsite.jpg" medium="image">
			<media:title type="html">Link to Existing Site</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/01/4-solution.jpg" medium="image">
			<media:title type="html">Solution</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/01/5-wpfvssilverlight.jpg" medium="image">
			<media:title type="html">WPF Vs Silverlight</media:title>
		</media:content>
	</item>
		<item>
		<title>Hijacking Vista Special Folders on Start Menu</title>
		<link>http://stuff.seans.com/2009/01/25/hijacking-vista-special-folders-on-start-menu/</link>
		<comments>http://stuff.seans.com/2009/01/25/hijacking-vista-special-folders-on-start-menu/#comments</comments>
		<pubDate>Sun, 25 Jan 2009 01:07:24 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[Windows]]></category>
		<category><![CDATA[desktop.ini]]></category>
		<category><![CDATA[Start Menu]]></category>
		<category><![CDATA[Vista]]></category>
		<category><![CDATA[Windows 7]]></category>

		<guid isPermaLink="false">http://stuff.seans.com/?p=605</guid>
		<description><![CDATA[Ok, this wasn&#8217;t obvious, so it&#8217;s worth sharing.  What I want to do is to create a new sub-menu in the black area of Vista&#8217;s start menu, where you normally have a folder for your username, then &#8220;Documents&#8221;, &#8220;Pictures&#8221;, &#8220;Music&#8221;, etc.  I want a brand new folder where I can stick whatever shortcuts I want.
Here&#8217;s [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=605&subd=spsexton&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>Ok, this wasn&#8217;t obvious, so it&#8217;s worth sharing.  What I want to do is to create a new sub-menu in the black area of Vista&#8217;s start menu, where you normally have a folder for your username, then &#8220;Documents&#8221;, &#8220;Pictures&#8221;, &#8220;Music&#8221;, etc.  I want a brand new folder where I can stick whatever shortcuts I want.</p>
<p>Here&#8217;s a picture of the final result.  Note the &#8220;famThings&#8221; folder, which is the custom folder that I wanted.  Also note that I was able to stick a file out here, as well as a sub-folder.</p>
<p><img class="alignnone size-full wp-image-606" title="Hijacked Start Menu" src="http://spsexton.files.wordpress.com/2009/01/1-desiredresult.jpg?w=557&#038;h=781" alt="Hijacked Start Menu" width="557" height="781" /></p>
<p>As far as I can tell, there is no way to add a whole new slot for a sub-menu here, other than the default built-in menus that are part of Windows.  You can turn them on or off by tweaking the Start Menu properties, but I didn&#8217;t see a way to create a new one.  Perhaps there&#8217;s a registry hack to do this, but a quick Google search didn&#8217;t turn anything up.</p>
<p>So what I did instead was to hijack one of the pre-canned special folders and use it as the folder that I wanted.  I chose &#8220;Favorites&#8221;, because I use Firefox and my favorites are not stored here anyway.</p>
<p>Here&#8217;s how you do it:</p>
<ul>
<li>If the Favorites folder doesn&#8217;t already show up here, turn it on:
<ul>
<li>Right-click start menu globe, select Properties</li>
<li>Go to Start Menu tab</li>
<li>Click Customize</li>
<li>Find entry &#8220;Favorites menu&#8221; and make sure that it&#8217;s checked</li>
</ul>
</li>
<li>In Windows Explorer, navigate to C:UsersmynameFavorites and delete all the junk in there (assuming you don&#8217;t use Internet Explorer and store your regular favorites here).</li>
<li>Place whatever files you like in this folder, including files, sub-folders, or shortcuts</li>
<li>Now rename the Favorites folder to whatever you like</li>
<li>Log out and back in, or just restart the Explorer (e.g. by killing the explorer.exe process from Task Manager and then restarting)</li>
</ul>
<p>Voila!  Now you have your very own custom menu at the top level of the Start Menu.</p>
<p><strong>But Wait, That&#8217;s Not Enough</strong></p>
<p>Here&#8217;s a little addendum, after the fact.  When I originally tried everything I described above, it worked&#8212;for a short time.  But then at some point, the directory name reverted back to &#8220;Favorites&#8221;.  What&#8217;s going on?</p>
<p>What&#8217;s happening here is that your Favorites folder is a &#8220;special folder&#8221;, in that it contains a little hidden file called <strong>desktop.ini</strong> that specifies some of the behavior of this folder in Windows Explorer.  Below is the original contents of <strong>desktop.ini</strong> :</p>
<p style="padding-left:30px;">[.ShellClassInfo]<br />
LocalizedResourceName=@%SystemRoot%system32shell32.dll,-21796<br />
IconResource=%SystemRoot%system32imageres.dll,-115<br />
IconFile=%SystemRoot%system32shell32.dll<br />
IconIndex=-173</p>
<p>This little file tells Windows Explorer a few tidbits about how the folder should be displayed, including its name and the icon used.  This overrides the actual folder name and the default folder icon normally displayed for folders.</p>
<p>So to achieve what we want, actually renaming the folder, we could just delete <strong>desktop.ini</strong>.  Alternatively, we could keep the file and just change the value of the <strong>LocalizedResourceName</strong> attribute to be what we want.  The other benefit of keeping this file is that you can change the actual icon displayed at the top of the Start Menu when you select the folder.</p>
<p>For example, let&#8217;s say that I have an icon file showing a cute little potted plant and I want that to be the icon associated with my famThings folder.  I could change <strong>desktop.ini</strong> to read:</p>
<p style="padding-left:30px;">[.ShellClassInfo]<br />
LocalizedResourceName=famThings<br />
IconFile=Plant.ico<br />
IconIndex=0</p>
<p>Then I copy the Plant.ico file into the famThings (formerly Favorites) folder and set it to hidden.  (So that it doesn&#8217;t show up in the Start Menu).</p>
<p><strong>Now</strong> you get what you want&#8212;a properly named special folder whose name won&#8217;t change.  And, at no extra charge, a custom icon for the folder.  Note that the special icon now shows up not just on the Start Menu, but as the folder icon anywhere in Windows Explorer:</p>
<p><img class="alignnone size-full wp-image-634" title="Custom Icon" src="http://spsexton.files.wordpress.com/2009/01/customicon.jpg?w=439&#038;h=192" alt="Custom Icon" width="439" height="192" /></p>
<br />Posted in Windows Tagged: desktop.ini, Start Menu, Vista, Windows, Windows 7 <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/spsexton.wordpress.com/605/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/spsexton.wordpress.com/605/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/spsexton.wordpress.com/605/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/spsexton.wordpress.com/605/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/spsexton.wordpress.com/605/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/spsexton.wordpress.com/605/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/spsexton.wordpress.com/605/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/spsexton.wordpress.com/605/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/spsexton.wordpress.com/605/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/spsexton.wordpress.com/605/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=605&subd=spsexton&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://stuff.seans.com/2009/01/25/hijacking-vista-special-folders-on-start-menu/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8922e4d5254d602ba3ed32dd073b5a4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">spsexton</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/01/1-desiredresult.jpg" medium="image">
			<media:title type="html">Hijacked Start Menu</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/01/customicon.jpg" medium="image">
			<media:title type="html">Custom Icon</media:title>
		</media:content>
	</item>
		<item>
		<title>How to Reboot Machine While Connected Through Remote Desktop</title>
		<link>http://stuff.seans.com/2009/01/17/how-to-reboot-machine-while-connected-through-remote-desktop/</link>
		<comments>http://stuff.seans.com/2009/01/17/how-to-reboot-machine-while-connected-through-remote-desktop/#comments</comments>
		<pubDate>Sat, 17 Jan 2009 16:24:50 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[Windows]]></category>
		<category><![CDATA[Reboot Windows]]></category>
		<category><![CDATA[Remote Desktop]]></category>

		<guid isPermaLink="false">http://stuff.seans.com/?p=600</guid>
		<description><![CDATA[I assume that everyone who uses Remote Desktop in Windows knows this already, but just in case&#8230;
I use Remote Desktop all the time to connect back to one or more machines on my home network.  I have a single static IP address and then have terminal server running on every box behind the router on [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=600&subd=spsexton&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>I assume that everyone who uses Remote Desktop in Windows knows this already, but just in case&#8230;</p>
<p>I use Remote Desktop <strong>all</strong> the time to connect back to one or more machines on my home network.  I have a single static IP address and then have terminal server running on every box behind the router on a different port.  So I can connect to any of my machines remotely, by using a different port.</p>
<p>Being able to remote connect to any/all of my machines is huge.  I consider Remote Desktop to be one of the most critical tools that I use on a daily basis.</p>
<p>But  I occasionally find that there is something funky on one of my home machines that leads to my wanting to reboot it.  For example, I sometimes run into a situation where I can&#8217;t connect to the machine from outside my network, but I can still remote from a different machine in my home network.  So I remote to the &#8220;visible&#8221; machine, then remote over to the &#8220;invisible&#8221; machine.  Rebooting the problem machine seems to fix the problem.</p>
<p>The problem with rebooting is that the Shutdown and Restart options are removed from the Start Menu when you&#8217;re connected using Remote Desktop.</p>
<p>But not to worry&#8211;you can still reboot the machine, just using the command prompt.  Here&#8217;s the magic command (Windows 7, Vista or Windows XP):</p>
<p style="padding-left:30px;">shutdown -t 0 -r -f</p>
<p>That&#8217;s a &#8220;zero&#8221; after the -t option, indicating shutdown in zero seconds.  The -r option indicates a restart, rather than shutdown.  (Don&#8217;t forget this one)!  The -f option forces all applications to terminate.</p>
<p>So this is a critical command, worth remembering!</p>
<br />Posted in Windows Tagged: Reboot Windows, Remote Desktop <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/spsexton.wordpress.com/600/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/spsexton.wordpress.com/600/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/spsexton.wordpress.com/600/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/spsexton.wordpress.com/600/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/spsexton.wordpress.com/600/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/spsexton.wordpress.com/600/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/spsexton.wordpress.com/600/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/spsexton.wordpress.com/600/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/spsexton.wordpress.com/600/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/spsexton.wordpress.com/600/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=600&subd=spsexton&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://stuff.seans.com/2009/01/17/how-to-reboot-machine-while-connected-through-remote-desktop/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8922e4d5254d602ba3ed32dd073b5a4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">spsexton</media:title>
		</media:content>
	</item>
		<item>
		<title>Why Can&#8217;t I Drag Silverlight Controls into the Designer?</title>
		<link>http://stuff.seans.com/2009/01/16/why-cant-i-drag-silverlight-controls-into-the-designer/</link>
		<comments>http://stuff.seans.com/2009/01/16/why-cant-i-drag-silverlight-controls-into-the-designer/#comments</comments>
		<pubDate>Fri, 16 Jan 2009 18:25:57 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Silverlight Designer]]></category>
		<category><![CDATA[Visual Studio 2008]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://stuff.seans.com/?p=594</guid>
		<description><![CDATA[We&#8217;re all spoiled.  For years, we&#8217;ve been able to drag/drop controls onto a design surface in Visual Studio and then write the code-behind.  Traditionally, our world has consisted of these two things&#8211;the design surface and the code-behind.
But with WPF and Silverlight, we really have three views: the design surface, the XAML code that defines the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=594&subd=spsexton&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>We&#8217;re all spoiled.  For years, we&#8217;ve been able to drag/drop controls onto a design surface in Visual Studio and then write the code-behind.  Traditionally, our world has consisted of these two things&#8211;the design surface and the code-behind.</p>
<p>But with WPF and Silverlight, we really have three views: the design surface, the XAML code that defines the visual layout, and the code-behind.</p>
<p>When working on WPF projects then, you typically have a split window where you can work in either the design surface or the XAML code.  You can drag controls from the toolbox onto the design surface and the changes are reflected immediately in the XAML.  Conversely, you can edit the XAML and see changes on the design surface.  It looks like this.</p>
<p><img class="alignnone size-full wp-image-595" title="WPF Designer" src="http://spsexton.files.wordpress.com/2009/01/00-wpfdesigner.jpg?w=640&#038;h=718" alt="WPF Designer" width="640" height="718" /></p>
<p>This is beautiful.  You can work in the classic drag/drop paradigm to quickly gen up your GUI.  And then you can tweak things in the XAML, or the property editor.  Life is good.</p>
<p><strong>Silverlight &#8211; Something&#8217;s Missing!</strong></p>
<p>But there is a bit of a difference when you&#8217;re working with Silverlight projects.  Take a look at that same split designer view:</p>
<p><img class="alignnone size-full wp-image-596" title="Silverlight Designer" src="http://spsexton.files.wordpress.com/2009/01/0-doubleview.jpg?w=259&#038;h=69" alt="Silverlight Designer" width="259" height="69" /></p>
<p>Notice the difference?  &#8220;Preview&#8221;, rather than &#8220;Design&#8221;.  You&#8217;ll also notice right away that you can&#8217;t drag controls onto the design surface.  Argh, I can&#8217;t live without drag/drop&#8212;these are habits that I picked up back in the days of VB3!</p>
<p>Relax.  Turns out that you can still drag/drop into the XAML, and your changes will be reflected in the Preview window.  The Silverlight designer is different from WPF in that this window is a read-only view of your GUI, rather than a directly-editable designer.  The other bad news is that there is no property window when editing Silverlight XAML, whereas there is when you&#8217;re working with the XAML in a WPF application.</p>
<p>You can read all about the Silverlight designer and its limitations here: <a href="http://msdn.microsoft.com/en-us/library/cc838102(VS.95).aspx">Silverlight Tools for Visual Studio 2008 Designer Support</a></p>
<p>While this isn&#8217;t ideal, it&#8217;s workable.  Perhaps we&#8217;ll see the ability to edit directly on the design-surface in future versions of Visual Studio.  Being a newer technology, it&#8217;s sensible that Silverlight lags a bit behind WPF in terms of tooling support, in the same way that WPF seems to still lag a bit behind Win Forms.</p>
<br />Posted in Silverlight Tagged: Silverlight, Silverlight Designer, Visual Studio 2008, WPF <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/spsexton.wordpress.com/594/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/spsexton.wordpress.com/594/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/spsexton.wordpress.com/594/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/spsexton.wordpress.com/594/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/spsexton.wordpress.com/594/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/spsexton.wordpress.com/594/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/spsexton.wordpress.com/594/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/spsexton.wordpress.com/594/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/spsexton.wordpress.com/594/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/spsexton.wordpress.com/594/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=594&subd=spsexton&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://stuff.seans.com/2009/01/16/why-cant-i-drag-silverlight-controls-into-the-designer/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8922e4d5254d602ba3ed32dd073b5a4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">spsexton</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/01/00-wpfdesigner.jpg" medium="image">
			<media:title type="html">WPF Designer</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/01/0-doubleview.jpg" medium="image">
			<media:title type="html">Silverlight Designer</media:title>
		</media:content>
	</item>
		<item>
		<title>Silverlight, Day 1 &#8211; Installing Everything</title>
		<link>http://stuff.seans.com/2009/01/16/silverlight-day-1-installing-everything/</link>
		<comments>http://stuff.seans.com/2009/01/16/silverlight-day-1-installing-everything/#comments</comments>
		<pubDate>Fri, 16 Jan 2009 05:26:16 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Deep Zoom]]></category>
		<category><![CDATA[expression blend]]></category>
		<category><![CDATA[Installing Silverlight]]></category>
		<category><![CDATA[Silverlight Toolkit]]></category>
		<category><![CDATA[Silverlight Tools]]></category>
		<category><![CDATA[Taskbar]]></category>
		<category><![CDATA[Windows 7]]></category>

		<guid isPermaLink="false">http://stuff.seans.com/?p=522</guid>
		<description><![CDATA[Silverlight is the new framework for delivering rich client functionality in a web browsers.  It&#8217;s an important architecture to consider when thinking about creating a new application&#8211;along with WPF (classic thick client) and ASP.NET/AJAX (thinner client).  The three framework choices&#8211;WPF, Silverlight, and ASP.NET/AJAX&#8211;live on different spots on the thick-to-thin client continuum.  Each is a valid [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=522&subd=spsexton&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>Silverlight is the new framework for delivering rich client functionality in a web browsers.  It&#8217;s an important architecture to consider when thinking about creating a new application&#8211;along with WPF (classic thick client) and ASP.NET/AJAX (thinner client).  The three framework choices&#8211;WPF, Silverlight, and ASP.NET/AJAX&#8211;live on different spots on the thick-to-thin client continuum.  Each is a valid choice as a framework for creating an application, depending on the customer or the needs.  Which one you choose depends on what the customer goals are.  It&#8217;s also possible to craft a solution that is a mix of one or more technologies&#8211;e.g. Silverlight controls as part of a broader ASP.NET site.</p>
<p>Given what I think is Silverlight&#8217;s importance in the Microsoft ecosystem, I think that it&#8217;s important for all Microsoft (or .NET) developers to be at least a little familiar with the platform.  So here&#8217;s a step-by-step recipe for getting a Silerlight development environment set up on your machine.  I&#8217;ve been setting up a new VM over the past few days that will be my &#8220;virgin&#8221; Silverlight development box.  There&#8217;s a lot to be said for just starting fresh and installing exactly what you need&#8212;no more, no less.</p>
<p>This has been written about at length at the <a href="http://www.silverlight.net">silverlight.net</a> site&#8211;how to get started with Silverlight.  But I thought it worth doing a post that walks through the exact steps required.</p>
<p><strong>Virtual Machines and the Windows 7 Taskbar<br />
</strong></p>
<p>As always, creating a new VM makes me feel all fresh, clean and wonderful.  I&#8217;m using VMware 6.5.1, which I really love.  I created a 32-bit bit VM and installed the Windows 7 beta that was just released last week (build 7000).  I can&#8217;t say enough good stuff about Windows 7, from what I&#8217;ve seen so far.  The performance is incredibly snappy, even in the VM, with 1GB of virtual memory.  The boot time is lightning fast.  And, with a little tweaking, I&#8217;m now really enjoying the new taskbar (the &#8220;superbar&#8221;).  I&#8217;m not remotely a Vista hater (I&#8217;ve been running it on all my home machines forever), so I wouldn&#8217;t call Window 7 &#8220;the Windows that Vista should have been&#8221;.  Vista has been great for me.  But Win 7 takes Vista and just pushes it a bit further, improving various things.</p>
<p>Just as a quick side note, here is the tweak that I made to the taskbar behavior, after hearing <a href="http://www.winsupersite.com/">Paul Thurrott</a> talk about this on <a href="http://twit.tv/ww">Windows Weekly</a>.  As Paul said, this should really be the default behavior.</p>
<p>Here&#8217;s how the taskbar looks out of the box.</p>
<p><img class="alignnone size-full wp-image-524" title="Default Taskbar" src="http://spsexton.files.wordpress.com/2009/01/1-oldtaskbar.jpg?w=519&#038;h=55" alt="Default Taskbar" width="519" height="55" /></p>
<p>Each button on the taskbar (in this case) represents a running application, which may contain one or more instances/windows.  What&#8217;s confusing about this is that you need to first click on an icon to get a popup of the individual windows.  Paul recommends, and I very much prefer, changing the default look and feel so that taskbar buttons are <strong>not</strong> grouped.</p>
<p>Here&#8217;s where you set the option, under Taskbar properties:</p>
<p><img class="alignnone size-full wp-image-525" title="Change Taskbar" src="http://spsexton.files.wordpress.com/2009/01/2-changetaskbar.jpg?w=394&#038;h=180" alt="Change Taskbar" width="394" height="180" /></p>
<p>Notice that the default Button grouping setting is &#8220;Always group&#8221;.  If you change it to &#8220;Group when taskbar is full&#8221; or &#8220;Never group&#8221;, the taskbar then looks like this:</p>
<p><img class="alignnone size-full wp-image-527" title="Better Taskbar" src="http://spsexton.files.wordpress.com/2009/01/3-bettertaskbar1.jpg?w=1024&#038;h=43" alt="Better Taskbar" width="1024" height="43" /></p>
<p>This is much nicer, because: a) you can click on individual windows, if more than one instance of an app is running and b) the text that is displayed makes it much easier to find what you&#8217;re looking for.</p>
<p><em>(Note: These screen grabs are actually from the M3 build distributed at PDC in Oct, 2008.  In the Jan, 2009 beta, you won&#8217;t see the Quick Launch icons).</em></p>
<p>Ok, enough fauning over Windows 7.  Let&#8217;s move on to installing all the Silverlight bits.</p>
<p><strong>The Plan</strong></p>
<p>The silverlight.net site has a nice <a href="http://silverlight.net/GetStarted/">Getting Started</a> post listing the bits that you need to install, to get Silverlight fully functional.  [<strong>Note</strong>:<strong> </strong>Throughout this post, and from now on in my life, whenever I say "Silverlight", I always mean "Silverlight 2"].  Here&#8217;s what the list looks like:</p>
<p><img class="alignnone size-full wp-image-528" title="Getting Started with Silverlight" src="http://spsexton.files.wordpress.com/2009/01/4-gettingstarted.jpg?w=640&#038;h=349" alt="Getting Started with Silverlight" width="640" height="349" /></p>
<p>I&#8217;ll work through this entire list, to get everything installed.</p>
<p>Oh by the way, I&#8217;m assuming that you&#8217;ve already installed <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=fbee1648-7106-44a7-9649-6d9f6d58056e&amp;DisplayLang=en">Visual Studio 2008 SP1</a>, which also includes the .NET Framework 3.5 SP1.</p>
<p><img class="alignnone size-full wp-image-535" title="Visual Studio 2008 SP1" src="http://spsexton.files.wordpress.com/2009/01/5-visualstudio1.jpg?w=562&#038;h=201" alt="Visual Studio 2008 SP1" width="562" height="201" /></p>
<p><strong>Installing Silverlight Tools for Visual Studio 2008 SP1</strong></p>
<p>To start with, we download and install <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=c22d6a7b-546f-4407-8ef6-d60c8ee221ed&amp;DisplayLang=en">Silverlight Tools for Visual Studio 2008 SP1</a>.  This is version 9.0.30729.146, released on 10/30/2008.  The download is 72.7MB.</p>
<p>Download the Silverlight_Tools.exe file and launch it.</p>
<p><img class="alignnone size-full wp-image-537" title="Welcome" src="http://spsexton.files.wordpress.com/2009/01/6-1.jpg?w=503&#038;h=468" alt="Welcome" width="503" height="468" /></p>
<p>Soak up the EULA:</p>
<p><img class="alignnone size-full wp-image-540" title="License Agreement" src="http://spsexton.files.wordpress.com/2009/01/6-22.jpg?w=503&#038;h=468" alt="License Agreement" width="503" height="468" /></p>
<p>At this point, the install may tell you that there are processes running that you need to shut down:</p>
<p><img class="alignnone size-full wp-image-541" title="Incompatible Processes" src="http://spsexton.files.wordpress.com/2009/01/6-3.jpg?w=503&#038;h=468" alt="Incompatible Processes" width="503" height="468" /></p>
<p>After closing Firefox, I click the Refresh button and now get a clean bill of health:</p>
<p><img class="alignnone size-full wp-image-543" title="No Incompatible Processes" src="http://spsexton.files.wordpress.com/2009/01/6-4.jpg?w=503&#038;h=468" alt="No Incompatible Processes" width="503" height="468" /></p>
<p>The install then starts:</p>
<p><img class="alignnone size-full wp-image-544" title="Install Progress" src="http://spsexton.files.wordpress.com/2009/01/6-5.jpg?w=503&#038;h=468" alt="Install Progress" width="503" height="468" /></p>
<p>And we&#8217;re done.</p>
<p><img class="alignnone size-full wp-image-545" title="Silverlight Install Complete" src="http://spsexton.files.wordpress.com/2009/01/6-6.jpg?w=503&#038;h=468" alt="Silverlight Install Complete" width="503" height="468" /></p>
<p>At this point, you&#8217;ve installed:</p>
<ul>
<li>Silverlight 2 developer runtime  (2.0.31005.0)</li>
<li>Silverlight 2 SDK  (2.0.31005.0)</li>
<li>KB956453 for Visual Studio 2008 SP1</li>
<li>Silverlight Tools for Visual Studio 2008 SP1</li>
</ul>
<p>You can find an installation log file at:  C:\Users\myname\AppData\Local\Temp\Silverlight%20Tools%20RTW_20090108_121446406.html .  It also contains hyperlinks to the textual MSI log files for the different products installed.</p>
<p><strong>Silverlight 2 DataGrid Update</strong></p>
<p>Next, you&#8217;ll want to download and install the <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=084a1bb2-0078-4009-94ee-e659c6409db0&amp;DisplayLang=en">Silverlight 2 DataGrid December 2008 Release</a>, released on 12/19/2008.  This release apparently fixes a number of bugs with the DataGrid.</p>
<p>Expanding on the instructions on the download page, here are the steps:</p>
<ol>
<li>Close all instances of Visual Studio 2008</li>
<li>Run SL2DataGridDec08.exe to extract the files<br />
<img class="alignnone size-full wp-image-552" title="Extract Files" src="http://spsexton.files.wordpress.com/2009/01/7-1-extract.jpg?w=351&#038;h=216" alt="Extract Files" width="351" height="216" /></li>
<li><span>Delete all cached toolbox items by removing all files beginning with &#8220;toolbox&#8221; from C:\Users\<em>UserName</em>\AppData\Local\Microsoft\VisualStudio\9.0.<br />
<img class="alignnone size-full wp-image-553" title="Delete Toolbox Files" src="http://spsexton.files.wordpress.com/2009/01/7-2-delete-toolbox.jpg?w=528&#038;h=229" alt="Delete Toolbox Files" width="528" height="229" /><br />
</span></li>
<li><span>Replace the following assemblies with the ones in this package:<br />
</span></p>
<ul>
<li><span>%ProgramFiles%\Microsoft SDKs\Silverlight\v2.0\Libraries\Client\System.Windows.Controls.Data.dll</span></li>
<li><span>%ProgramFiles%\Microsoft SDKs\Silverlight\v2.0\Libraries\Client\System.Windows.Controls.Data.Design.dll</span></li>
</ul>
</li>
</ol>
<p><strong>Installing Expression Blend 2</strong></p>
<p>Next on the agenda is downloading and installing <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=5FF08106-B9F4-43CD-ABAD-4CC9D9C208D7&amp;displaylang=en">Expression Blend 2</a>&#8212;the tool used for designing Silverlight and WPF GUIs.  Expression Blend 2 supports Silverlight 1.0.  SP1 for Expression Blend 2 (see below) adds support for Silverlight 2.0.</p>
<p>I&#8217;m installing a full version that I get through the Empower ISV program.  The link above will take you to a page where you can download a 30-day trial version.  You can purchase the full version from <a href="http://www.amazon.com/Microsoft-45116G-Expression-Blend-2/dp/B0013ITQ9Y/ref=pd_bbs_sr_5?ie=UTF8&amp;s=electronics&amp;qid=1231783562&amp;sr=8-5">Amazon</a> for roughly $479, or upgrade from Expression Blend 1 for $95.</p>
<p>This is version 2.0.1523.0.</p>
<p>Wow, snazzy install screen&#8212;exactly what you&#8217;d expect for a design-focused tool.</p>
<p><img class="alignnone size-full wp-image-556" title="Installing Expression Blend" src="http://spsexton.files.wordpress.com/2009/01/8-1.jpg?w=800&#038;h=600" alt="Installing Expression Blend" width="800" height="600" /></p>
<p>By the way, the Expression family consists of the following different tools:</p>
<ul>
<li>Expression Web ($245) &#8211; for designing web sites  (think Front Page replacement)</li>
<li>Expression Blend ($479) &#8211; for creating WPF and Silverlight user interfaces</li>
<li>Expression Design &#8211; graphical design tool (partner tool for Blend, adding some add&#8217;l drawing capabilities)</li>
<li>Expression Media ($186) -  for organizing your media (assets)</li>
<li>Expression Encoder ($190) &#8211; for producing webcasts and publishing via Silverlight</li>
</ul>
<p>You can get the whole lot&#8212;Expression Studio 2&#8212;for $666.  [Odd number to use for a retail price].</p>
<p>Decide where to install Blend:</p>
<p><img class="alignnone size-full wp-image-558" title="Install Location" src="http://spsexton.files.wordpress.com/2009/01/8-2.jpg?w=800&#038;h=600" alt="Install Location" width="800" height="600" /></p>
<p>And off we go..</p>
<p><img class="alignnone size-full wp-image-559" title="Blend Install Starts" src="http://spsexton.files.wordpress.com/2009/01/8-3.jpg?w=800&#038;h=600" alt="Blend Install Starts" width="800" height="600" /></p>
<p>Blend 2 is now installed.  But <strong>wait</strong>!  If you&#8217;re running on a VMware VM, don&#8217;t try running it yet.  It appears that the Expression products don&#8217;t run properly in VMs if 3D graphics acceleration is enabled.  Shut down your VM and disable 3D graphics acceleration (go to Settings, select your Display, look for the &#8220;3D graphics&#8221; section and uncheck &#8220;Accelerate 3D graphics (DirectX 9.0c).  Expression Blend was locking up my VM, but when I disabled 3D graphics acceleration, everything started working fine.</p>
<p><strong>Install Expression Blend 2 Service Pack 1</strong></p>
<p>Next you&#8217;ll want to install the service pack for Expression Blend 2 that adds support for Silverlight 2.  You can find it here: <a href="http://www.microsoft.com/downloads/thankyou.aspx?familyId=eb9b5c48-ba2b-4c39-a1c3-135c60bbbe66&amp;displayLang=en">Expression Blend 2 Service Pack 1</a>.</p>
<p>Note that this service pack <strong>replaces</strong> the Expression Blend 2.5 June 2008 Preview (which existed to support beta Silverlight 2 functionality).  So you don&#8217;t need Blend 2.5.</p>
<p>The service pack is small (18MB), and downloads and installs quickly.  The listed version is 2.1.1760.0.  So perhaps we can think of what we end up with as Blend 2.1, rather than Blend 2 or Blend 2.5.</p>
<p><img class="alignnone size-full wp-image-574" title="Blend 2 Service Pack 1" src="http://spsexton.files.wordpress.com/2009/01/9-blendsp1.jpg?w=472&#038;h=158" alt="Blend 2 Service Pack 1" width="472" height="158" /></p>
<p><strong>Install Deep Zoom Composer  (optional)</strong></p>
<p>Next on the Getting Started list is to install Deep Zoom Composer.  Deep Zoom is a technology built on top of Silverlight that allows you to publish a very high resolution image on a web site and allow zooming <strong>way</strong> into the image.  This is done by pre-processing the image to generate many different chunks of the image at many different resolutions.  You then publish all of these files to your server and visitors to your site can then zoom in and out of the original high-res image.</p>
<p>For an example of Deep Zoom in action, take a look at this collage of <a href="http://www.famthings.com/sexton/john/">photos of my Dad</a>.  I started with 191 different images and, after running everything through Deep Zoom Composer, ended up with 18,433 unique images on my server, taking up about 1.5GB of space.  The end result is pretty cool.  There&#8217;s another excellent example of Deep Zoom in action at the Hard Rock <a href="http://memorabilia.hardrock.com/">Memorabilia</a> web site.</p>
<p>This step is optional because you&#8217;ll only want/need the Deep Zoom Composer if you intend to author some Deep Zoom images.  You can find the download for Deep Zoom Composer here: <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=457B17B7-52BF-4BDA-87A3-FA8A4673F8BF&amp;displaylang=en">Deep Zoom Composer</a>.  This is also small (4MB).  It&#8217;s listed as version 0.9.000.6.</p>
<p>For completeness, here&#8217;s the install sequence (which is pretty brainless):</p>
<p><img class="alignnone size-full wp-image-577" title="Welcome" src="http://spsexton.files.wordpress.com/2009/01/10-1-welcome.jpg?w=503&#038;h=408" alt="Welcome" width="503" height="408" /></p>
<p>Note&#8211;when selecting an install location, I also set it up so that Everyone on the machine can run it.  That&#8217;s just my preference.</p>
<p><img class="alignnone size-full wp-image-578" title="Location" src="http://spsexton.files.wordpress.com/2009/01/10-2-location.jpg?w=503&#038;h=408" alt="Location" width="503" height="408" /></p>
<p>Confirm that you&#8217;re ready to start the install:</p>
<p><img class="alignnone size-full wp-image-579" title="Confirm" src="http://spsexton.files.wordpress.com/2009/01/10-3-confirm.jpg?w=503&#038;h=408" alt="Confirm" width="503" height="408" /></p>
<p>And we&#8217;re done.  Note the mention of checking for updates to the .NET Framework.  If you&#8217;ve followed all of the steps above, there should be no framework updates.</p>
<p><img class="alignnone size-full wp-image-580" title="Done" src="http://spsexton.files.wordpress.com/2009/01/10-4-done.jpg?w=503&#038;h=408" alt="Done" width="503" height="408" /></p>
<p><strong>Install the Silverlight Toolkit</strong></p>
<p>Finally, you&#8217;ll want to install the latest version of the <a href="http://www.codeplex.com/Silverlight">Silverlight Toolkit</a>.  This is a collection of Silverlight controls (announced/released during the PDC in Oct 2008) and other goodies that the team has made available on <a href="http://www.codeplex.com">codeplex</a>.  The components have different levels of quality, depending on where in the release cycle they are.  But this is all stuff that is intended to eventually find its way into the mainline Silverlight product/release.  For more information on what&#8217;s in the Silverlight Toolkit, see <a href="http://blogs.msdn.com/sburke/archive/2008/10/28/silverlight-toolkit-now-available-for-download.aspx">Shawn Burke&#8217;s blog post</a>.</p>
<p>You can download the Silverlight Toolkit here: <a href="http://www.codeplex.com/Silverlight/Release/ProjectReleases.aspx?ReleaseId=19172">download Silverlight Toolkit</a>.  The current version was released on 9 Dec 2008.</p>
<p>The toolkit will come down as a .zip file.  There&#8217;s nothing really to install.  The idea is to unzip everything to a location of your choice and then just add references from your projects to the appropriate assemblies.</p>
<p>If you want to just play around with the controls, there&#8217;s a nice sample project included in the distribution, at \Samples\Controls.Samples.html &#8212; just open up the HTML page and you&#8217;ll be able to see and interact with the various controls.</p>
<p>Here&#8217;s a quick overview of how you make use of these controls from your Silverlight project.  Assume that we&#8217;ve already unzipped everything to \My Documents\Silverlight Toolkit.  Now fire up a new Silverlight project.  Once you&#8217;ve loaded the project, you&#8217;ll want to add the various controls to your toolbox, as follows:</p>
<p>Right-click in the Toolbox and select Choose Items.</p>
<p><img class="alignnone size-full wp-image-588" title="Choose Items" src="http://spsexton.files.wordpress.com/2009/01/chooseitems.jpg?w=210&#038;h=324" alt="Choose Items" width="210" height="324" /></p>
<p>In the dialog that comes up, go to the Silverlight tab and then click Browse.  Locate one of the assemblies from the Silverlight Toolkit and click the Open button.  The controls from that assembly will now show up in the dialog.  (And, if checked, in your Toolbox):</p>
<p><img class="alignnone size-full wp-image-589" title="Silverlight Components" src="http://spsexton.files.wordpress.com/2009/01/silverlightcomponents.jpg?w=663&#038;h=471" alt="Silverlight Components" width="663" height="471" /></p>
<p>For example, notice that we now have the AutoCompleteBox in our toolbox:</p>
<p><img class="alignnone size-full wp-image-590" title="toolbox" src="http://spsexton.files.wordpress.com/2009/01/toolbox.jpg?w=250&#038;h=283" alt="toolbox" width="250" height="283" /></p>
<p><strong>Wrapping Up</strong></p>
<p>That&#8217;s really all there is to it.  Once you&#8217;ve followed all of these steps, you have all of the Silverlight bits and are now ready to create great Silverlight applications!</p>
<br />Posted in Silverlight Tagged: Deep Zoom, expression blend, Installing Silverlight, Silverlight, Silverlight Toolkit, Silverlight Tools, Taskbar, Windows 7 <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/spsexton.wordpress.com/522/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/spsexton.wordpress.com/522/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/spsexton.wordpress.com/522/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/spsexton.wordpress.com/522/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/spsexton.wordpress.com/522/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/spsexton.wordpress.com/522/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/spsexton.wordpress.com/522/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/spsexton.wordpress.com/522/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/spsexton.wordpress.com/522/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/spsexton.wordpress.com/522/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=522&subd=spsexton&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://stuff.seans.com/2009/01/16/silverlight-day-1-installing-everything/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8922e4d5254d602ba3ed32dd073b5a4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">spsexton</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/01/1-oldtaskbar.jpg" medium="image">
			<media:title type="html">Default Taskbar</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/01/2-changetaskbar.jpg" medium="image">
			<media:title type="html">Change Taskbar</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/01/3-bettertaskbar1.jpg" medium="image">
			<media:title type="html">Better Taskbar</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/01/4-gettingstarted.jpg" medium="image">
			<media:title type="html">Getting Started with Silverlight</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/01/5-visualstudio1.jpg" medium="image">
			<media:title type="html">Visual Studio 2008 SP1</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/01/6-1.jpg" medium="image">
			<media:title type="html">Welcome</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/01/6-22.jpg" medium="image">
			<media:title type="html">License Agreement</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/01/6-3.jpg" medium="image">
			<media:title type="html">Incompatible Processes</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/01/6-4.jpg" medium="image">
			<media:title type="html">No Incompatible Processes</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/01/6-5.jpg" medium="image">
			<media:title type="html">Install Progress</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/01/6-6.jpg" medium="image">
			<media:title type="html">Silverlight Install Complete</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/01/7-1-extract.jpg" medium="image">
			<media:title type="html">Extract Files</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/01/7-2-delete-toolbox.jpg" medium="image">
			<media:title type="html">Delete Toolbox Files</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/01/8-1.jpg" medium="image">
			<media:title type="html">Installing Expression Blend</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/01/8-2.jpg" medium="image">
			<media:title type="html">Install Location</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/01/8-3.jpg" medium="image">
			<media:title type="html">Blend Install Starts</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/01/9-blendsp1.jpg" medium="image">
			<media:title type="html">Blend 2 Service Pack 1</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/01/10-1-welcome.jpg" medium="image">
			<media:title type="html">Welcome</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/01/10-2-location.jpg" medium="image">
			<media:title type="html">Location</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/01/10-3-confirm.jpg" medium="image">
			<media:title type="html">Confirm</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/01/10-4-done.jpg" medium="image">
			<media:title type="html">Done</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/01/chooseitems.jpg" medium="image">
			<media:title type="html">Choose Items</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/01/silverlightcomponents.jpg" medium="image">
			<media:title type="html">Silverlight Components</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/01/toolbox.jpg" medium="image">
			<media:title type="html">toolbox</media:title>
		</media:content>
	</item>
		<item>
		<title>Warning &#8212; Windows 7 Beta May Eat Your MP3 Files</title>
		<link>http://stuff.seans.com/2009/01/13/warning-windows-7-beta-may-eat-your-mp3-files/</link>
		<comments>http://stuff.seans.com/2009/01/13/warning-windows-7-beta-may-eat-your-mp3-files/#comments</comments>
		<pubDate>Tue, 13 Jan 2009 18:37:46 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[Windows 7]]></category>
		<category><![CDATA[MP3 Metadata]]></category>
		<category><![CDATA[Windows 7 Beta]]></category>
		<category><![CDATA[Windows 7 Install]]></category>
		<category><![CDATA[Windows MP3 Bug]]></category>

		<guid isPermaLink="false">http://stuff.seans.com/?p=562</guid>
		<description><![CDATA[This one is potentially painful.  If you&#8217;ve grabbed the Windows 7 beta and installed it, be aware that there is a known bug with how it handles MP3 files.  Here&#8217;s the painful part&#8212;if your MP3 files contain metadata, e.g. you&#8217;ve used Windows Explorer to add metadata to the files, Windows Media Player may permanently remove [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=562&subd=spsexton&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>This one is potentially painful.  If you&#8217;ve grabbed the Windows 7 beta and installed it, be aware that there is a known bug with how it handles MP3 files.  Here&#8217;s the painful part&#8212;if your MP3 files contain metadata, e.g. you&#8217;ve used Windows Explorer to add metadata to the files, Windows Media Player may <strong>permanently remove audio data</strong> from the file when you import into Windows Media Player.</p>
<p>Ouch.</p>
<p>The workaround is to either get the update to the Windows 7 Beta that fixes this problem, or to set all of your MP3 files to be read-only, prior to loading them into Media Player.</p>
<p>The last part is a suggestion on the part of Microsoft and a bit funny&#8212;Microsoft warning you to set some files to be read-only so that Media Player can&#8217;t harm them.  Sort of like sending your kids to a known dangerous school and just equipping them with Kevlar.</p>
<p>At any rate, no worries, and no blame.  This is a beta, after all.  So we definitely expect there to be some hiccups on the road to a final release.</p>
<p>This problem is KB #961367 and you can find full information here:  <a href="http://support.microsoft.com/kb/961367">An update is available for Windows Media Center and Windows Media Player in Windows 7 Beta</a></p>
<br />Posted in Windows 7 Tagged: MP3 Metadata, Windows 7, Windows 7 Beta, Windows 7 Install, Windows MP3 Bug <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/spsexton.wordpress.com/562/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/spsexton.wordpress.com/562/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/spsexton.wordpress.com/562/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/spsexton.wordpress.com/562/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/spsexton.wordpress.com/562/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/spsexton.wordpress.com/562/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/spsexton.wordpress.com/562/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/spsexton.wordpress.com/562/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/spsexton.wordpress.com/562/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/spsexton.wordpress.com/562/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=562&subd=spsexton&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://stuff.seans.com/2009/01/13/warning-windows-7-beta-may-eat-your-mp3-files/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8922e4d5254d602ba3ed32dd073b5a4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">spsexton</media:title>
		</media:content>
	</item>
		<item>
		<title>Using HttpWebRequest for Asynchronous Downloads</title>
		<link>http://stuff.seans.com/2009/01/05/using-httpwebrequest-for-asynchronous-downloads/</link>
		<comments>http://stuff.seans.com/2009/01/05/using-httpwebrequest-for-asynchronous-downloads/#comments</comments>
		<pubDate>Mon, 05 Jan 2009 06:06:51 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[Asynchronous Programming]]></category>
		<category><![CDATA[FTP]]></category>
		<category><![CDATA[HTTP]]></category>
		<category><![CDATA[HTTP Download]]></category>

		<guid isPermaLink="false">http://stuff.seans.com/?p=475</guid>
		<description><![CDATA[I&#8217;ve occasionally had a desire to test downloading a file via HTTP or FTP from a server&#8212;either to measure performance, or to stress test the server by kicking off a large number of simultaneous downloads.  Here&#8217;s a little Win Forms client that allows you to download a single file from a server, using either HTTP [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=475&subd=spsexton&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve occasionally had a desire to test downloading a file via HTTP or FTP from a server&#8212;either to measure performance, or to stress test the server by kicking off a large number of simultaneous downloads.  Here&#8217;s a little Win Forms client that allows you to download a single file from a server, using either HTTP or FTP.  It shows download progress and displays the average transfer rate, in kb/sec.  It also demonstrates how to use the HttpWebRequest and FtpWebRequest classes in System.Net to do file downloads.</p>
<p>As an added bonus, this app is a nice example of doing a little work on a background thread and then firing callbacks back to the GUI thread to report progress.  This is done using the BeginXxx/EndXxx pattern, as well as using the Invoke method the ensure that GUI updating is done on the correct thread.  I always forget the exact syntax for this, so it&#8217;s nice to have it here to refer to.</p>
<p>The bulk of this code comes directly from the <a href="http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.begingetresponse.aspx">MSDN documentation</a> for the HttpWebRequest.BeginGetResponse method.  I&#8217;ve created a little client app around it, adding some GUI elements to show progress.  I&#8217;ve also extended it to support downloads using FTP.</p>
<p>I include code snippets in this article, but you can download the entire Visual Studio 2008 solution <a href="http://www.seans.com/samples/DownloadStressTest.zip">here</a>.</p>
<p><strong>The End Result</strong></p>
<p>When we&#8217;re done, we&#8217;ll have a little Win Forms app that lets us enter an HTTP or FTP path to a file and then downloads that file.  During the download, we see the progress, as well as the average transfer rate.</p>
<p><img class="alignnone size-full wp-image-482" title="Download Stress Test application" src="http://spsexton.files.wordpress.com/2009/01/01running.jpg?w=501&#038;h=256" alt="Download Stress Test application" width="501" height="256" /></p>
<p>For the moment, the application doesn&#8217;t actually write the file locally.  Instead, it just downloads the entire file, throwing away the data that it downloaded.  The intent is to stress the server and measure the transfer speed&#8212;not to actually get a copy of the file.</p>
<p>If we were to use HTTP and specify an HTML file to download, we&#8217;d basically be doing the same thing that a web browser does&#8212;downloading a web page from the server to the client.  In the example above, I download a 1.9MB Powerpoint file from the PDC conference, just so that we have something a little larger than a web page and can see some progress.</p>
<p><strong>Using FTP Instead of HTTP</strong></p>
<p>My little application does FTP, as well as HTTP.  If you enter an FTP-based URI, rather than an HTTP-based one, we automatically switch to using FTP to download the file.  Before the download can start, however, we need to ask the user for credentials to use to log into the FTP site.</p>
<p><img class="alignnone size-full wp-image-483" title="FTP Credentials" src="http://spsexton.files.wordpress.com/2009/01/02credentials.jpg?w=354&#038;h=221" alt="FTP Credentials" width="354" height="221" /></p>
<p>Once we&#8217;ve gotten the FTP credentials, the download runs in much the same way that the HTTP-based download ran.</p>
<p><img class="alignnone size-full wp-image-484" title="Downloading a file from an FTP server" src="http://spsexton.files.wordpress.com/2009/01/03ftprunning.jpg?w=501&#038;h=256" alt="Downloading a file from an FTP server" width="501" height="256" /></p>
<p>In this case, I&#8217;m downloading an ISO image of the first CD of a Fedora distribution.  Note that the FTP response string starts with &#8220;213&#8243;, which gives file status and represents a successful response from the FTP server.  The second part of the response string is the size of the file, in bytes.  In the case of HTTP, the response was just &#8220;OK&#8221;.</p>
<p><strong>Where Are We?</strong></p>
<p>So what do we really have here?  A little program that downloads a single file without really writing it anywhere.  At this point, we have something that&#8217;s mildly useful for testing a server, since it tells us the transfer rate.  Furthermore, we can launch a bunch of these guys in parallel and download the same file many times in parallel, to stress the server.  (Ideally, the application would let us pick #-of-simultaneous-downloads and just kick them all off, but that&#8217;s an enhancement to be added later).</p>
<p><strong>Diving Into the Source Code</strong></p>
<p>More interesting than what this little program does is how you go about using the <strong>HttpWebRequest </strong>and <strong>FtpWebRequest </strong>classes to do the actual work.</p>
<p>Here&#8217;s a quick look at the C# solution:</p>
<p><img class="alignnone size-full wp-image-486" title="Files in Solution" src="http://spsexton.files.wordpress.com/2009/01/04solution.jpg?w=218&#038;h=206" alt="Files in Solution" width="218" height="206" /></p>
<p>There&#8217;s really not much here&#8212;the main form (<strong>DownloadStressTestForm</strong>), the FTP credentials form (<strong>GetCredentialsForm</strong>) and a little helper class used to pass data around between asynchronous methods.</p>
<p>Most of the code lives in <strong>DownloadStressTestForm.cs</strong>.  Ideally, we&#8217;d split this out into the GUI pieces and the actual plumbing code that does the work of downloading the files.  But this is just a quick-and-dirty project.</p>
<p><strong>Push the Button</strong></p>
<p>Let&#8217;s take a look at the code that fires when you click the <strong>Get File</strong> button.</p>
<pre class="brush: csharp;">
        private void btnGetFile_Click(object sender, EventArgs e)
        {
            try
            {
                lblDownloadComplete.Visible = false;

                WebRequest req = null;
                WebRequestState reqState = null;
                Uri fileURI = new Uri(txtURI.Text);

                if (fileURI.Scheme == Uri.UriSchemeHttp)
                {
                    req = (HttpWebRequest)HttpWebRequest.Create(fileURI);
                    reqState = new HttpWebRequestState(BUFFER_SIZE);
                    reqState.request = req;
                }
                else if (fileURI.Scheme == Uri.UriSchemeFtp)
                {
                    // Get credentials
                    GetCredentialsForm frmCreds = new GetCredentialsForm();
                    DialogResult result = frmCreds.ShowDialog();
                    if (result == DialogResult.OK)
                    {
                        req = (FtpWebRequest)FtpWebRequest.Create(fileURI);
                        req.Credentials = new NetworkCredential(frmCreds.Username, frmCreds.Password);
                        reqState = new FtpWebRequestState(BUFFER_SIZE);

                        // Set FTP-specific stuff
                        ((FtpWebRequest)req).KeepAlive = false;

                        // First thing we do is get file size.  2nd step, done later,
                        // will be to download actual file.
                        ((FtpWebRequest)req).Method = WebRequestMethods.Ftp.GetFileSize;
                        reqState.FTPMethod = WebRequestMethods.Ftp.GetFileSize;

                        reqState.request = req;
                    }
                    else
                        req = null;	// abort

                }
                else
                    MessageBox.Show(&quot;URL must be either http://xxx or ftp://xxxx&quot;);

                if (req != null)
                {
                    reqState.fileURI = fileURI;
                    reqState.respInfoCB = new ResponseInfoDelegate(SetResponseInfo);
                    reqState.progCB = new ProgressDelegate(Progress);
                    reqState.doneCB = new DoneDelegate(Done);
                    reqState.transferStart = DateTime.Now;

                    // Start the asynchronous request.
                    IAsyncResult result =
                      (IAsyncResult)req.BeginGetResponse(new AsyncCallback(RespCallback), reqState);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(string.Format(&quot;EXC in button1_Click(): {0}&quot;, ex.Message));
            }
        }
</pre>
<p>The basic goal here is to create an instance of either the <strong>HttpWebRequest</strong> or <strong>FtpWebRequest</strong> class.  This is done by calling the corresponding <strong>Create</strong> method, and passing it the URI that the user entered.  Note that we use the <strong>Uri </strong>class to figure out if the user is entering an HTTP or an FTP URI.  We create an instance of the base class, <strong>WebRequest</strong>, which we&#8217;ll use to kick everything off.</p>
<p>We also create an instance of a class used to store some state information, either <strong>HttpWebRequestState</strong> or <strong>FtpWebRequestState</strong>.  These classes both derive from <strong>WebRequestState</strong> and are defined in this project, in <strong>WebRequestState.cs</strong>.</p>
<p>The idea of this state object is that we&#8217;ll hand it off to the asynchronous method that we use to do the actual download.  It then will get passed back to the callback that fires when an asynchronous method completes.  Think of it as a little suitcase of stuff that we want to carry around with us and hand off between the asynchronous methods.</p>
<p>Notice that if we&#8217;re doing an FTP transfer, we first pop up the credentials dialog to get the Username and Password from the user.  We then store those credentials in the <strong>FtpWebRequest</strong> object.</p>
<p>There&#8217;s one other difference between HTTP and FTP.  In the case of HTTP, we&#8217;ll fire off a single web request, with a GET command, to download the file.  But for FTP, we actually first send a command to read the file size, followed by the command to actually download the file.  To accomplish this, we set the <strong>Method</strong> property of the <strong>FtpWebRequest</strong> to <strong>WebRequestMethods.Ftp.GetFileSize</strong>.  We don&#8217;t set this property for <strong>HttpWebRequest</strong> because it just defaults to the GET command, which is what we want.</p>
<p>Towards the end of this function, you&#8217;ll see that I&#8217;m loading up the suitcase&#8212;setting the various properties of the <strong>WebRequestState</strong> object.  Along with the URI, we set up some delegates to point back to three callbacks in the <strong>DownloadStressTestForm</strong> class&#8212;<strong>SetResponseInfo</strong>, <strong>Progress</strong>, and <strong>Done</strong>.  These are the callbacks that actually update our user interface&#8212;when things start, during the file transfer, and when the file has finished downloading.</p>
<p>Finally, we call the <strong>BeginGetResponse</strong> method to actually launch the download.  Here, we specify a response callback&#8212;the method that will get called, not when the download has completed, but just when we get the actual HTTP response, or when the FTP command completes.  In the case of HTTP, we first get the response packet and then start reading the actual file using a stream that we get from the response.</p>
<p>What&#8217;s important here is that we push the work into the background, on another thread, as soon as possible.  We don&#8217;t do much work in the button click event handler before calling <strong>BeginGetResponse</strong>.  And this method is asynchronous&#8212;so we return control to the GUI immediately.  From this point on, we will only update the GUI in response to a callback.</p>
<p><strong>Callbacks to Update the GUI</strong></p>
<p>I mentioned the three callbacks above that we use to update the user interface&#8212;<strong>SetResponseInfo</strong>, <strong>Progress</strong>, and <strong>Done</strong>.  Here&#8217;s the declaration of the delegate types:</p>
<pre class="brush: csharp;">
    public delegate void ResponseInfoDelegate(string statusDescr, string contentLength);
    public delegate void ProgressDelegate(int totalBytes, double pctComplete, double transferRate);
    public delegate void DoneDelegate();
</pre>
<p>And here are the bodies of each of these three callbacks, as implemented in <strong>DownloadStressTestForm</strong>.</p>
<pre class="brush: csharp;">
        /// &lt;summary&gt;
        /// Response info callback, called after we get HTTP response header.
        /// Used to set info in GUI about max download size.
        /// &lt;/summary&gt;
        private void SetResponseInfo(string statusDescr, string contentLength)
        {
            if (this.InvokeRequired)
            {
                ResponseInfoDelegate del = new ResponseInfoDelegate(SetResponseInfo);
                this.Invoke(del, new object[] { statusDescr, contentLength });
            }
            else
            {
                lblStatusDescr.Text = statusDescr;
                lblContentLength.Text = contentLength;
            }
        }

        /// &lt;summary&gt;
        /// Progress callback, called when we've read another packet of data.
        /// Used to set info in GUI on % complete &amp; transfer rate.
        /// &lt;/summary&gt;
        private void Progress(int totalBytes, double pctComplete, double transferRate)
        {
            if (this.InvokeRequired)
            {
                ProgressDelegate del = new ProgressDelegate(Progress);
                this.Invoke(del, new object[] { totalBytes, pctComplete, transferRate });
            }
            else
            {
                lblBytesRead.Text = totalBytes.ToString();
                progressBar1.Value = (int)pctComplete;
                lblRate.Text = transferRate.ToString(&quot;f0&quot;);
            }
        }

        /// &lt;summary&gt;
        /// GUI-updating callback called when download has completed.
        /// &lt;/summary&gt;
        private void Done()
        {
            if (this.InvokeRequired)
            {
                DoneDelegate del = new DoneDelegate(Done);
                this.Invoke(del, new object[] { });
            }
            else
            {
                progressBar1.Value = 0;
                lblDownloadComplete.Visible = true;
            }
        }
</pre>
<p>This is pretty simple stuff.  To start with, notice the common pattern in each method, where we check <strong>InvokeRequired</strong>.  Remember the primary rule about updating controls in a user interface and asynchronous programming: the controls must be updated by the same thread that created them.  <strong>InvokeRequired</strong> tells us if we&#8217;re on the right thread or not.  If not, we use the <strong>Invoke</strong> method to recursively call ourselves, but on the thread that created the control (the one that owns the window handle).</p>
<p>Make note of this <strong>InvokeRequired</strong> / <strong>Invoke</strong> pattern.  You&#8217;ll use it whenever you&#8217;re doing background work on another thread and then you want to return some information back to the GUI.</p>
<p>The work that these callbacks do is very simple.  <strong>SetResponseInfo</strong> is called when we first get the reponse packet, as we start downloading the file.  We get an indication of the file size, which we write to the GUI.  <strong>Progress</strong> is called for each packet that we download.  We update the labels that indicate # bytes received and average transfer rate, as well as the main progress bar.  <strong>Done</strong> is called when we&#8217;re all done transfering the file.</p>
<p><strong>The Response Callback</strong></p>
<p>Let&#8217;s go back to where we called the <strong>WebRequest.BeginGetResponse</strong> method.  We we called this method, we specified our <strong>RespCallback</strong> as the method to get invoked when the response packet was received.  Here&#8217;s the code:</p>
<pre class="brush: csharp;">
        /// &lt;summary&gt;
        /// Main response callback, invoked once we have first Response packet from
        /// server.  This is where we initiate the actual file transfer, reading from
        /// a stream.
        /// &lt;/summary&gt;
        private static void RespCallback(IAsyncResult asyncResult)
        {
            try
            {
                // Will be either HttpWebRequestState or FtpWebRequestState
                WebRequestState reqState = ((WebRequestState)(asyncResult.AsyncState));
                WebRequest req = reqState.request;
                string statusDescr = &quot;&quot;;
                string contentLength = &quot;&quot;;

                // HTTP
                if (reqState.fileURI.Scheme == Uri.UriSchemeHttp)
                {
                    HttpWebResponse resp = ((HttpWebResponse)(req.EndGetResponse(asyncResult)));
                    reqState.response = resp;
                    statusDescr = resp.StatusDescription;
                    reqState.totalBytes = reqState.response.ContentLength;
                    contentLength = reqState.response.ContentLength.ToString();   // # bytes
                }

                // FTP part 1 - response to GetFileSize command
                else if ((reqState.fileURI.Scheme == Uri.UriSchemeFtp) &amp;&amp;
                         (reqState.FTPMethod == WebRequestMethods.Ftp.GetFileSize))
                {
                    // First FTP command was GetFileSize, so this 1st response is the size of
                    // the file.
                    FtpWebResponse resp = ((FtpWebResponse)(req.EndGetResponse(asyncResult)));
                    statusDescr = resp.StatusDescription;
                    reqState.totalBytes = resp.ContentLength;
                    contentLength = resp.ContentLength.ToString();   // # bytes
                }

                // FTP part 2 - response to DownloadFile command
                else if ((reqState.fileURI.Scheme == Uri.UriSchemeFtp) &amp;&amp;
                         (reqState.FTPMethod == WebRequestMethods.Ftp.DownloadFile))
                {
                    FtpWebResponse resp = ((FtpWebResponse)(req.EndGetResponse(asyncResult)));
                    reqState.response = resp;
                }

                else
                    throw new ApplicationException(&quot;Unexpected URI&quot;);

                // Get this info back to the GUI -- max # bytes, so we can do progress bar
                if (statusDescr != &quot;&quot;)
                    reqState.respInfoCB(statusDescr, contentLength);

                // FTP part 1 done, need to kick off 2nd FTP request to get the actual file
                if ((reqState.fileURI.Scheme == Uri.UriSchemeFtp) &amp;&amp; (reqState.FTPMethod == WebRequestMethods.Ftp.GetFileSize))
                {
                    // Note: Need to create a new FtpWebRequest, because we're not allowed to change .Method after
                    // we've already submitted the earlier request.  I.e. FtpWebRequest not recyclable.
                    // So create a new request, moving everything we need over to it.
                    FtpWebRequest req2 = (FtpWebRequest)FtpWebRequest.Create(reqState.fileURI);
                    req2.Credentials = req.Credentials;
                    req2.UseBinary = true;
                    req2.KeepAlive = true;
                    req2.Method = WebRequestMethods.Ftp.DownloadFile;

                    reqState.request = req2;
                    reqState.FTPMethod = WebRequestMethods.Ftp.DownloadFile;

                    // Start the asynchronous request, which will call back into this same method
                    IAsyncResult result =
                      (IAsyncResult)req2.BeginGetResponse(new AsyncCallback(RespCallback), reqState);
                }
                else    // HTTP or FTP part 2 -- we're ready for the actual file download
                {
                    // Set up a stream, for reading response data into it
                    Stream responseStream = reqState.response.GetResponseStream();
                    reqState.streamResponse = responseStream;

                    // Begin reading contents of the response data
                    IAsyncResult ar = responseStream.BeginRead(reqState.bufferRead, 0, BUFFER_SIZE, new AsyncCallback(ReadCallback), reqState);
                }

                return;
            }
            catch (Exception ex)
            {
                MessageBox.Show(string.Format(&quot;EXC in RespCallback(): {0}&quot;, ex.Message));
            }
        }
</pre>
<p>The first thing that we do in this method is to open our suitcase&#8211;our <strong>WebRequestState</strong> object, which comes back in the <strong>AsyncState</strong> property of the <strong>IAsyncResult</strong>.</p>
<p>The other main thing that we do in this method is to get the actual <strong>WebResponse</strong> object.  This contains the information that we actually got back from the server.  We do this by calling the <strong>EndGetResponse</strong> method.</p>
<p>Notice the standard <strong>Begin</strong>/<strong>End</strong> pattern for asynchronous programming here.  We could have done all of this synchronously, by calling <strong>GetResponse</strong> on the original <strong>HttpWebRequest</strong> (or <strong>FtpWebRequest</strong> object).  <strong>GetResponse </strong>would have returned an <strong>HttpWebResponse</strong> (or <strong>FtpWebResponse</strong> object).  Instead, we call <strong>BeginGetResponse</strong> to launch the asynchronous method and then call <strong>EndGetResponse</strong> in the callback to get the actual result&#8212;the <strong>WebResponse</strong> object.</p>
<p>At this point, the first thing that we want from the response packet is an indication of the length of the file that we&#8217;re downloading.  We get that from the <strong>ContentLength</strong> property.</p>
<p>It&#8217;s also at this point that we call the <strong>ResponseInfo</strong> delegate, passing it the status string and content length, to update the GUI.  (Using the <strong>respInfoCB</strong> field in the <strong>WebRequestState</strong> object).</p>
<p>Let&#8217;s ignore FTP for the moment and look at the final main thing that we do in this method&#8212;get a stream object and kick off a read of the first packet.  We get the stream from that <strong>WebReponse</strong> object and then go asynchronous again by calling the <strong>BeginRead</strong> method.  Are you seeing a pattern yet?  Again, if we wanted to do everything synchronously, we could just set up a loop here and call the stream&#8217;s <strong>Read</strong> method to read each buffer of data.  But instead, we fire up an asynchronous read, specifying our method that should be called when we get the first packet/buffer of data&#8212;<strong>ReadCallback</strong>.</p>
<p><strong>FTP Download, Step 2</strong></p>
<p>Let&#8217;s go back to how we&#8217;re doing FTP.  Remember that we set the <strong>FtpWebRequest.Method</strong> property to <strong>GetFileSize</strong>.  And in <strong>ReadCallback</strong>, if we see that we just did that first command, we send the file size back to the GUI.  And then we&#8217;re ready to launch the 2nd FTP command, which is <strong>DownloadFile</strong>.  We do this by creating a 2nd <strong>FtpWebRequest</strong> and calling the <strong>BeginGetResponse</strong> method again.  And once again, when the asynchronous method completes, we&#8217;ll get control back in <strong>ReadCallback</strong>.  We don&#8217;t risk recursing indefinitely because we store an indication of which command we&#8217;re doing in our suitcase&#8212;in <strong>WebRequestState.FTPMethod</strong>.</p>
<p><strong>Gettin&#8217; the Data</strong></p>
<p>Finally, let&#8217;s take a look at the code where we actually get a chunk of data from the server.  First, a quick note about buffer size.  Notice that when I called <strong>BeginRead</strong>, I specified a buffer size using the <strong>BUFFER_SIZE</strong> constant.  For the record, I&#8217;m using a value of 1448 here, which is based on the size of a typical TCP packet (packet size less some header info).  We could really use any value here that we liked&#8212;it just seemed reasonable to ask for the data a packet at a time.</p>
<p>Here&#8217;s the code for our read callback, which first fires when the first packet is received, after calling <strong>BeginRead</strong>.</p>
<pre class="brush: csharp;">
        /// &lt;summary&gt;
        /// Main callback invoked in response to the Stream.BeginRead method, when we have some data.
        /// &lt;/summary&gt;
        private static void ReadCallback(IAsyncResult asyncResult)
        {
            try
            {
                // Will be either HttpWebRequestState or FtpWebRequestState
                WebRequestState reqState = ((WebRequestState)(asyncResult.AsyncState));

                Stream responseStream = reqState.streamResponse;

                // Get results of read operation
                int bytesRead = responseStream.EndRead(asyncResult);

                // Got some data, need to read more
                if (bytesRead &gt; 0)
                {
                    // Report some progress, including total # bytes read, % complete, and transfer rate
                    reqState.bytesRead += bytesRead;
                    double pctComplete = ((double)reqState.bytesRead / (double)reqState.totalBytes) * 100.0f;

                    // Note: bytesRead/totalMS is in bytes/ms.  Convert to kb/sec.
                    TimeSpan totalTime = DateTime.Now - reqState.transferStart;
                    double kbPerSec = (reqState.bytesRead * 1000.0f) / (totalTime.TotalMilliseconds * 1024.0f);

                    reqState.progCB(reqState.bytesRead, pctComplete, kbPerSec);

                    // Kick off another read
                    IAsyncResult ar = responseStream.BeginRead(reqState.bufferRead, 0, BUFFER_SIZE, new AsyncCallback(ReadCallback), reqState);
                    return;
                }

                // EndRead returned 0, so no more data to be read
                else
                {
                    responseStream.Close();
                    reqState.response.Close();
                    reqState.doneCB();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(string.Format(&quot;EXC in ReadCallback(): {0}&quot;, ex.Message));
            }
        }
</pre>
<p>As I&#8217;m so fond of saying, this is pretty simple stuff.  Once again, we make use of recursion, because we&#8217;re asynchronously reading a packet at a time.  We get the stream object out of our suitcase and then call <strong>EndRead</strong> to get an indication of how many bytes were read.  This is the indicator that will tell us when we&#8217;re done reading the data&#8212;in which case # bytes read will be 0.</p>
<p>If we&#8217;re all done reading the data, we close down our stream and <strong>WebResponse</strong> object, before calling our final GUI callback to tell the GUI that we&#8217;re done.</p>
<p>But if we did read some data, we first call our progress callback to tell the GUI that we got another packet and then we fire off another <strong>BeginRead</strong>.  (Which will, of course, lead to our landing back in the <strong>ReadCallback</strong> method when the next packet completes).</p>
<p>You can see that we&#8217;re passing back some basic info to the GUI&#8212;total # bytes read, the % complete, and the calculated average transfer rate, in KB per second.</p>
<p>If we actually cared about the data itself, we could find it in our suitcase&#8212;in <strong>WebRequestState.bufferRead</strong>.  This is just a byte array that we specified when we called <strong>BeginRead</strong>.  In the case of this application, we don&#8217;t care about the actual data, so we don&#8217;t do anything with it.</p>
<p><strong>Opening the Suitcase</strong></p>
<p>We&#8217;ve looked at basically all the code, except for the implementation of the <strong>WebRequestState </strong>class that we&#8217;ve been using as our &#8220;suitcase&#8221;.  Here&#8217;s the base class:</p>
<pre class="brush: csharp;">
    /// &lt;summary&gt;
    /// Base class for state object that gets passed around amongst async methods
    /// when doing async web request/response for data transfer.  We store basic
    /// things that track current state of a download, including # bytes transfered,
    /// as well as some async callbacks that will get invoked at various points.
    /// &lt;/summary&gt;
    abstract public class WebRequestState
    {
        public int bytesRead;           // # bytes read during current transfer
        public long totalBytes;            // Total bytes to read
        public double progIncrement;    // delta % for each buffer read
        public Stream streamResponse;    // Stream to read from
        public byte[] bufferRead;        // Buffer to read data into
        public Uri fileURI;                // Uri of object being downloaded
        public string FTPMethod;        // What was the previous FTP command?  (e.g. get file size vs. download)
        public DateTime transferStart;  // Used for tracking xfr rate

        // Callbacks for response packet info &amp; progress
        public ResponseInfoDelegate respInfoCB;
        public ProgressDelegate progCB;
        public DoneDelegate doneCB;

        private WebRequest _request;
        public virtual WebRequest request
        {
            get { return null; }
            set { _request = value; }
        }

        private WebResponse _response;
        public virtual WebResponse response
        {
            get { return null; }
            set { _response = value; }
        }

        public WebRequestState(int buffSize)
        {
            bytesRead = 0;
            bufferRead = new byte[buffSize];
            streamResponse = null;
        }
    }
</pre>
<p>This is just all of the stuff that we wanted to pass around between our asynchronous methods.  You&#8217;ll see our three delegates, for calling back to the GUI.  And you&#8217;ll also see where we store our <strong>WebRequest</strong> and <strong>WebResponse </strong>objects.</p>
<p>The final thing to look at is the code, also in <strong>WebRequestState.cs</strong>, for the two derived classes&#8212;<strong>HttpWebRequestState</strong> and <strong>FtpWebRequestState</strong>.</p>
<pre class="brush: csharp;">
    /// &lt;summary&gt;
    /// State object for HTTP transfers
    /// &lt;/summary&gt;
    public class HttpWebRequestState : WebRequestState
    {
        private HttpWebRequest _request;
        public override WebRequest request
        {
            get
            {
                return _request;
            }
            set
            {
                _request = (HttpWebRequest)value;
            }
        }

        private HttpWebResponse _response;
        public override WebResponse response
        {
            get
            {
                return _response;
            }
            set
            {
                _response = (HttpWebResponse)value;
            }
        }

        public HttpWebRequestState(int buffSize) : base(buffSize) { }
    }

    /// &lt;summary&gt;
    /// State object for FTP transfers
    /// &lt;/summary&gt;
    public class FtpWebRequestState : WebRequestState
    {
        private FtpWebRequest _request;
        public override WebRequest request
        {
            get
            {
                return _request;
            }
            set
            {
                _request = (FtpWebRequest)value;
            }
        }

        private FtpWebResponse _response;
        public override WebResponse response
        {
            get
            {
                return _response;
            }
            set
            {
                _response = (FtpWebResponse)value;
            }
        }

        public FtpWebRequestState(int buffSize) : base(buffSize) { }
    }
</pre>
<p>The whole point of these classes is to allow us to override the <strong>request</strong> and <strong>response</strong> fields in the base class with strong-typed instances&#8212;e.g. <strong>HttpWebRequest</strong> and <strong>HttpWebResponse</strong>.</p>
<p><strong>Wrapping Up</strong></p>
<p>That&#8217;s about it&#8212;that&#8217;s really all that&#8217;s required to implement a very simple HTTP or FTP client application, using the <strong>HttpWebRequest</strong> and <strong>FtpWebRequest</strong> classes in <strong>System.Net</strong>.</p>
<p>This is still a pretty crude application and there are a number of obvious next steps that we could take if we wanted to improve it:</p>
<ul>
<li>Allow user to pick # downloads and kick off simultaneous downloads, each with their own progress bar</li>
<li>Prevent clicking <strong>Get File</strong> button if a download is already in progress.  (Try it&#8212;you do actually get a 2nd download, but the progress bar goes whacky trying to report on both at the same time).</li>
<li>Add a timer so that we can recover if a transfer times out</li>
<li>Allow the user to actually store the data to a local file</li>
<li>Log the results somewhere, especially if we launched multiple downloads</li>
</ul>
<br />Posted in Miscellaneous Tagged: Asynchronous Programming, FTP, HTTP, HTTP Download <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/spsexton.wordpress.com/475/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/spsexton.wordpress.com/475/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/spsexton.wordpress.com/475/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/spsexton.wordpress.com/475/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/spsexton.wordpress.com/475/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/spsexton.wordpress.com/475/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/spsexton.wordpress.com/475/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/spsexton.wordpress.com/475/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/spsexton.wordpress.com/475/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/spsexton.wordpress.com/475/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=475&subd=spsexton&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://stuff.seans.com/2009/01/05/using-httpwebrequest-for-asynchronous-downloads/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8922e4d5254d602ba3ed32dd073b5a4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">spsexton</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/01/01running.jpg" medium="image">
			<media:title type="html">Download Stress Test application</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/01/02credentials.jpg" medium="image">
			<media:title type="html">FTP Credentials</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/01/03ftprunning.jpg" medium="image">
			<media:title type="html">Downloading a file from an FTP server</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2009/01/04solution.jpg" medium="image">
			<media:title type="html">Files in Solution</media:title>
		</media:content>
	</item>
		<item>
		<title>Windows 7 Install Screens on PhotoZoom</title>
		<link>http://stuff.seans.com/2008/11/17/windows-7-install-screens-on-photozoom/</link>
		<comments>http://stuff.seans.com/2008/11/17/windows-7-install-screens-on-photozoom/#comments</comments>
		<pubDate>Mon, 17 Nov 2008 18:52:22 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[Windows 7]]></category>
		<category><![CDATA[Deep Zoom]]></category>
		<category><![CDATA[DeepZoom]]></category>
		<category><![CDATA[Windows 7 Install]]></category>

		<guid isPermaLink="false">http://spsexton.wordpress.com/?p=468</guid>
		<description><![CDATA[I just created my first Deep Zoom Composer project.  I added all of my Windows 7 install screenshots to a Deep Zoom project and then simply published them on Photo Zoom.  This was surprisingly easy&#8211;no coding required.  To zoom around in this set of images, click here.

Posted in Windows 7 Tagged: Deep Zoom, DeepZoom, Windows [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=468&subd=spsexton&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>I just created my first Deep Zoom Composer project.  I added all of my Windows 7 install screenshots to a Deep Zoom project and then simply published them on Photo Zoom.  This was surprisingly easy&#8211;no coding required.  To zoom around in this set of images, click <a href="http://photozoom.mslivelabs.com/album.aspx?alias=spsexton&amp;album=2">here</a>.</p>
<p><a href="http://photozoom.mslivelabs.com/album.aspx?alias=spsexton&amp;album=2"><img class="alignnone size-full wp-image-469" title="win7installall" src="http://spsexton.files.wordpress.com/2008/11/win7installall.jpg?w=901&#038;h=675" alt="win7installall" width="901" height="675" /></a></p>
<br />Posted in Windows 7 Tagged: Deep Zoom, DeepZoom, Windows 7, Windows 7 Install <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/spsexton.wordpress.com/468/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/spsexton.wordpress.com/468/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/spsexton.wordpress.com/468/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/spsexton.wordpress.com/468/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/spsexton.wordpress.com/468/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/spsexton.wordpress.com/468/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/spsexton.wordpress.com/468/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/spsexton.wordpress.com/468/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/spsexton.wordpress.com/468/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/spsexton.wordpress.com/468/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=468&subd=spsexton&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://stuff.seans.com/2008/11/17/windows-7-install-screens-on-photozoom/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8922e4d5254d602ba3ed32dd073b5a4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">spsexton</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2008/11/win7installall.jpg" medium="image">
			<media:title type="html">win7installall</media:title>
		</media:content>
	</item>
		<item>
		<title>A Recipe for Green-Field Software Development</title>
		<link>http://stuff.seans.com/2008/11/15/a-recipe-for-green-field-software-development/</link>
		<comments>http://stuff.seans.com/2008/11/15/a-recipe-for-green-field-software-development/#comments</comments>
		<pubDate>Sat, 15 Nov 2008 15:22:39 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[Agile methods]]></category>
		<category><![CDATA[Customer development]]></category>
		<category><![CDATA[Customer discovery]]></category>
		<category><![CDATA[Customers]]></category>
		<category><![CDATA[Four Steps to the Epiphany]]></category>
		<category><![CDATA[Inception]]></category>
		<category><![CDATA[ISV]]></category>
		<category><![CDATA[Product development]]></category>
		<category><![CDATA[Rationa Unified Process]]></category>
		<category><![CDATA[Requirements]]></category>
		<category><![CDATA[RUP]]></category>
		<category><![CDATA[Software development]]></category>
		<category><![CDATA[Software development process]]></category>
		<category><![CDATA[Software Entrepreneur]]></category>
		<category><![CDATA[Software iterations]]></category>
		<category><![CDATA[Software lifecycle]]></category>
		<category><![CDATA[Software process]]></category>
		<category><![CDATA[Use cases]]></category>

		<guid isPermaLink="false">http://spsexton.wordpress.com/?p=441</guid>
		<description><![CDATA[Developing Your Product and Your Customers in Parallel
In my 9-5 life, I’ve been a member of a software development team since 1985.  That’s 23 years as a software developer&#8212;ouch!
Like many developers who have been around for a few years, at least some of my grey hair can be attributed to having worked on hellish projects, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=441&subd=spsexton&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p><em>Developing Your Product and Your Customers in Parallel</em></p>
<p>In my 9-5 life, I’ve been a member of a software development team since 1985.  That’s 23 years as a software developer&#8212;ouch!</p>
<p>Like many developers who have been around for a few years, at least some of my grey hair can be attributed to having worked on hellish projects, or on projects that failed outright.  Over the years, I’ve gradually added to my mental list of “worst practices”&#8212;things that tend to lead to project failure, or at least hide a failing project until it’s too late to turn it into a successful one.</p>
<p>It’s much easier to compile a list of worst practices than it is to pick some “perfect” development process.  But worst practices can lead to best practices simply by avoiding the bad practices.  At a minimum, we should at least avoid making the same mistakes over and over again.</p>
<p>If I had to pick a single worst practice (there are many), it would be this:</p>
<p style="padding-left:30px;">Not building the product that the customer really needed</p>
<p>This happens all of the time.  We (the developers) build a product that is bug-free, efficient, scalable, and does exactly what we intended it to do.  We even occasionally get the work done in something close to the amount of time that we said it would take.</p>
<p>But our well-built software still fails&#8212;for a variety of reasons.</p>
<ul>
<li>It’s too hard to use</li>
<li>Users are unable to use it efficiently/effectively</li>
<li>It’s missing one or more critical features</li>
<li>Users don’t have a need for the software in the first place</li>
<li>It’s too expensive, given what it does</li>
</ul>
<p>In order to be “successful”, software has to meet a critical need that the user has.  Good software solves a pressing problem.  Great software does so in a way that seems natural to the users.</p>
<p>So what do I mean when I talk about software “failure”?  Simply put, “failed” software is: software that doesn’t get used.</p>
<p>What are the consequences of failure?  For internal software projects, it means wasted time and energy that could have been spent on things that the organization <strong>does </strong>need.  For consulting houses, it means possibly not getting hired back by the client, or seeing your reputation diminished.  For ISVs developing software/services to sell, it means lost revenue or even bankruptcy.</p>
<p>For developers, failure means knowing that you’ve wasted your time, intellect and energy on something that no one is going to use.  That sucks.</p>
<p>Our goal then as developers is to build great software.  We want to see users working with our stuff, to see it making their lives better, and to see them excited about it.  That’s the true Holy Grail that many of us work towards.</p>
<p><strong>The Remedy</strong></p>
<p>So how do we develop great software?  We can’t all be Steve Jobs, or hire him into our organization.  So without brilliant insight, how do we figure out what the users truly need?</p>
<p>To understand what users need&#8212;truly, madly, deeply&#8212;we need to think beyond developing <strong>products </strong>and start thinking about developing an understanding of our <strong>users</strong>.</p>
<p>This focus on a Customer Development Process, rather than a Product Development Process, is the point of the book <em><a href="http://www.amazon.com/Four-Steps-Epiphany-Steven-Blank/dp/0976470705/ref=pd_bbs_sr_1?ie=UTF8&amp;s=books&amp;qid=1226760535&amp;sr=8-1">The Four Steps to the Epiphany</a></em>, by Steven Gary Blank.</p>
<p>Blank’s main thesis is that we should work towards an understanding of our customers and their needs much earlier in the development lifecycle.  We need to fully understand what customers need and whether we can sell them our product <strong>before </strong>we go too far down the path of building that product.</p>
<p>Blank proposes a very detailed <em>Customer Development Process </em>and talks a little bit about when it should occur, relative to the typical phases of a <em>Product Development Process</em>.  This is a little tricky.  If we wait too long to learn about our customers, we risk building the wrong product.  But if we talk to them too early, before we’ve had time to think a little bit about our vision, we’re not really innovating, but just trying to build what they tell us to build.  That also can lead to failure.</p>
<p><strong>My Take on the Product Development Process</strong></p>
<p>Having worked as a software developer for so many years, I’ve seen lots of different software lifecycles.  In my first job, with Control Data Corp in Bloomington, MN, we were a Dept of Defense shop and rigidly followed <a href="http://en.wikipedia.org/wiki/DOD-STD-2167A">DOD-STD-2167A</a>&#8212;a very rigidly-defined classic waterfall process.</p>
<p>I’ve also done my share of agile development, working in groups that used various <a href="http://en.wikipedia.org/wiki/Agile_development">agile methods</a>.</p>
<p>My main takeaway on software process is that it’s important to develop <strong>iteratively</strong>.  For me, that’s the most critically important piece of the agile movement.  Many of the other techniques, like pair programming and test driven development might be important, but don’t seem quite as critical as being able to build your product iteratively.  <strong>Short iterations allow agility</strong>.</p>
<p>For me, one book that really made a lot of sense in laying out a framework for an iterative lifecycle was <a href="http://www.amazon.com/Rational-Unified-Process-Made-Easy/dp/0321166094/ref=pd_bbs_sr_1?ie=UTF8&amp;s=books&amp;qid=1226514580&amp;sr=8-1"><em>The Rational Unified Process Made Easy</em></a>, by Per Kroll.</p>
<p>For a lot of people, when they think about RUP (Rational Unified Process), they think: heavyweight and lots of modeling/diagramming.  But Kroll explains that RUP doesn’t necessarily mean heavy.  He refers to the number of artifacts that you’re required to produce as your level of ceremony.  And he describes RUP as:</p>
<p style="padding-left:30px;"><em>An <strong>iterative </strong>approach with an adaptable level of ceremony</em></p>
<p>Again, iterative is the important part.  An iterative approach with very little ceremony would basically be an agile methodology.  But sometimes you work on projects that require a bit more ceremony—some project tracking, etc.  On these projects, you can still be iterative, but with more ceremony.  Here’s a picture:</p>
<p><a href="http://spsexton.files.wordpress.com/2008/11/rupmap.gif"><img class="alignnone size-full wp-image-442" title="rupmap" src="http://spsexton.files.wordpress.com/2008/11/rupmap.gif?w=500&#038;h=365" alt="rupmap" width="500" height="365" /></a></p>
<p>RUP talks about general phases of the lifecycle being: Inception, Elaboration, Construction and Transition.  But Kroll is quick to point out that this does <strong>not </strong>just map to the classic waterfall model.  (Requirements, Analysis/Design, Implementation, Testing).  Rather, you’d typically perform some of each of the classic waterfall activities during each iteration of RUP.  You’d likely be doing a lot more requirements-gathering in your Inception phases, but you’d also be doing some implementation.  And you’d spend a lot of time writing code during Construction phases, but you might also still be tweaking some requirements.</p>
<p>Here’s a nice picture of how RUP typically plays out.  Again, note that the idea of iterations is important:</p>
<p><a href="http://spsexton.files.wordpress.com/2008/11/rupphases.gif"><img class="alignnone size-full wp-image-443" title="rupphases" src="http://spsexton.files.wordpress.com/2008/11/rupphases.gif?w=500&#038;h=345" alt="rupphases" width="500" height="345" /></a></p>
<p>Personally, I like this view of the development lifecycle a lot.  This model is how I think about software development.  Work in an iterative fashion, but be aware of what main phase you’re in and adjust your activities accordingly.</p>
<p>Over the years, I’ve taken lots of notes to answer the question, “what activities should I be doing at each step”?  Kroll has a lot of good information in his book, but I’ve borrowed liberally from other sources.  What I ended up with was a fairly detailed “a la carte” list of activities that you might engage in across the lifecycle.</p>
<p>I say “a la carte” because every project will not engage in every step.  But I think it’s a nice master list to draw from.  And I think that I have the activities listed in a pretty reasonable order.</p>
<p>So here’s my list of high-level activities for the <strong>Product Development Lifecycle</strong>.  (See below for more detail for each activity):</p>
<ul>
<li>Vision</li>
<li>Initial Requirements Gathering  (Inception)</li>
<li>GUI Conceptualizing</li>
<li>Identify Candidate Architecture</li>
<li>Define Non-Functional Tasks</li>
<li>Define Iterations  (Project Planning)</li>
<li>Write Development Plan</li>
<li>Execute Inception iterations</li>
<li>Write Business Plan</li>
<li>Write Test Plan</li>
<li>Write Deployment Plan</li>
<li>Execute Construction Iterations</li>
<li>Initiate Test Plan</li>
<li>Deploy Alpha Release</li>
<li>Write Customer Support Plan</li>
<li>Execute Deployment Iteration</li>
<li>Deploy Beta Release</li>
<li>Launch Product</li>
<li>Begin Planning Next Release</li>
</ul>
<p><strong>The Customer Development Process</strong></p>
<p>I love the idea of the Customer Development Process, as Blank presents it in <a href="http://www.amazon.com/Four-Steps-Epiphany-Steven-Blank/dp/0976470705"><em>The Four Steps to the Epiphany</em></a>.  He talks about discovering who your customers are, figuring out what they need, and then testing your hypotheses.  In other words&#8212;<em>iterate not just on the product, but also on your model of who the customers are</em>.  This includes not just an understanding of the customers and their needs, but also gets into the actual selling proposition and marketing of your product.</p>
<p>Here are the top-level activities in Blank’s customer development process:</p>
<ul>
<li>Customer Discovery</li>
<li>Customer Validation</li>
<li>Customer Creation</li>
<li>Company Building</li>
</ul>
<p><strong>Lining Things Up</strong></p>
<p>The trick is to figure out how the <em>Product Development Process </em>and the <em>Customer Development Process </em>relate to each other.  If you listed out the various phases of each process side by side, how would they line up?  At what point in your product development process should you start the customer development process?  Or should it be the other way around?</p>
<p>Here’s a first stab at lining the two processes up.  My goal was to come up with a high-level roadmap for doing new (green field) development, which would cover developing both the product and the customers.</p>
<table style="width:100%;" border="0">
<tbody>
<tr>
<td><strong>Product Development Process<br />
</strong></td>
<td><strong>Customer Development Process<br />
</strong></td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
<tr>
<td>Vision</td>
<td></td>
</tr>
<tr>
<td>Initial Requirements Gathering</td>
<td></td>
</tr>
<tr>
<td>GUI Conceptualizing</td>
<td></td>
</tr>
<tr>
<td>Identify Candidate Architecture</td>
<td></td>
</tr>
<tr>
<td>Define Non-Functional Tasks</td>
<td></td>
</tr>
<tr>
<td>Define Iterations (Project Planning)</td>
<td></td>
</tr>
<tr>
<td>Write Development Plan</td>
<td></td>
</tr>
<tr>
<td>Execute Inception Iterations  <strong>&gt;&gt;</strong></td>
<td>Customer Discovery</td>
</tr>
<tr>
<td>Write Business Plan</td>
<td></td>
</tr>
<tr>
<td>Write Test Plan</td>
<td></td>
</tr>
<tr>
<td>Write Deployment Plan</td>
<td></td>
</tr>
<tr>
<td>Execute Construction Iterations  <strong>&gt;&gt;</strong></td>
<td>Customer Validation</td>
</tr>
<tr>
<td>Initiate Test Plan</td>
<td></td>
</tr>
<tr>
<td>Deploy Alpha Release  <strong>&gt;&gt;</strong></td>
<td>Customer Creation</td>
</tr>
<tr>
<td>Write Customer Support Plan</td>
<td></td>
</tr>
<tr>
<td>Execute Deployment Iteration</td>
<td></td>
</tr>
<tr>
<td>Deploy Beta Release</td>
<td></td>
</tr>
<tr>
<td>Launch Product</td>
<td></td>
</tr>
<tr>
<td>Begin Planning Next Release  <strong>&gt;&gt;</strong></td>
<td>Company Building</td>
</tr>
<tr>
<td>.</td>
<td></td>
</tr>
</tbody>
</table>
<p><strong>Should I Keep Reading?</strong></p>
<p>The rest of this post expands on each of the activities in the table above, listing details of what happens during each phase.  This is the outline that I use when I’m trying to figure out “what to do next”.</p>
<p>Note again&#8212;this process is very much geared towards green-field development, and in a market where you are developing a product or service to sell to end-users.</p>
<p><strong>Product Development Process&#8212;Details</strong></p>
<p>Here’s the detailed breakdown of the steps involved in the <strong>Product Development Process</strong>.  Much of this content comes from the books I list at the end of the article, primarily <a href="http://www.amazon.com/Rational-Unified-Process-Made-Easy/dp/0321166094/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1226760857&amp;sr=1-1"><em>The Rational Unified Process Made Easy</em></a> and <a href="http://www.amazon.com/First-Software-Development-Brain-Friendly-Guides/dp/0596527357/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1226760891&amp;sr=1-1"><em>Head First Software Development</em></a>.  But a lot of it is just my own concept of what you typically do during each phase.</p>
<p>Note that iterations occur in the Inception and Construction phases.</p>
<p><span style="text-decoration:underline;">Vision</span></p>
<ul>
<li>Do a short description of a handful of possible products
<ul>
<li>For each, describe:
<ul>
<li>Market or market segment  (which group of users, short description)
<ul>
<li>What is the problem that they experience</li>
<li>How painful to the users?  What workarounds are in place?</li>
</ul>
</li>
<li>Short description of product that might help them solve this problem</li>
<li>Short feature list (&lt;10 items, single sentence)</li>
<li>How does this product specifically solve the customer&#8217;s problem?</li>
</ul>
</li>
</ul>
</li>
<li>Expand on top one or two possible products.<br />
<em>(For each, expand information to include):</em></p>
<ul>
<li>Write up SIMs (Specific Internet Market Segment, <a href="http://www.amazon.com/Micro-ISV-Vision-Reality-Bob-Walsh/dp/1590596013/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1226760927&amp;sr=1-1">Walsh</a> pg 158..)
<ul>
<li>Lots of details about the targeted user group</li>
</ul>
</li>
<li>Other user information
<ul>
<li>How often do you expect each user group to user the product?</li>
<li>Why might they stop using the product?</li>
<li>Rough guess as to size of this market, e.g. # potential users?</li>
</ul>
</li>
<li>Are there other non-primary users?<br />
<em>(E.g. users who didn&#8217;t purchase, or just different group of users)</em></p>
<ul>
<li>Also describe their &#8220;problem&#8221; and how product solves it</li>
<li>Are they also potential buyers, or just users?</li>
<li>What subset of the feature list might they use?</li>
<li>What else differentiates them from primary user group?</li>
<li>Also write up SIM for this user group</li>
</ul>
</li>
<li>Bluesky one or more revenue models.  Answer for each:
<ul>
<li>What would this customer pay for this product?
<ul>
<li>Specify target price or range that might be tolerable</li>
</ul>
</li>
<li>One-time purchase or ongoing subscription?  (or a combination)</li>
<li>Pricing tiers?  If so, describe</li>
<li>Trial period?  If so, describe</li>
<li>If &gt;1 user group, repeat for other groups</li>
<li>What level of certainty do you have that they will purchase?</li>
<li>Why might they not purchase?  List reasons.</li>
<li>Possible ways to mitigate non-purchase reasons.</li>
<li>Does revenue model depend on continued use of the product?</li>
<li>How will you collect money?</li>
<li>What is your distribution channel?  (i.e. how do they receive product)</li>
<li>If ongoing subscription, describe what happens when they stop paying<br />
<em>(E.g. limited access)?</em></li>
</ul>
</li>
<li>Revenue model/estimates  (per yr)
<ul>
<li>Make rough estimate of ongoing costs, per user or account</li>
<li>List expected revenue per user, single or ongoing, per yr</li>
<li>Starting with desired annual revenue, describe # customers required to meet goal</li>
</ul>
</li>
<li>Marketing / Sales vision
<ul>
<li>How might product be branded?</li>
<li>How is product positioned (e.g. tagline)</li>
<li>How might you reach desired users?  (make aware)</li>
<li>What is selling proposition (argument to buy)?</li>
</ul>
</li>
<li>Competitive analysis
<ul>
<li>Assess and summarize competitive products that do similar/same thing as yours</li>
<li>What are their strengths/weaknesses?</li>
<li>Where can you improve on them?  To what degree?</li>
<li>What are you missing that competitors might have?</li>
</ul>
</li>
</ul>
</li>
</ul>
<p><span style="text-decoration:underline;">Initial Requirements Gathering<br />
</span><em>(Chap 2 of <a href="http://www.amazon.com/First-Software-Development-Brain-Friendly-Guides/dp/0596527357/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1226760981&amp;sr=1-1">Head First Software Development</a>)</em></p>
<ul>
<li>Generate quick list of basic ideas, 1-3 sentences each, Title/Description</li>
<li>Ask user questions to flesh out the list</li>
<li>Bluesky to generate feature lists (Title/Description)
<ul>
<li>Use other people</li>
<li>Okay to spit out non-functional stuff, like specific GUI thoughts, or architecture</li>
</ul>
</li>
<li>Build User Stories
<ul>
<li>Describe one thing</li>
<li>Language of the customer</li>
<li>Title/Description</li>
<li>1-3 sentences</li>
</ul>
</li>
<li>Pull out non-customer stories, save for later (design)</li>
<li>Refine initial set of user stories, w/customer feedback</li>
<li>Provide estimates for each user story
<ul>
<li>Include assumptions</li>
</ul>
</li>
<li>Team estimation and revision</li>
<li>Clarify assumptions w/users, if necessary</li>
<li>Break apart users stories that are &gt;15 days</li>
<li>Add up estimates to get estimate for total project</li>
</ul>
<p><span style="text-decoration:underline;">GUI Conceptualizing</span></p>
<ul>
<li>Select key use cases that need GUI concept</li>
<li>User interaction goals
<ul>
<li>Outline some key goals of user interaction model<br />
(E.g. discoverability, efficiency, slick animation, etc)</li>
<li>Describe user action requirements verbally for specific use cases</li>
</ul>
</li>
<li>Assess similar products&#8217; GUIs for similar use cases
<ul>
<li>Pros/cons of each</li>
</ul>
</li>
<li>For each use case selected
<ul>
<li>Paper prototype one or more possible GUIs</li>
<li>Storyboard any dynamic behavior</li>
<li>Brainstorm alternative approaches and paper prototype</li>
</ul>
</li>
<li>Identify common sequences of use cases  (e.g. find/edit)
<ul>
<li>Storyboard use case sequences</li>
<li>Brainstorm ways to optimize the storyboard/sequence</li>
</ul>
</li>
<li>Assess GUI model against several measures of good GUI design</li>
<li>Technical review of GUI feasibility
<ul>
<li>Build it, buy it, or freebie (part of tool or freeware)?</li>
<li>If build, rough guess as to effort</li>
<li>If buy, what is the cost?  One-time &amp; ongoing.</li>
</ul>
</li>
<li>Assess technical risk
<ul>
<li>Are there any aspects of GUI that need to be proven out?</li>
</ul>
</li>
<li>Hammer looking for nails
<ul>
<li>Make short list of most compelling GUI models in new products</li>
<li>Is there anywhere in product that you might use these models?</li>
</ul>
</li>
<li>Brainstorm user assistance model (help, wizards, demos, etc.&#8211;learning)</li>
<li>GUI models from competitors
<ul>
<li>If there are competitive products that compete in same space, summarize their main GUI elements.</li>
<li>Assess&#8212;is their GUI or user interaction model an asset or a liability?</li>
</ul>
</li>
<li>Review
<ul>
<li>Early review internally (not w/customers)</li>
<li>Review static screen mockups (e.g. paper prototypes)</li>
<li>Look at discoverability&#8211;obvious what it&#8217;s used for?</li>
<li>Aesthetics</li>
</ul>
</li>
</ul>
<p><span style="text-decoration:underline;">Identify Candidate Architecture</span></p>
<ul>
<li>Identify one possible architecture that could support the product</li>
<li>Identify any areas of technical risk</li>
<li>Discuss pros/cons/risks</li>
<li><em>[For more details, see <a href="http://www.amazon.com/Rational-Unified-Process-Made-Easy/dp/0321166094/ref=sr_1_2?ie=UTF8&amp;s=books&amp;qid=1226761135&amp;sr=1-2">Kroll</a>]</em></li>
</ul>
<p><span style="text-decoration:underline;">Define Non-Functional Tasks</span></p>
<ul>
<li>Define additional tasks to be completed during inception that are NOT use cases</li>
<li>Possible examples include:
<ul>
<li>GUI proof-of-concept, for technical &amp; usability</li>
<li>Building candidate architecture  (must do)</li>
<li>Technical proof-of-concept</li>
<li>Capacity testing for architecture (e.g. scalability)</li>
</ul>
</li>
<li>Provide priorities and estimates for all tasks<br />
(will feed into iteration planning, along w/use cases)</li>
</ul>
<p><span style="text-decoration:underline;">Define Iterations<br />
</span><em>(Chap 3 of <a href="http://www.amazon.com/First-Software-Development-Brain-Friendly-Guides/dp/0596527357/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1226760981&amp;sr=1-1">Head First Software Development</a>)</em></p>
<ul>
<li>Set target date for first (next) release</li>
<li>Work w/customer to prioritize user stories</li>
<li>Also feed non-functional tasks into process</li>
<li>Select subset of user stories to meet target date  (Milestone 1)
<ul>
<li>If the features don&#8217;t fit target date, re-prioritize</li>
<li>Focus on user stories that are absolutely critical</li>
<li>Baseline functionality&#8211;smallest set of features so that SW is at all useful to customers</li>
</ul>
</li>
<li>Prioritize user stories in Milestone 1.0  (1-5, with 1 as highest priority)</li>
<li>Assign user stories to iterations, using 20-day iterations
<ul>
<li>Based on priority</li>
<li>Or user stories required to implement other user stories</li>
</ul>
<ul>
<li>Use velocity of 0.7  (0.7days effort for each real day)<br />
<em>I.e. Each iteration should contain 14 person-days of estimated work</em></li>
</ul>
</li>
<li>Reassess schedule and adjust schedule and/or content
<ul>
<li>Because of velocity, things likely can&#8217;t fit</li>
<li>Add iteration(s), change M1 date, or both</li>
</ul>
</li>
<li>Get iterations &amp; user stories into tracking spreadsheet</li>
<li>Construct burn-down graph for 1st iteration
<ul>
<li>X axis is calendar days</li>
<li>Y axis is person-days of work accomplished</li>
<li>Draw diagonal line as ideal burn-down rate</li>
</ul>
</li>
</ul>
<p><span style="text-decoration:underline;">Write Development Plan</span></p>
<ul>
<li>Describe everything that will happen from here on out</li>
<li>Include
<ul>
<li>Iterations and contained user stories &amp; tasks</li>
<li>Milestones</li>
<li>Review points and staff</li>
<li>High-level test plan</li>
<li>alpha/beta/release plan</li>
<li>Staff</li>
<li>Schedule</li>
<li>Tools</li>
<li>Show steps in Product Development process</li>
<li>Show steps in Customer Development process</li>
<li>Show how the two processes line up</li>
<li>Include calendar alignment, if appropriate</li>
</ul>
</li>
</ul>
<p><span style="text-decoration:underline;">Execute Inception Iterations<br />
</span><em>(Chap 4 of <a href="http://www.amazon.com/First-Software-Development-Brain-Friendly-Guides/dp/0596527357/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1226760981&amp;sr=1-1">Head First Software Development</a> &#8211; User stories &amp; tasks)</em></p>
<ul>
<li>Break down each user story into tasks
<ul>
<li>Title/Description/Estimate</li>
<li>Provide estimate for each task</li>
<li>E.g. Create class, create GUI prototype, create schema, create SQL scripts</li>
<li>Each task should be 0.5 &#8211; 5 days</li>
</ul>
</li>
<li>Plot where you are on burn-down graph
<ul>
<li>Calendar day vs. new estimate of person-days of work left</li>
</ul>
</li>
<li>Update spreadsheet w/tasks &amp; their estimates
<ul>
<li>Task estimates replace user story estimates</li>
<li>Also track burn-down in spreadsheet</li>
<li>Put stickies on big board, tasks, In Progress/Complete, etc. (pg 116 of <a href="http://www.amazon.com/First-Software-Development-Brain-Friendly-Guides/dp/0596527357/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1226761187&amp;sr=1-1"><em>Pilone/Miles</em></a>)</li>
</ul>
</li>
<li>Start working on first tasks
<ul>
<li>Move stickies on board when they are <em>In Progress</em></li>
</ul>
</li>
<li>Daily stand-up meetings to track progress
<ul>
<li>First thing in the morning</li>
<li>Track progress&#8211;what has each person accomplished</li>
<li>Update burn-down rate</li>
<li>Update tasks</li>
<li>What happened yesterday, what is plan for today</li>
<li>Talk about any problems</li>
<li>5-15 mins long</li>
</ul>
</li>
<li>Add unplanned tasks to iteration, if necessary
<ul>
<li>Add user story, estimate, break into tasks, review w/customer, add to board</li>
<li>Use red stickies</li>
<li>Update burn-down, showing that you&#8217;re off</li>
</ul>
</li>
<li>Next iteration<br />
<em>(Chap 10 of <a href="http://www.amazon.com/First-Software-Development-Brain-Friendly-Guides/dp/0596527357/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1226760981&amp;sr=1-1">Head First Software Development</a>)</em></p>
<ul>
<li>End of iteration review (pg 342-343 of <a href="http://www.amazon.com/First-Software-Development-Brain-Friendly-Guides/dp/0596527357/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1226761187&amp;sr=1-1">Pilone/Miles</a>)</li>
<li>Verify SW passes all tests</li>
<li>Demo/review w/customer</li>
<li>Plan next iteration
<ul>
<li>Add new user stories, if required</li>
<li>Update priority/estimates for everything</li>
<li>Adjust velocity</li>
<li>Feed in bug backlog as tasks</li>
<li>Priority tradeoffs include bug-fixes vs. new features</li>
</ul>
</li>
<li>Follow steps from Pilone/Miles chap 4 (break down into tasks and estimate)</li>
</ul>
</li>
</ul>
<p><span style="text-decoration:underline;">Write Business Plan</span></p>
<ul>
<li>Goal isn&#8217;t to get funding, but to make a case for the product/business<br />
(at least on paper)</li>
<li>Include stuff like
<ul>
<li>Market description</li>
<li>Customer description</li>
<li>Description of competitors&#8217; products/services</li>
<li>Product proposition
<ul>
<li>What is customers&#8217; problem?</li>
<li>What is your vision for product/service</li>
<li>How does product/service solve their problem?</li>
</ul>
</li>
<li>Outline of development plan</li>
<li>Outline of Product/Customer Development processes</li>
<li>Summarize revenue model</li>
<li>Summarize marketing/sales plan</li>
<li>Business structure: staffing, organization, etc.</li>
</ul>
</li>
<li>Add other typical business plan elements</li>
</ul>
<p><span style="text-decoration:underline;">Write Test Plan</span></p>
<ul>
<li>What to test, how to test, when to test</li>
<li>Plan for test-driven development, using appropriate TDD tools</li>
<li>Plan automated/nightly builds and automation of testing</li>
<li>See <a href="http://www.amazon.com/First-Software-Development-Brain-Friendly-Guides/dp/0596527357/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1226761187&amp;sr=1-1"><em>Pilone/Miles</em></a>, chap 7, among others</li>
</ul>
<p><span style="text-decoration:underline;">Write Deployment Plan</span></p>
<ul>
<li>How/when will software be deployed?</li>
<li>Map out alpha/beta/launch</li>
<li>Where does testing fit into the plan?</li>
<li>How will customers get the software?</li>
<li>How will they pay for it?</li>
<li>How do you track customers?</li>
</ul>
<p><span style="text-decoration:underline;">Execute Construction Iterations<br />
</span><em>(Chap 4 of <a href="http://www.amazon.com/First-Software-Development-Brain-Friendly-Guides/dp/0596527357/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1226760981&amp;sr=1-1">Head First Software Development</a> &#8211; User stories &amp; tasks)</em></p>
<ul>
<li>Break down each user story into tasks
<ul>
<li>Title/Description/Estimate</li>
<li>Provide estimate for each task</li>
<li>E.g. Create class, create GUI prototype, create schema, create SQL scripts</li>
<li>Each task should be 0.5 &#8211; 5 days</li>
</ul>
</li>
<li>Plot where you are on burn-down graph
<ul>
<li>Calendar day vs. new estimate of person-days of work left</li>
</ul>
</li>
<li>Update spreadsheet w/tasks &amp; their estimates
<ul>
<li>Task estimates replace user story estimates</li>
<li>Also track burn-down in spreadsheet</li>
<li>Put stickies on big board, tasks, In Progress/Complete, etc. (pg 116 of <a href="http://www.amazon.com/First-Software-Development-Brain-Friendly-Guides/dp/0596527357/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1226761187&amp;sr=1-1"><em>Pilone/Miles</em></a>)</li>
</ul>
</li>
<li>Start working on first tasks
<ul>
<li>Move stickies on board when they are In Progress</li>
</ul>
</li>
<li>Daily stand-up meetings to track progress
<ul>
<li>First thing in the morning</li>
<li>Track progress&#8211;what has each person accomplished</li>
<li>Update burn-down rate</li>
<li>Update tasks</li>
<li>What happened yesterday, what is plan for today</li>
<li>Talk about any problems</li>
<li>5-15 mins long</li>
</ul>
</li>
<li>Add unplanned tasks to iteration, if necessary
<ul>
<li>Add user story, estimate, break into tasks, review w/customer, add to board</li>
<li>Use red stickies</li>
<li>Update burn-down, showing that you&#8217;re off</li>
</ul>
</li>
<li>Next iteration<br />
<em> (Chap 10 of <a href="http://www.amazon.com/First-Software-Development-Brain-Friendly-Guides/dp/0596527357/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1226760981&amp;sr=1-1">Head First Software Development</a>)</em></p>
<ul>
<li>End of iteration review (pg 342-343 of <a href="http://www.amazon.com/First-Software-Development-Brain-Friendly-Guides/dp/0596527357/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1226761187&amp;sr=1-1"><em>Pilone/Miles</em></a>)</li>
<li>Verify SW passes all tests</li>
<li>Demo/review w/customer</li>
<li>Plan next iteration
<ul>
<li>Add new user stories, if required</li>
<li>Update priority/estimates for everything</li>
<li>Adjust velocity</li>
<li>Feed in bug backlog as tasks</li>
<li>Priority tradeoffs include bug-fixes vs. new features</li>
</ul>
</li>
<li>Follow steps from <a href="http://www.amazon.com/First-Software-Development-Brain-Friendly-Guides/dp/0596527357/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1226761187&amp;sr=1-1"><em>Pilone/Miles</em></a>, chap 4 (break down into tasks and estimate)</li>
</ul>
</li>
</ul>
<p><span style="text-decoration:underline;">Initiate Test Plan</span></p>
<ul>
<li>Begin regular testing</li>
<li>Functional, integration, system test (no customer testing yet)</li>
</ul>
<p><span style="text-decoration:underline;">Deploy Alpha Release</span></p>
<ul>
<li>Outline goals for beta and exit criteria</li>
<li>Identify potential customers/users</li>
<li>Communicate w/users about goals &amp; feedback mechanism</li>
<li>Feeds into appropriate spot in Customer Development process
<ul>
<li>Possibly at end of each construction iteration</li>
</ul>
</li>
<li>Gather feedback and feed into development
<ul>
<li>E.g. Changes desired/required?</li>
</ul>
</li>
</ul>
<p><span style="text-decoration:underline;">Write Customer Support Plan</span></p>
<ul>
<li>How will customers be supported after software is deployed?</li>
<li>List main goal(s)</li>
<li>Decide on tools, e.g.
<ul>
<li>External issue tracking</li>
<li>FAQ sheets for tech support staff</li>
</ul>
</li>
<li>Decide on process(es), e.g.
<ul>
<li>Communication w/customer</li>
<li>Looking for answer in FAQ</li>
<li>How to communicate answer, if known</li>
<li>Get closure</li>
<li>2nd tier&#8211;investigate, look for workaround</li>
<li>Interaction between staff (e.g. support/development)</li>
<li>3rd tier&#8211;reported bug, e.g. give bug # and have traceback mechanism</li>
</ul>
</li>
<li>Escalation process</li>
</ul>
<p><span style="text-decoration:underline;">Execute Deployment Iteration</span></p>
<ul>
<li>Working on deployment tasks, e.g.
<ul>
<li>Installs/uninstalls</li>
<li>Distribution/delivery</li>
<li>Payment</li>
<li>Customer tracking</li>
</ul>
</li>
</ul>
<p><span style="text-decoration:underline;">Deploy Beta Release</span></p>
<ul>
<li>Outline goals for beta and exit criteria</li>
<li>Identify potential customers/users</li>
<li>Communicate w/users about goals &amp; feedback mechanism</li>
<li>Feeds into appropriate spot in Customer Development process
<ul>
<li>Likely after Deployment Iteration</li>
</ul>
</li>
<li>Gather feedback and feed into development
<ul>
<li>E.g. Changes desired/required?</li>
</ul>
</li>
<li>Beta should not last indefinitely</li>
</ul>
<p><span style="text-decoration:underline;">Launch Product</span></p>
<ul>
<li>Announce product</li>
<li>Launch it</li>
<li>Throw a big party</li>
</ul>
<p><span style="text-decoration:underline;">Begin Planning Next Release</span></p>
<ul>
<li>Post-mortem for Product/Customer Development processes</li>
<li>Lessons learned</li>
<li>Changes to process</li>
<li>Assess organize outstanding bugs
<ul>
<li>Prioritize, estimate</li>
</ul>
</li>
<li>Organize list of possible future features
<ul>
<li>Plan mechanism for using existing customers to get feedback on priorities</li>
<li>Prioritize, estimate</li>
</ul>
</li>
<li>Decide on schedule for next release</li>
<li>Map out iterations
<ul>
<li>Each iteration either bug-fixing or new development</li>
<li>Bug-fixing phase likely first</li>
</ul>
</li>
<li>Goal: All bugs fixed prior to next release</li>
<li>Continued refinement of plan, based on ongoing customer feedback</li>
<li>Back to start of Product/Customer Development processes for next release<br />
<em>(follow same processes, including updating relevant plans)</em></li>
</ul>
<p><strong>Customer Development Process&#8212;Details</strong></p>
<p>Here’s the detailed breakdown of the steps involved in the <strong>Customer Development Process</strong>.  This comes directly from <a href="http://www.amazon.com/Four-Steps-Epiphany-Steven-Blank/dp/0976470705/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1226761339&amp;sr=1-1"><em>Four Steps to the Epiphany</em></a>.</p>
<p><span style="text-decoration:underline;">Customer Discovery</span></p>
<ul>
<li>State hypotheses
<ul>
<li>Write briefs, state assumptions about product, customers, pricing, demand, competitors</li>
</ul>
</li>
<li>Test problem hypotheses
<ul>
<li>Test in front of potential customers</li>
</ul>
</li>
<li>Test product concept
<ul>
<li>Test product features in front of customers</li>
<li>Solves their problem?</li>
<li>Also test business model
<ul>
<li>Must-have?</li>
<li>Pricing</li>
<li>Distribution</li>
</ul>
</li>
</ul>
</li>
<li>Verify
<ul>
<li>You understand the customer&#8217;s problems</li>
<li>Your product solves these problems</li>
<li>Customers will pay for the product</li>
<li>You have in mind a profitable business model</li>
</ul>
</li>
<li>Repeat if necessary</li>
</ul>
<p><span style="text-decoration:underline;">Customer Validation</span></p>
<ul>
<li>Get Ready to Sell
<ul>
<li>Articulate value proposition</li>
<li>Prep sales materials &amp; collateral plan</li>
<li>Develop distribution channel plan</li>
<li>Develop sales roadmap</li>
<li>Hire sales closer</li>
<li>Synch up Product/Customer Dev teams on features/dates</li>
<li>Formalize advisory board</li>
</ul>
</li>
<li>Sell to Visionary Customers
<ul>
<li>Sell unfinished product</li>
<li>Answer all sales roadmap questions</li>
</ul>
</li>
<li>Develop Positioning
<ul>
<li>Initial positioning</li>
<li>Articulate belief about product and its place in the market</li>
</ul>
</li>
<li>Verify
<ul>
<li>Enough orders to prove we can sell?</li>
<li>Profitable sales model?</li>
<li>Profitable business model?</li>
<li>Can you scale the business?</li>
</ul>
</li>
<li>Repeat, if necessary</li>
</ul>
<p><span style="text-decoration:underline;">Customer Creation</span></p>
<ul>
<li>Get Ready to Launch
<ul>
<li>Market Type Questionnaire</li>
<li>Choose Market Type</li>
<li>Choose 1st Year Objectives</li>
</ul>
</li>
<li>Position company &amp; product
<ul>
<li>Select PR agency</li>
<li>Positioning audits</li>
<li>Positioning to market type</li>
</ul>
</li>
<li>Launch company &amp; product
<ul>
<li>Select launch type</li>
<li>Select customer audience</li>
<li>Select the messengers</li>
<li>Craft the messages</li>
<li>Message context</li>
</ul>
</li>
<li>Create demand
<ul>
<li>Demand creation strategy</li>
<li>Demand creation measurements</li>
<li>Iterate or exit</li>
</ul>
</li>
</ul>
<p><span style="text-decoration:underline;">Company Building</span></p>
<ul>
<li>Reach mainstream customers
<ul>
<li>Change “earlyvangelists” into mainstream customers</li>
<li>Manage sales growth by market type</li>
</ul>
</li>
<li>Review management / Create mission culture
<ul>
<li>Review management</li>
<li>Develop “mission-centric” culture</li>
</ul>
</li>
<li>Transition to functional departments
<ul>
<li>Set department mission statement</li>
<li>Set department roles by market type</li>
</ul>
</li>
<li>Build fast-response departments
<ul>
<li>Implement mission-centric management</li>
<li>Create an “information culture”</li>
<li>Build a “leadership culture”</li>
</ul>
</li>
</ul>
<p><strong>Closing Thoughts</strong></p>
<p>The key takeaway for me from Blank’s book was as follows:</p>
<p style="padding-left:30px;">It’s not enough to build a great product.  You must also build a product that the customers need and that they will buy.  It&#8217;s also criticial to find a workable business model to sell to the right customers at the right price.</p>
<p>If you haven’t yet read <a href="http://www.amazon.com/Four-Steps-Epiphany-Steven-Blank/dp/0976470705/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1226761339&amp;sr=1-1"><em>Four Steps to the Epiphany</em></a>, I’d really encourage you to go out and read it.  Then you can start thinking about how to develop your customers, as well as your product.</p>
<p><strong>Sources</strong></p>
<p>I’ve used the following sources, in varying degrees, for this post:</p>
<ul>
<li><a href="http://www.amazon.com/Four-Steps-Epiphany-Steven-Blank/dp/0976470705/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1226761339&amp;sr=1-1"><em>Four Steps to the Epiphany</em></a>, Blank, cafepress.com, 2006.</li>
<li><a href="http://www.amazon.com/Business-Software-Manager-Programmer-Entrepreneur/dp/074321580X/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1226761401&amp;sr=1-1"><em>The Business of Software</em></a>, Cusumano, Free Press, 2004.</li>
<li><a href="http://www.amazon.com/Rational-Unified-Process-Made-Easy/dp/0321166094/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1226761427&amp;sr=1-1"><em>The Rational Process Made Easy: A Practitioner’s Guide to the RUP</em></a>, Kroll, Addison-Wesley, 2003.</li>
<li><a href="http://www.amazon.com/Rapid-Development-Taming-Software-Schedules/dp/1556159005/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1226761451&amp;sr=1-1"><em>Rapid Development</em></a>, McConnell, Microsoft Press, 1996.</li>
<li><a href="http://www.amazon.com/First-Software-Development-Brain-Friendly-Guides/dp/0596527357/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1226761478&amp;sr=1-1"><em>Head First Software Development</em></a>, Pilone &amp; Miles, O’Reilly, 2008.</li>
<li><a href="http://www.amazon.com/Eric-Business-Software-Experts-Voice/dp/1590596234/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1226761497&amp;sr=1-1"><em>Eric Sink on the Business of Software</em></a>, Sink, Apress, 2006.</li>
<li><a href="http://www.amazon.com/Micro-ISV-Vision-Reality-Bob-Walsh/dp/1590596013/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1226761517&amp;sr=1-1"><em>Micro-ISV – From Vision to Reality</em></a>, Walsh, Apress, 2006.</li>
</ul>
<br />Posted in Miscellaneous Tagged: Agile methods, Customer development, Customer discovery, Customers, Four Steps to the Epiphany, Inception, ISV, Product development, Rationa Unified Process, Requirements, RUP, Software development, Software development process, Software Entrepreneur, Software iterations, Software lifecycle, Software process, Use cases <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/spsexton.wordpress.com/441/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/spsexton.wordpress.com/441/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/spsexton.wordpress.com/441/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/spsexton.wordpress.com/441/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/spsexton.wordpress.com/441/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/spsexton.wordpress.com/441/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/spsexton.wordpress.com/441/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/spsexton.wordpress.com/441/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/spsexton.wordpress.com/441/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/spsexton.wordpress.com/441/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=441&subd=spsexton&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://stuff.seans.com/2008/11/15/a-recipe-for-green-field-software-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8922e4d5254d602ba3ed32dd073b5a4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">spsexton</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2008/11/rupmap.gif" medium="image">
			<media:title type="html">rupmap</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2008/11/rupphases.gif" medium="image">
			<media:title type="html">rupphases</media:title>
		</media:content>
	</item>
		<item>
		<title>Windows 7 Install Screenshots</title>
		<link>http://stuff.seans.com/2008/11/07/windows-7-install-screenshots/</link>
		<comments>http://stuff.seans.com/2008/11/07/windows-7-install-screenshots/#comments</comments>
		<pubDate>Fri, 07 Nov 2008 11:25:51 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[Windows 7]]></category>
		<category><![CDATA[Blackcomb]]></category>
		<category><![CDATA[Installation]]></category>
		<category><![CDATA[Microsoft Windows]]></category>
		<category><![CDATA[Microsoft Windows 7]]></category>
		<category><![CDATA[Vienna]]></category>
		<category><![CDATA[Windows 7 Screenshots]]></category>
		<category><![CDATA[Windows Screenshots]]></category>

		<guid isPermaLink="false">http://spsexton.wordpress.com/?p=404</guid>
		<description><![CDATA[I thought I’d do my part to flood the web with screenshots from the M3 preview of Windows 7 that was distributed at last week’s Professional Development Conference in LA.
The obvious place to start in Win 7 is with the installation process.  I’ll put up more posts later with screenshots of various bits and pieces [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=404&subd=spsexton&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>I thought I’d do my part to flood the web with screenshots from the M3 preview of Windows 7 that was distributed at last week’s Professional Development Conference in LA.</p>
<p>The obvious place to start in Win 7 is with the installation process.  I’ll put up more posts later with screenshots of various bits and pieces in Windows 7.  But this first post will just contain: <strong>every damn Windows 7 installation screen</strong>.</p>
<p>Ok, admittedly, looking through install screens is about as exciting as watching bacon fat congeal.  But really&#8212;there are people out there who will eat this stuff up.  So it’s for them that I’ve suffered an endless series of screen captures.  Enjoy.</p>
<p><strong>The Environment</strong></p>
<p>I installed my copy of Windows 7 to a VMWare virtual machine.  The only “gotcha” was that VMWare creates a SCSCI virtual hard drive by default&#8212;which Windows 7 failed to recognize.  Simple fix&#8212;just delete the default hard drive and create an IDE drive in VMWare.</p>
<p><strong>The Screens</strong></p>
<p>Ok, here we go.</p>
<p>You just get shivers as you start to install a new Microsoft OS for the first time, don’t you?</p>
<p><a href="http://spsexton.files.wordpress.com/2008/11/install-05.jpg"><img class="alignnone size-full wp-image-405" title="install-05" src="http://spsexton.files.wordpress.com/2008/11/install-05.jpg?w=1014&#038;h=759" alt="install-05" width="1014" height="759" /></a></p>
<p>Then we switch from a DOS-looking progress bar to a cute Windows-looking progress bar:</p>
<p><a href="http://spsexton.files.wordpress.com/2008/11/install-1.jpg"><img class="alignnone size-full wp-image-407" title="install-1" src="http://spsexton.files.wordpress.com/2008/11/install-1.jpg?w=647&#038;h=477" alt="install-1" width="647" height="477" /></a></p>
<p>Next we get the first Windows 7 install screen.  This is the spot to insert the angelic music.</p>
<p><a href="http://spsexton.files.wordpress.com/2008/11/install-2.jpg"><img class="alignnone size-full wp-image-408" title="install-2" src="http://spsexton.files.wordpress.com/2008/11/install-2.jpg?w=796&#038;h=599" alt="install-2" width="796" height="599" /></a></p>
<p>After picking an install language, you get to the main install kick-off window:</p>
<p><a href="http://spsexton.files.wordpress.com/2008/11/install-3.jpg"><img class="alignnone size-full wp-image-409" title="install-3" src="http://spsexton.files.wordpress.com/2008/11/install-3.jpg?w=799&#038;h=600" alt="install-3" width="799" height="600" /></a></p>
<p>I once met a guy who actually read these EULAs.  Can you believe it?</p>
<p><a href="http://spsexton.files.wordpress.com/2008/11/install-4.jpg"><img class="alignnone size-full wp-image-410" title="install-4" src="http://spsexton.files.wordpress.com/2008/11/install-4.jpg?w=799&#038;h=596" alt="install-4" width="799" height="596" /></a></p>
<p>This next dialog is just as confusing in Windows 7 as it was in Vista.</p>
<p><a href="http://spsexton.files.wordpress.com/2008/11/install-5.jpg"><img class="alignnone size-full wp-image-411" title="install-5" src="http://spsexton.files.wordpress.com/2008/11/install-5.jpg?w=801&#038;h=598" alt="install-5" width="801" height="598" /></a></p>
<p>In my first try, I went with the Upgrade option, which only got me this next confusing empty dialog.  Nice.</p>
<p><a href="http://spsexton.files.wordpress.com/2008/11/install-6.jpg"><img class="alignnone size-full wp-image-412" title="install-6" src="http://spsexton.files.wordpress.com/2008/11/install-6.jpg?w=800&#038;h=600" alt="install-6" width="800" height="600" /></a></p>
<p>Restarting everything and instead choosing Custom gets us where we want to go:</p>
<p><a href="http://spsexton.files.wordpress.com/2008/11/install-7.jpg"><img class="alignnone size-full wp-image-413" title="install-7" src="http://spsexton.files.wordpress.com/2008/11/install-7.jpg?w=803&#038;h=596" alt="install-7" width="803" height="596" /></a></p>
<p>If you click on the link that reads “Drive options (advanced)”, you’ll see some options for managing hard disk partitions:</p>
<p><a href="http://spsexton.files.wordpress.com/2008/11/install-8.jpg"><img class="alignnone size-full wp-image-414" title="install-8" src="http://spsexton.files.wordpress.com/2008/11/install-8.jpg?w=808&#038;h=602" alt="install-8" width="808" height="602" /></a></p>
<p>Finally, the actual installation begins.</p>
<p><a href="http://spsexton.files.wordpress.com/2008/11/install-9.jpg"><img class="alignnone size-full wp-image-415" title="install-9" src="http://spsexton.files.wordpress.com/2008/11/install-9.jpg?w=803&#038;h=601" alt="install-9" width="803" height="601" /></a></p>
<p>At some point, near the end of the installation, Windows boots for the first time.  It lives!</p>
<p><a href="http://spsexton.files.wordpress.com/2008/11/install-10.jpg"><img class="alignnone size-full wp-image-416" title="install-10" src="http://spsexton.files.wordpress.com/2008/11/install-10.jpg?w=1021&#038;h=768" alt="install-10" width="1021" height="768" /></a></p>
<p>This was an interesting detail during the boot process:</p>
<p><a href="http://spsexton.files.wordpress.com/2008/11/install-11.jpg"><img class="alignnone size-full wp-image-417" title="install-11" src="http://spsexton.files.wordpress.com/2008/11/install-11.jpg?w=1021&#038;h=765" alt="install-11" width="1021" height="765" /></a></p>
<p>All of the services apparently start firing up, as the boot process continues.  (Hallelujah)!</p>
<p><a href="http://spsexton.files.wordpress.com/2008/11/install-12.jpg"><img class="alignnone size-full wp-image-418" title="install-12" src="http://spsexton.files.wordpress.com/2008/11/install-12.jpg?w=1020&#038;h=766" alt="install-12" width="1020" height="766" /></a></p>
<p>And for some reason, we’re allowed to go back and look at this status dialog one more time.</p>
<p><a href="http://spsexton.files.wordpress.com/2008/11/install-13.jpg"><img class="alignnone size-full wp-image-419" title="install-13" src="http://spsexton.files.wordpress.com/2008/11/install-13.jpg?w=1022&#038;h=767" alt="install-13" width="1022" height="767" /></a></p>
<p>And then back to the main boot screen.  (Are you starting to feel as if you were really there)?</p>
<p><a href="http://spsexton.files.wordpress.com/2008/11/install-14.jpg"><img class="alignnone size-full wp-image-420" title="install-14" src="http://spsexton.files.wordpress.com/2008/11/install-14.jpg?w=1024&#038;h=768" alt="install-14" width="1024" height="768" /></a></p>
<p>Oh, this is a nice little touch.  No screen flickers or anything, but nice to know that it’s “checking” my video performance.  (Whatever that means).</p>
<p><a href="http://spsexton.files.wordpress.com/2008/11/install-15.jpg"><img class="alignnone size-full wp-image-421" title="install-15" src="http://spsexton.files.wordpress.com/2008/11/install-15.jpg?w=1022&#038;h=765" alt="install-15" width="1022" height="765" /></a></p>
<p>Now Windows is more or less running and we start doing some of the final configuration stuff.  First, we specify a default username.  This will be the Administrator user account.  Seeing a PC name of &#8220;PC&#8221; also makes me think of John Hodgman and the Mac switcher ads.</p>
<p><a href="http://spsexton.files.wordpress.com/2008/11/install-16.jpg"><img class="alignnone size-full wp-image-422" title="install-16" src="http://spsexton.files.wordpress.com/2008/11/install-16.jpg?w=1023&#038;h=767" alt="install-16" width="1023" height="767" /></a></p>
<p>And I enter my password:</p>
<p><a href="http://spsexton.files.wordpress.com/2008/11/install-17.jpg"><img class="alignnone size-full wp-image-423" title="install-17" src="http://spsexton.files.wordpress.com/2008/11/install-17.jpg?w=1023&#038;h=766" alt="install-17" width="1023" height="766" /></a></p>
<p>And (of course) the product activation key.  Wouldn’t it be cool if every key had a barcode and I could use a barcode scanner at this point?  (My key did <strong>not</strong> have a barcode).</p>
<p><a href="http://spsexton.files.wordpress.com/2008/11/install-18.jpg"><img class="alignnone size-full wp-image-424" title="install-18" src="http://spsexton.files.wordpress.com/2008/11/install-18.jpg?w=1023&#038;h=767" alt="install-18" width="1023" height="767" /></a></p>
<p>I also get to set my time and time zone.</p>
<p><a href="http://spsexton.files.wordpress.com/2008/11/install-19.jpg"><img class="alignnone size-full wp-image-425" title="install-19" src="http://spsexton.files.wordpress.com/2008/11/install-19.jpg?w=1023&#038;h=766" alt="install-19" width="1023" height="766" /></a></p>
<p>This is an interesting one.  Right out of the gate, I’m asked to specify whether my network is public or not.  Like Vista, this dictates some default security settings.</p>
<p><a href="http://spsexton.files.wordpress.com/2008/11/install-20.jpg"><img class="alignnone size-full wp-image-426" title="install-20" src="http://spsexton.files.wordpress.com/2008/11/install-20.jpg?w=1024&#038;h=766" alt="install-20" width="1024" height="766" /></a></p>
<p>I picked Home network and Windows 7 did some remaining network configuration work.</p>
<p><a href="http://spsexton.files.wordpress.com/2008/11/install-21.jpg"><img class="alignnone size-full wp-image-427" title="install-21" src="http://spsexton.files.wordpress.com/2008/11/install-21.jpg?w=1020&#038;h=766" alt="install-21" width="1020" height="766" /></a></p>
<p>Ok, here’s one of the first really new things to show up.  A “homegroup” is basically a relabeled “workgroup”&#8212;something short of a domain.  I’m wondering if I’d chosen Work location in the earlier screen, if I’d now be joining a domain.</p>
<p><a href="http://spsexton.files.wordpress.com/2008/11/install-22.jpg"><img class="alignnone size-full wp-image-428" title="install-22" src="http://spsexton.files.wordpress.com/2008/11/install-22.jpg?w=1023&#038;h=765" alt="install-22" width="1023" height="765" /></a></p>
<p>Finally, we are “welcomed” to Windows 7.</p>
<p><a href="http://spsexton.files.wordpress.com/2008/11/install-23.jpg"><img class="alignnone size-full wp-image-429" title="install-23" src="http://spsexton.files.wordpress.com/2008/11/install-23.jpg?w=1023&#038;h=767" alt="install-23" width="1023" height="767" /></a></p>
<p>We’re so close, I can taste it.</p>
<p><a href="http://spsexton.files.wordpress.com/2008/11/install-24.jpg"><img class="alignnone size-full wp-image-430" title="install-24" src="http://spsexton.files.wordpress.com/2008/11/install-24.jpg?w=1024&#038;h=766" alt="install-24" width="1024" height="766" /></a></p>
<p>And voila!  The Windows 7 installation is complete and we’re sitting at the desktop screen.  Note that I don’t have that cool new taskbar in the build that was handed out at PDC.  More on that next time&#8212;the new taskbar is actually in the build and Rafael Rivera has found a hack to unlock it.</p>
<p><a href="http://spsexton.files.wordpress.com/2008/11/install-25.jpg"><img class="alignnone size-full wp-image-431" title="install-25" src="http://spsexton.files.wordpress.com/2008/11/install-25.jpg?w=1024&#038;h=765" alt="install-25" width="1024" height="765" /></a></p>
<br />Posted in Windows 7 Tagged: Blackcomb, Installation, Microsoft Windows, Microsoft Windows 7, Vienna, Windows 7, Windows 7 Screenshots, Windows Screenshots <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/spsexton.wordpress.com/404/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/spsexton.wordpress.com/404/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/spsexton.wordpress.com/404/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/spsexton.wordpress.com/404/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/spsexton.wordpress.com/404/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/spsexton.wordpress.com/404/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/spsexton.wordpress.com/404/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/spsexton.wordpress.com/404/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/spsexton.wordpress.com/404/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/spsexton.wordpress.com/404/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=404&subd=spsexton&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://stuff.seans.com/2008/11/07/windows-7-install-screenshots/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8922e4d5254d602ba3ed32dd073b5a4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">spsexton</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2008/11/install-05.jpg" medium="image">
			<media:title type="html">install-05</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2008/11/install-1.jpg" medium="image">
			<media:title type="html">install-1</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2008/11/install-2.jpg" medium="image">
			<media:title type="html">install-2</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2008/11/install-3.jpg" medium="image">
			<media:title type="html">install-3</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2008/11/install-4.jpg" medium="image">
			<media:title type="html">install-4</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2008/11/install-5.jpg" medium="image">
			<media:title type="html">install-5</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2008/11/install-6.jpg" medium="image">
			<media:title type="html">install-6</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2008/11/install-7.jpg" medium="image">
			<media:title type="html">install-7</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2008/11/install-8.jpg" medium="image">
			<media:title type="html">install-8</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2008/11/install-9.jpg" medium="image">
			<media:title type="html">install-9</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2008/11/install-10.jpg" medium="image">
			<media:title type="html">install-10</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2008/11/install-11.jpg" medium="image">
			<media:title type="html">install-11</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2008/11/install-12.jpg" medium="image">
			<media:title type="html">install-12</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2008/11/install-13.jpg" medium="image">
			<media:title type="html">install-13</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2008/11/install-14.jpg" medium="image">
			<media:title type="html">install-14</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2008/11/install-15.jpg" medium="image">
			<media:title type="html">install-15</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2008/11/install-16.jpg" medium="image">
			<media:title type="html">install-16</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2008/11/install-17.jpg" medium="image">
			<media:title type="html">install-17</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2008/11/install-18.jpg" medium="image">
			<media:title type="html">install-18</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2008/11/install-19.jpg" medium="image">
			<media:title type="html">install-19</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2008/11/install-20.jpg" medium="image">
			<media:title type="html">install-20</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2008/11/install-21.jpg" medium="image">
			<media:title type="html">install-21</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2008/11/install-22.jpg" medium="image">
			<media:title type="html">install-22</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2008/11/install-23.jpg" medium="image">
			<media:title type="html">install-23</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2008/11/install-24.jpg" medium="image">
			<media:title type="html">install-24</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2008/11/install-25.jpg" medium="image">
			<media:title type="html">install-25</media:title>
		</media:content>
	</item>
		<item>
		<title>Session – WPF: Extensible BitmapEffects, Pixel Shaders, and WPF Graphics Futures</title>
		<link>http://stuff.seans.com/2008/11/06/session-%e2%80%93-wpf-extensible-bitmapeffects-pixel-shaders-and-wpf-graphics-futures/</link>
		<comments>http://stuff.seans.com/2008/11/06/session-%e2%80%93-wpf-extensible-bitmapeffects-pixel-shaders-and-wpf-graphics-futures/#comments</comments>
		<pubDate>Thu, 06 Nov 2008 18:11:32 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[PDC 2008]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[Direct3D]]></category>
		<category><![CDATA[HLSL]]></category>
		<category><![CDATA[Microsoft PDC]]></category>
		<category><![CDATA[pdc08]]></category>
		<category><![CDATA[pdc2008]]></category>
		<category><![CDATA[Pixel Shaders]]></category>

		<guid isPermaLink="false">http://spsexton.wordpress.com/?p=398</guid>
		<description><![CDATA[PDC 2008, Day #4, Session #4, 1 hr 15 mins
David Teitlebaum
Program Manager
WPF Team
My final session at PDC 2008 was a talk about the improvements in WPF graphics that are available in .NET Framework 3.5 SP1.  David also touched briefly some possible future features (i.e. that would appear in .NET Framework 4.0).
David’s main topic was to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=398&subd=spsexton&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p><em>PDC 2008, Day #4, Session #4, 1 hr 15 mins</em></p>
<p><em>David Teitlebaum<br />
Program Manager<br />
WPF Team</em></p>
<p>My final session at PDC 2008 was a talk about the improvements in WPF graphics that are available in .NET Framework 3.5 SP1.  David also touched briefly some possible future features (i.e. that would appear in .NET Framework 4.0).</p>
<p>David’s main topic was to walk through the details of the new Shader Effects model, which replaces the old Bitmap Effects feature.</p>
<p><strong>What are Bitmap Effects?</strong></p>
<p>These are effects that are applied to an individual UI element, like a button, to create some desired visual effect.  This includes things like drop shadow, bevels and blur effects.</p>
<p><strong>BitmapEffect</strong></p>
<p>The BitmapEffect object was introduced in Framework 3.0 (the first WPF release).  But there were some problems with it, that led to now replacing it with Shader Effects in 3.5SP1.</p>
<p>Problems with BitmapEffect:</p>
<ul>
<li>They were rendered in software</li>
<li>Blur operations were very slow</li>
<li>There were various limitations, including no ClearType support, no anisotripic filtering, etc.</li>
</ul>
<p><strong>New Shader Effects</strong></p>
<p>Basic characteristics in the new Shader Effects include:</p>
<ul>
<li>GPU accelerated</li>
<li>Have implemented hardware acceleration of the most popular bitmap effects
<ul>
<li>But did <strong>not </strong>implement outer glow</li>
</ul>
</li>
<li>Can author custom hardware-accelerated bitmap effects using HLSL</li>
<li>There is a software-only fallback pipeline that is actually faster than the old Bitmap Effects</li>
<li>New Shader Effects run on most video cards
<ul>
<li>Require PixelShader 2.0, which is about 5 years old</li>
</ul>
</li>
</ul>
<p><strong>How Do You Do Shader Effects?</strong></p>
<p>Here’s an outline of how you use the new Shader Effect model:</p>
<ul>
<li>Derive a custom class from the new <strong>ShaderEffect </strong>class (which derives from <strong>Effect</strong>)</li>
<li>You write your actual pixel shader code in HLSL, which is used for doing custom hardware-accelerated stuff using Direct3D
<ul>
<li>Language is C-like</li>
<li>Compiled to byte-code, consumed by video driver, runs on GPU</li>
</ul>
</li>
<li>Some more details about HLSL, as used in WPF
<ul>
<li>DirectX 10 supports HLSL 4.0</li>
<li>WPF currently only supports Pixelshader 2.0</li>
</ul>
</li>
</ul>
<p>So what do pixel shaders really do?  They basically take in a texture (bitmap) as input, do some processing on each point, and return a revised texture as an output.</p>
<p>Basically, you have a <strong>main </strong>function that accepts the coordinates of the current single pixel to be mapped.  Your code then accesses the original input texture through a register, so it just uses the input parameter (X/Y coordinate) to index into the source texture.  It then does some processing on the pixel in question and returns a color value.  This resultant color value just represents&#8212;the resulting RGB color at the specified coordinate.</p>
<p>The final step is to create, in managed code, a class that derives from <strong>ShaderEffect </strong>and hook it up to the pixel shader code (e.g. xyz.ps file) that you wrote.  You can then apply your shader to any WPF UIElement using XAML.  (By setting the <strong>Effect </strong>property).</p>
<p><strong>Direct3D Interop</strong></p>
<p>David’s next topic was to talk a bit about interop’ing with Direct3D.  This just means that your WPF application can easily host Direct3D content by using a new class called <strong>D3DImage.</strong></p>
<p>This was pretty cool.  David demoed displaying a Direct3D wireframe in the background (WPF 3D subsystem can’t do wireframes), with WPF GUI elements in the foreground, overlaying the background image.</p>
<p>The basic idea is that you create a Direct3D device in unmanaged code and then hook it to a new instance of a WPF D3DImage element, which you include in your visual hierarchy.</p>
<p><strong>WPF Futures</strong></p>
<p>Finally, David touched very briefly on some possible future features.  These are things that may show up in WPF 4.0 (.NET Framework 4.0), or possibly beyond that.</p>
<p>Some of the features likely included in WPF 4.0 include:</p>
<ul>
<li>Increased graphical richness  (e.g. Pixelshader 3.0)</li>
<li>Offloading more work to the GPU</li>
<li>Better rendering quality
<ul>
<li>Integrate DirectWrite for text clarity</li>
<li>Layout rounding</li>
</ul>
</li>
</ul>
<p>And some of the possible post-4.0 features include:</p>
<ul>
<li>Better exploitation of hardware</li>
<li>Vertex shaders</li>
<li>Shader groups</li>
<li>Shaders in WPF 3D</li>
<li>3D improvements</li>
<li>Better media extensibility</li>
</ul>
<p>References</p>
<p>You can get at David’s PDC08 slide deck for this talk here: <a href="http://mschnlnine.vo.llnwd.net/d1/pdc08/PPTX/PC07.pptx">http://mschnlnine.vo.llnwd.net/d1/pdc08/PPTX/PC07.pptx</a></p>
<p>And you can find full video from the session at:  <a href="http://mschnlnine.vo.llnwd.net/d1/pdc08/WMV-HQ/PC07.wmv">http://mschnlnine.vo.llnwd.net/d1/pdc08/WMV-HQ/PC07.wmv</a></p>
<br />Posted in PDC 2008, WPF Tagged: Direct3D, HLSL, Microsoft PDC, PDC 2008, pdc08, pdc2008, Pixel Shaders, WPF <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/spsexton.wordpress.com/398/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/spsexton.wordpress.com/398/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/spsexton.wordpress.com/398/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/spsexton.wordpress.com/398/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/spsexton.wordpress.com/398/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/spsexton.wordpress.com/398/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/spsexton.wordpress.com/398/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/spsexton.wordpress.com/398/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/spsexton.wordpress.com/398/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/spsexton.wordpress.com/398/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=398&subd=spsexton&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://stuff.seans.com/2008/11/06/session-%e2%80%93-wpf-extensible-bitmapeffects-pixel-shaders-and-wpf-graphics-futures/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://mschnlnine.vo.llnwd.net/d1/pdc08/WMV-HQ/PC07.wmv" length="330737519" type="video/x-ms-wmv" />
	
		<media:content url="http://0.gravatar.com/avatar/8922e4d5254d602ba3ed32dd073b5a4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">spsexton</media:title>
		</media:content>
	</item>
		<item>
		<title>Session – Windows 7: Unlocking the GPU with Direct3D</title>
		<link>http://stuff.seans.com/2008/11/01/session-%e2%80%93-windows-7-unlocking-the-gpu-with-direct3d/</link>
		<comments>http://stuff.seans.com/2008/11/01/session-%e2%80%93-windows-7-unlocking-the-gpu-with-direct3d/#comments</comments>
		<pubDate>Sat, 01 Nov 2008 12:48:28 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[PDC 2008]]></category>
		<category><![CDATA[Direct3D]]></category>
		<category><![CDATA[DirectX]]></category>
		<category><![CDATA[DirectX 10]]></category>
		<category><![CDATA[DirectX 11]]></category>
		<category><![CDATA[DirectX 9]]></category>
		<category><![CDATA[Microsoft PDC]]></category>
		<category><![CDATA[pdc08]]></category>
		<category><![CDATA[pdc2008]]></category>
		<category><![CDATA[Windows 7]]></category>
		<category><![CDATA[Windows Vista]]></category>

		<guid isPermaLink="false">http://spsexton.wordpress.com/?p=394</guid>
		<description><![CDATA[PDC 2008, Day #4, Session #3, 1 hr 15 mins
Allison Klein
I jumped off the Azure track (starting to be a bit repetitive) and next went to a session focused on Direct3D.
Despite the title, this session really had nothing to do with Windows 7, other than the fact that it talked a  lot about Direct3D 11, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=394&subd=spsexton&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p><em>PDC 2008, Day #4, Session #3, 1 hr 15 mins</em></p>
<p><em>Allison Klein</em></p>
<p>I jumped off the Azure track (starting to be a bit repetitive) and next went to a session focused on Direct3D.</p>
<p>Despite the title, this session really had nothing to do with Windows 7, other than the fact that it talked a  lot about Direct3D 11, which will be included in Windows 7 and available for Windows Vista.</p>
<p><strong>Direct3D 10</strong></p>
<p>Direct3D 10 is the currently shipping version, and supported by most (all?) modern video cards, as well as integrated graphics chips.  I’m not entirely sure, but I think that Direct3D 10 shipped out-of-the-box with Windows Vista.  It is also available for Windows XP.</p>
<p>Allison spent about half of the talk going through things that are different in Direct3D 10, as compared with Direct3D 9.</p>
<p>I’m not inclined to rehash all of the details.  (I’ll include a link to Allison’s slide deck when it is available).</p>
<p>The main takeaway was that it’s very much worth programming to the v10 API, as opposed to the v9 API.  Some of the reasons for this include:</p>
<ul>
<li>Much more consistent behavior, across devices</li>
<li>Cleaner API</li>
<li>Elimination of large CAPS (device capability) matrix, for a more consistent experience across devices</li>
<li>Built-in driver that allows D3D10 to talk to D3D9 hardware</li>
<li>Addition of WARP 10 software rasterizer, to support devices that don’t support WDDM directly.  This is actually quite a bit faster than earlier software-only implementations</li>
</ul>
<p><strong>Direct3D 11</strong></p>
<p>In the second half of her talk, Allison talked about the advances coming in Direct3D 11.  She mentioned that D3D11 will ship with Windows 7 and also be available for Windows Vista.</p>
<p>Again, the details are probably more appropriate for a game developer.  (See the slide deck).  But the high level points are:</p>
<ul>
<li>Direct3D 11 is a strict superset of 10&#8212;there are no changes to existing 10 features</li>
<li>Better support for character authoring, for denser meshes and more detailed characters</li>
<li>Addition of tessellation to the rendering pipeline, for better performance and quality</li>
<li>Much more scalable multi-threading support.
<ul>
<li>Much more flexibility in what can be distributed across threads</li>
</ul>
</li>
<li>Dynamically linking in custom shaders</li>
<li>Introduction of object-oriented features (interfaces/classes) to HLSL</li>
<li>New block compression</li>
<li>Direct3D11 will be available in the Nov 2008 SDK</li>
</ul>
<p><strong>Futures</strong></p>
<p>Finally, Allison touched briefly on some future directions that the Direct3D is thinking about.</p>
<p>The main topic that she talked about here was in potentially using the GPU to perform highly parallel general purpose compute intensive tasks.  The developer would use HLSL to write a “compute shader”, which would then get sent to the GPU to do the work.  As an example, she talked about using this mechanism for post-processing of an image.</p>
<br />Posted in PDC 2008 Tagged: Direct3D, DirectX, DirectX 10, DirectX 11, DirectX 9, Microsoft PDC, PDC 2008, pdc08, pdc2008, Windows 7, Windows Vista <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/spsexton.wordpress.com/394/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/spsexton.wordpress.com/394/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/spsexton.wordpress.com/394/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/spsexton.wordpress.com/394/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/spsexton.wordpress.com/394/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/spsexton.wordpress.com/394/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/spsexton.wordpress.com/394/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/spsexton.wordpress.com/394/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/spsexton.wordpress.com/394/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/spsexton.wordpress.com/394/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=394&subd=spsexton&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://stuff.seans.com/2008/11/01/session-%e2%80%93-windows-7-unlocking-the-gpu-with-direct3d/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8922e4d5254d602ba3ed32dd073b5a4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">spsexton</media:title>
		</media:content>
	</item>
		<item>
		<title>Session – Services Symposium: Enterprise Grade Cloud Applications</title>
		<link>http://stuff.seans.com/2008/11/01/session-%e2%80%93-services-symposium-enterprise-grade-cloud-applications/</link>
		<comments>http://stuff.seans.com/2008/11/01/session-%e2%80%93-services-symposium-enterprise-grade-cloud-applications/#comments</comments>
		<pubDate>Sat, 01 Nov 2008 12:41:15 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[Azure]]></category>
		<category><![CDATA[PDC 2008]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[Cloud service]]></category>
		<category><![CDATA[Microsoft PDC]]></category>
		<category><![CDATA[pdc08]]></category>
		<category><![CDATA[pdc2008]]></category>
		<category><![CDATA[Software+Services]]></category>
		<category><![CDATA[Windows Azure]]></category>

		<guid isPermaLink="false">http://spsexton.wordpress.com/?p=387</guid>
		<description><![CDATA[PDC 2008, Day #4, Session #2, 1 hr 30 mins
Eugenio Pace
My second session on Thursday was a continuation of the cloud services symposium from the first session.  There was a third part to the symposium, which I did not attend.
The presenter for this session, Eugenio, was not nearly as good a presenter as Gianpaolo from [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=387&subd=spsexton&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p><em>PDC 2008, Day #4, Session #2, 1 hr 30 mins</em></p>
<p><em>Eugenio Pace</em></p>
<p>My second session on Thursday was a continuation of the cloud services symposium from the first session.  There was a third part to the symposium, which I did not attend.</p>
<p>The presenter for this session, Eugenio, was not nearly as good a presenter as Gianpaolo from the previous session.  So it was a bit less dynamic, and harder to stay interested.</p>
<p>The session basically consisted of a single demo, which illustrated some of the possible solutions to the Identity, Monitoring, and Integration challenges mentioned in the previous session.</p>
<p><strong>Identity</strong></p>
<p>Eugenio pointed out the problems involved in authentication/authorization.  You don’t want to require the enterprise users to have a unique username/password combination for each service that they use.  And pushing out the enterprise (e.g. Active Directory) credential information to the third party service is not secure and creates a management nightmare.</p>
<p>The proposed solution is to use a central (federated) identity system to do the authentication and authorization.  This is the purpose of the Azure Access Control service.</p>
<p><strong>Management</strong></p>
<p>The next part of the demo showed how Azure supports remote management, on the part of IT staff at an individual customer site, of their instance of your application.  The basic things that you can do remotely include:</p>
<ul>
<li>Active real-time monitoring of application health</li>
<li>Trigger administrative actions, based on the current state</li>
</ul>
<p>The end result (and goal) is that you have the same scope of control over your application as you’d have if it were on premises.</p>
<p><strong>Application Integration</strong></p>
<p>Finally, Eugenio did some demos related to “process integration”&#8212;allowing your service to be called from a legacy service or system.  This demo actually woke everyone up, because Eugenio brought an archaic green-screen AS400 system up in an emulator and proceeded to have it talk to his Azure service.</p>
<p><strong>Takeaways</strong></p>
<p>The conclusions were recommendations to both IT organizations and ISVs:</p>
<ul>
<li>Enterprise IT organization
<ul>
<li>Don’t settle for sub-optimal solutions</li>
<li>Tap into the benefits of Software+Services</li>
</ul>
</li>
<li>ISV
<ul>
<li>Don’t give them an excuse to reject your solution</li>
<li>Make use of better tools, frameworks, and services</li>
</ul>
</li>
</ul>
<br />Posted in Azure, PDC 2008 Tagged: Azure, cloud, Cloud service, Microsoft PDC, PDC 2008, pdc08, pdc2008, Software+Services, Windows Azure <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/spsexton.wordpress.com/387/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/spsexton.wordpress.com/387/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/spsexton.wordpress.com/387/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/spsexton.wordpress.com/387/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/spsexton.wordpress.com/387/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/spsexton.wordpress.com/387/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/spsexton.wordpress.com/387/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/spsexton.wordpress.com/387/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/spsexton.wordpress.com/387/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/spsexton.wordpress.com/387/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=387&subd=spsexton&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://stuff.seans.com/2008/11/01/session-%e2%80%93-services-symposium-enterprise-grade-cloud-applications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8922e4d5254d602ba3ed32dd073b5a4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">spsexton</media:title>
		</media:content>
	</item>
		<item>
		<title>Session – Services Symposium: Expanding Applications to the Cloud</title>
		<link>http://stuff.seans.com/2008/11/01/session-%e2%80%93-services-symposium-expanding-applications-to-the-cloud/</link>
		<comments>http://stuff.seans.com/2008/11/01/session-%e2%80%93-services-symposium-expanding-applications-to-the-cloud/#comments</comments>
		<pubDate>Sat, 01 Nov 2008 12:30:56 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[Azure]]></category>
		<category><![CDATA[PDC 2008]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[Cloud service]]></category>
		<category><![CDATA[Microsoft PDC]]></category>
		<category><![CDATA[pdc08]]></category>
		<category><![CDATA[pdc2008]]></category>
		<category><![CDATA[Software+Services]]></category>
		<category><![CDATA[Windows Azure]]></category>

		<guid isPermaLink="false">http://spsexton.wordpress.com/?p=381</guid>
		<description><![CDATA[PDC 2008, Day #4, Session #1, 1 hr 30 mins
Gianpaolo Carraro
As the last day of PDC starts, I’m down to four sessions to go.  I’ll continue doing a quick blog post on each session, where I share my notes, as well as some miscellaneous thoughts.
The Idea of a Symposium
Gianpaolo started out by explaining that they [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=381&subd=spsexton&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p><em>PDC 2008, Day #4, Session #1, 1 hr 30 mins</em></p>
<p><em>Gianpaolo Carraro</em></p>
<p>As the last day of PDC starts, I’m down to four sessions to go.  I’ll continue doing a quick blog post on each session, where I share my notes, as well as some miscellaneous thoughts.</p>
<p><strong>The Idea of a Symposium</strong></p>
<p>Gianpaolo started out by explaining that they were finishing PDC by doing a pair of symposiums, each a series of three different sessions.  One symposium focused on parallel computing and the other on cloud-based services.  This particular session was the first in the set of three that addressed cloud services.</p>
<p>The idea of a symposium, explained Gianpaolo, is to take all of the various individual technologies and try to sort of fit the puzzle pieces together, providing a basic context.</p>
<p>The goal was also present some of the experience that Microsoft has gained in early usage of the Azure platform over the past 6-12 months.  He said that he himself has spent the last 6-12 months using the new Services, so he had some thoughts to share.</p>
<p>This first session in the symposium focused on taking existing business applications and expanding them to “the cloud”.  When should an ISV do this?  Why?  How?</p>
<p><strong>Build vs. Buy and On-Premises vs. Cloud</strong></p>
<p>Gianpaolo presented a nice matrix showing the two basic independent decisions that you face when looking for software to fulfill a need.</p>
<ul>
<li><strong>Build vs. Buy </strong>– Can I buy a packaged off-the-shelf product that does what I need?  Or are my needs specialized enough that I need to build my own stuff?</li>
<li><strong>On-Premises vs. Cloud </strong>– Should I run this software on my own servers?  Or host everything up in “the cloud”?</li>
</ul>
<p>There are, of course, tradeoffs on both sides of each decision.  These have been discussed ad infinitum elsewhere, but the basic tradeoffs are:</p>
<ul>
<li><strong>Build vs. Buy </strong>– Features vs. Cost</li>
<li><strong>On-Premises vs. Cloud </strong>– Control vs. Economy of Scale</li>
</ul>
<p>Here’s the graph that Gianpaolo presented, showing six different classes of software, based on how you answer these questions.  Note that on the On-Premises vs. Cloud scale, there is a middle column that represents taking applications that you essentially control and moving them to co-located servers.</p>
<p><a href="http://spsexton.files.wordpress.com/2008/11/1-1-matrix.jpg"><img class="alignnone size-full wp-image-383" title="1-1-matrix" src="http://spsexton.files.wordpress.com/2008/11/1-1-matrix.jpg?w=778&#038;h=330" alt="" width="778" height="330" /></a></p>
<p>This is a nice way to look at things.  It shows that, for each individual software function, it can live anywhere on this graph.  In fact, Gianpaolo’s main point is that you can deploy different pieces of your solution at different spots on the graph.</p>
<p>So the idea is that while you might start off on-premises, you can push your solution out to either a co-located hosting server or to the cloud in general.  This is true of both packaged apps as well as custom-developed software.</p>
<p><strong>Challenges</strong></p>
<p>The main challenge in moving things out of the enterprise is dealing with the various issues that show up now when your data needs to cross the corporate/internet boundary.</p>
<p>There are several separate types of challenges that show up:</p>
<ul>
<li><strong>Identify challenges </strong>– as you move across various boundaries, how does the software know who you are and what you’re allowed to access?</li>
<li><strong>Monitoring and Management challenges </strong>– how do you know if your application is healthy, if it’s running out in the cloud?</li>
<li><strong>Application Integration challenge </strong>– how do various applications communicate with each other, across the various boundaries?</li>
</ul>
<p><strong>Solutions to the Identity Problem</strong></p>
<p>Gianpaolo proposed the following possible solutions to this problem of identity moving across the different boundaries:</p>
<ul>
<li>Federated ID</li>
<li>Claim-based access control</li>
<li>Geneva identity system, or Cardspace</li>
</ul>
<p>The basic idea was that Microsoft has various assets that can help with this problem.</p>
<p><strong>Solutions to the Monitoring and Management Problem</strong></p>
<p>Next, the possible solutions to the monitoring and management problem included:</p>
<ul>
<li>Programmatic access to a “Health” model</li>
<li>Various management APIs</li>
<li>Firewall-friendly protocols</li>
<li>Powershell support</li>
</ul>
<p>Solutions to the Application Integration Problem</p>
<p>Finally, some of the proposed solutions to the application integration problem included:</p>
<ul>
<li>ServiceBus</li>
<li>Oslo</li>
<li>Azure storage</li>
<li>Sync framework</li>
</ul>
<p><strong>The ISV Perspective</strong></p>
<p>The above issues were all from an IT perspective.  But you can look at the same landscape from the perspective of an independent software vendor, trying to sell solutions to the enterprise.</p>
<p>To start with, there are two fundamentally different ways that the ISV can make use of “the cloud”:</p>
<ul>
<li>As a service mechanism, for delivering your services via the cloud
<ul>
<li>You make your application’s basic services available over the internet, no matter where it is hosted</li>
<li>This is mostly a customer choice, based on where they want to deploy</li>
</ul>
</li>
<li>As a platform
<ul>
<li>Treating the cloud as a platform, where your app runs</li>
<li>Benefits are the economy of scale</li>
<li>Mostly an ISV choice</li>
<li>E.g. you could use Azure without your customer even being aware of it</li>
</ul>
</li>
</ul>
<p>When delivering your software as a service, you need to consider things like:</p>
<ul>
<li>Is the feature set available via cloud sufficient?</li>
<li>Firewall issues</li>
<li>Need a management interface for your customers</li>
</ul>
<p><strong>Some Patterns</strong></p>
<p>Gianpaolo presented some miscellaneous design considerations and patterns that might apply to applications deployed in the cloud.</p>
<p><span style="text-decoration:underline;">Cloudbursting</span></p>
<ul>
<li>Design for average load, handling the ‘peak’ as an exception</li>
<li>I.e. only go to the cloud for scalability when you need to</li>
</ul>
<p><span style="text-decoration:underline;">Worker / Queue / Blob Pattern</span></p>
<p>Let’s say that you have a task like encoding and publishing of video.  You can push the data out to the cloud, where the encoding work happens.  (Raw data places in a “blob” in cloud storage).  You then add an entry to a queue, indicating that there is work to be done, and a separate worker process eventually does the encoding work.</p>
<p>This is a nice pattern for supporting flexible scaling&#8212;both the queues and the worker processes could be scaled out separately.</p>
<p><span style="text-decoration:underline;">CAP: Pick 2 out of 3</span></p>
<ul>
<li>Consistency</li>
<li>Availability</li>
<li>Tolerance to network Partitioning</li>
</ul>
<p><span style="text-decoration:underline;">Eventual Consistency (ACID – BASE)</span></p>
<p>The idea here is that we are all used to the ACID characteristics listed below.  We need to guarantee that the data is consistent and correct&#8212;which means that performance likely will suffer.  As an example, we have a process submit data synchronously because we need to guarantee that the data gets to its destination.</p>
<p>But Gianpaolo talked about the idea of “eventual consistency”.  For most applications, while it’s important for your data to be correct and consistent, it’s not necessarily for it to be consistent <em>right now</em>.  This leads to a model that he referred to as BASE, with the characteristics listed below.</p>
<ul>
<li>ACID
<ul>
<li>Atomicity</li>
<li>Consistency</li>
<li>Isolation</li>
<li>Durability</li>
</ul>
</li>
<li>BASE
<ul>
<li>Basically Available</li>
<li>Soft state</li>
<li>Eventually consistent</li>
</ul>
</li>
</ul>
<p><strong>Fundamental Lesson</strong></p>
<p>Basically the main takeaway is:</p>
<ul>
<li>Put the software components in the place that makes the most sense, given their use</li>
</ul>
<br />Posted in Azure, PDC 2008 Tagged: Azure, cloud, Cloud service, Microsoft PDC, PDC 2008, pdc08, pdc2008, Software+Services, Windows Azure <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/spsexton.wordpress.com/381/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/spsexton.wordpress.com/381/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/spsexton.wordpress.com/381/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/spsexton.wordpress.com/381/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/spsexton.wordpress.com/381/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/spsexton.wordpress.com/381/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/spsexton.wordpress.com/381/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/spsexton.wordpress.com/381/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/spsexton.wordpress.com/381/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/spsexton.wordpress.com/381/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=381&subd=spsexton&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://stuff.seans.com/2008/11/01/session-%e2%80%93-services-symposium-expanding-applications-to-the-cloud/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8922e4d5254d602ba3ed32dd073b5a4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">spsexton</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2008/11/1-1-matrix.jpg" medium="image">
			<media:title type="html">1-1-matrix</media:title>
		</media:content>
	</item>
		<item>
		<title>Session – Building Mesh-Enabled Web Applications Using the Live Framework</title>
		<link>http://stuff.seans.com/2008/10/31/session-%e2%80%93-building-mesh-enabled-web-applications-using-the-live-framework/</link>
		<comments>http://stuff.seans.com/2008/10/31/session-%e2%80%93-building-mesh-enabled-web-applications-using-the-live-framework/#comments</comments>
		<pubDate>Fri, 31 Oct 2008 17:33:01 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[Mesh]]></category>
		<category><![CDATA[PDC 2008]]></category>
		<category><![CDATA[pdc08]]></category>
		<category><![CDATA[Microsoft PDC]]></category>
		<category><![CDATA[Live Mesh]]></category>
		<category><![CDATA[Ray Ozzie]]></category>
		<category><![CDATA[pdc2008]]></category>
		<category><![CDATA[Azure]]></category>

		<guid isPermaLink="false">http://spsexton.wordpress.com/?p=376</guid>
		<description><![CDATA[PDC 2008, Day #3, Session #5, 1 hr 15 mins
Arash Ghanaie-Sichanie
Throughout the conference, I bounced back and forth between Azure and Live Mesh sessions.  I was trying to make sense of the difference between them and understand when you might use one vs. the other.
I understand that Azure Services is the underlying platform that Live [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=376&subd=spsexton&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p><em>PDC 2008, Day #3, Session #5, 1 hr 15 mins</em></p>
<p><em>Arash Ghanaie-Sichanie</em></p>
<p>Throughout the conference, I bounced back and forth between Azure and Live Mesh sessions.  I was trying to make sense of the difference between them and understand when you might use one vs. the other.</p>
<p>I understand that Azure Services is the underlying platform that Live Services, and Live Mesh, are built on.  But at the outset, it still wasn’t quite clear what class of applications Live Services were targeted at.  Which apps would want to use Live Services and which would need to drop down and use Azure?</p>
<p>I think that after Arash’s talk, I have a working stab at answering this question.  This is sort of my current understanding, that I’ll update as things become more clear.</p>
<p>Question: When should I use Live Services / Live Mesh ?</p>
<p>Answer:</p>
<ul>
<li>Create a Live Mesh application (Mesh-enabled) if your customers are currently, or will become, live.com customers.</li>
<li>Otherwise, use Azure cloud-based services outside of Live, or the other services built on top of Azure:
<ul>
<li>Azure storage services</li>
<li>Sync Framework</li>
<li>Service Bus</li>
<li>SQL Data Services</li>
</ul>
</li>
</ul>
<p>Unless I’m missing something, you can’t make use of features of the Live Operating Environment, either as a web application or a local desktop client, unless your application is registered with Live.com, and your user has added your application to his account.</p>
<p>The one possible loophole that I can see is that you might just have your app always authorize, for all users, using a central account.  That account could be pre-created and pre-configured.  Your application would then use the same account for all users, enabling some of the synchronization and other options.  But even this approach might not work&#8212;it’s possible that any device where local Mesh data is to be stored needs to be registered with that Live account and so your users wouldn’t normally have the authorization to join their devices to your central mesh.</p>
<p><strong>Three Takeaways</strong></p>
<p>Arash listed three main takeaways from this talk:</p>
<ul>
<li>Live Services add value to different types of applications</li>
<li>Mesh-enabled web apps extend web sites to the desktop</li>
<li>The Live Framework is a standards-based API, available to all types of apps</li>
</ul>
<p><strong>How It All Works</strong></p>
<p>The basic idea is to start with a “Mesh-enabled” web site.  This is a web site that delivers content from the user’s Mesh, including things like contacts and files.  Additionally, the web application could store all of its data in the Mesh, rather than on the web server where it is hosted.</p>
<p>Once a web application is Mesh-enabled, you have the ability to run it on various devices.  You basically create a local client, targeted at a particular platform, and have it work with data through the Live Framework API.  It typically ends up working with a cached local copy of the data, and the data is automatically synchronized to the cloud and then to other devices that are running the same application.</p>
<p>This basically implements the Mesh vision that Ray Ozzie presented first at Mix 2008 in Las Vegas and then again at PDC 2008 in Los Angeles.  The idea is that we move a user’s data into the cloud and then the data follows them around, no matter what device they’re currently working on.  The Mesh knows about a user’s:</p>
<ul>
<li>Devices</li>
<li>Data, including special data like Contacts</li>
<li>Applications</li>
<li>Social graph  (friends)</li>
</ul>
<p><strong>The User’s Perspective</strong></p>
<p>The user must do a few things to get your application or web site pointing at his data.  As a developer, you send him a link that lets him go sign up for a Live.com account and then register your application in his Mesh.  Registration, from the user’s perspective, is a way for him to authorize your application to access his Mesh-based data.</p>
<p>Again, it’s required that the user has, or get, a Live.com account.  That’s sort of the whole idea&#8212;we’re talking about developing applications that run on the Live platform.</p>
<p><strong>Run Anywhere</strong></p>
<p>There is still work to be done, on the part of the developer, to be able to run the application on various devices, but the basic choices are:</p>
<ul>
<li>Locally, on a client PC or Mac</li>
<li>In a web browser, anywhere</li>
<li>From the Live Desktop itself, which is hosted in a browser</li>
</ul>
<p>(In the future, with Silverlight adding support for running Silverlight-sandboxed apps outside of the browser, we can imagine that as a fourth option for Mesh-enabled applications).</p>
<p><strong>The Developer’s Perspective</strong></p>
<p>In addition to building the mesh application, the developer must also register his application, using the Azure Services Portal.  Under the covers, the application is just an Azure-based service.  And so you can leverage the Azure standard goodies, like running your service in a test mode and then deploying/publishing it.</p>
<p>One other feature that is made available to Mesh application authors is the ability to view basic Analytics data for your application.  Because the underlying Mesh service is aware of your application, wherever it is running, it can collect data about usage.    The data is “anonymized”, so you can’t see data about individual users, but can view general metrics.</p>
<p>Arash talked in some detail about the underlying security model, showing how a token is granted to the user/application.</p>
<p><strong>Conclusions </strong></p>
<p>Mesh obviously seems a good fit for some applications.  You can basically run on a platform that gives you a lot of services, as well as access to useful data that may already exist in a particular user’s Mesh environment.  There is also some potential for cross-application sharing of data, once common data models are agreed upon.</p>
<p>But the choice to develop on the Mesh platform implies a decision to sign your users up as part of the Mesh ecosystem.  While the programming APIs are entirely open, using basic HTTP/REST protocols, the platform itself is owned/hosted/run exclusively by Microsoft.</p>
<p>Not all of your users will want to go through the hassle of setting up a Live account in order to use your application.  What makes it a little worse is that the process for them is far from seamless.  It would be easier if you could hide the Live branding and automate some of the configuration.  But the user must actually log into Live.com and authorize your application.  This is a pretty high barrier, in terms of usability, for some users.</p>
<p>This also means that your app is betting on the success of the Live.com platform itself.  If the platform doesn’t become widely adopted, few users will live (pardon the pun) in that environment.  And the value of hosting your application in that ecosystem becomes less clear.</p>
<p>It remains to be seen where Live as a platform will go.  The tools and the programming models are rich and compelling.  But whether the platform will live up to Ozzie’s vision is still unclear.</p>
<br />Posted in Mesh, PDC 2008 Tagged: Azure, Live Mesh, Microsoft PDC, PDC 2008, pdc08, pdc2008, Ray Ozzie <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/spsexton.wordpress.com/376/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/spsexton.wordpress.com/376/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/spsexton.wordpress.com/376/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/spsexton.wordpress.com/376/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/spsexton.wordpress.com/376/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/spsexton.wordpress.com/376/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/spsexton.wordpress.com/376/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/spsexton.wordpress.com/376/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/spsexton.wordpress.com/376/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/spsexton.wordpress.com/376/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=376&subd=spsexton&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://stuff.seans.com/2008/10/31/session-%e2%80%93-building-mesh-enabled-web-applications-using-the-live-framework/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8922e4d5254d602ba3ed32dd073b5a4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">spsexton</media:title>
		</media:content>
	</item>
		<item>
		<title>Session – Offline-Enabled Data Services</title>
		<link>http://stuff.seans.com/2008/10/31/session-%e2%80%93-offline-enabled-data-services/</link>
		<comments>http://stuff.seans.com/2008/10/31/session-%e2%80%93-offline-enabled-data-services/#comments</comments>
		<pubDate>Fri, 31 Oct 2008 16:03:01 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[ADO.NET Data Services]]></category>
		<category><![CDATA[PDC 2008]]></category>
		<category><![CDATA[Astoria]]></category>
		<category><![CDATA[Astoria Offline]]></category>
		<category><![CDATA[Entity Data Model]]></category>
		<category><![CDATA[Entity Framework]]></category>
		<category><![CDATA[Microsoft PDC]]></category>
		<category><![CDATA[pdc08]]></category>
		<category><![CDATA[pdc2008]]></category>
		<category><![CDATA[Sync Framework]]></category>
		<category><![CDATA[synchronization]]></category>

		<guid isPermaLink="false">http://spsexton.wordpress.com/?p=367</guid>
		<description><![CDATA[PDC 2008, Day #3, Session #4, 1 hr 15 mins
Pablo Castro
I attended a second session with Pablo Castro (the previous one was the session on Azure Tables).  This session focused on a future capability in ADO.NET Data Services that would allow taking data services “offline” and then occasionally synching them with the online data.
Background – [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=367&subd=spsexton&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p><em>PDC 2008, Day #3, Session #4, 1 hr 15 mins</em></p>
<p><em>Pablo Castro</em></p>
<p>I attended a second session with Pablo Castro (the previous one was the session on <a href="http://stuff.seans.com/2008/10/31/session-%E2%80%93-windows-azure-tables-programming-cloud-table-storage/">Azure Tables</a>).  This session focused on a future capability in ADO.NET Data Services that would allow taking data services “offline” and then occasionally synching them with the online data.</p>
<p><strong>Background – Astoria</strong></p>
<p>ADO.NET Data Services was recently released as part of the .NET Framework 3.5 SP1 release.  It was formerly known as project “Astoria”.</p>
<p>The idea of ADO.NET Data Services is to allow creating a data service that lives on the web.  Your data source can be anything&#8212;a SQL Server database, third-party database, or some local data store.  You wrap your data source using the Entity Data Model (EDM) and ADO.NET Data Services Runtime.  Your data is now available over the web using standard HTTP protocols.</p>
<p>Once you have a data service that is exposed on the web, you can access it from any client.  Because the service is exposed using HTTP/REST protocols, you can access your data using simple URIs.  By using URIs, you are able to create/read/update/delete your data (POST/GET/PUT/DELETE in REST terms).</p>
<p>Because we can access the data using HTTP, our client is not limited to a .NET application, but can be any software that knows about the web and HTTP.  So we can consume our data from Javascript, Ruby, or whatever.  And the client could be a web-based application or a thick client somewhere that has access to the web.</p>
<p>If your client is a .NET client, you can use the ADO.NET Data Services classes in the .NET Framework to access your data, rather than having to build up the underlying URIs.  You can also use LINQ.</p>
<p>So that’s the basic idea of using ADO.NET Data Services and EDM to create a data service.  For more info, see:</p>
<ul>
<li><a href="http://msdn.microsoft.com/en-us/data/bb931106.aspx">ADO.NET Data Services home page on MSDN</a></li>
<li><a href="http://msdn.microsoft.com/en-us/library/bb399572.aspx">ADO.NET Entity Framework home page on MSDN</a></li>
<li><a href="http://blogs.msdn.com/alexbarn/archive/2006/07/21/674395.aspx">Alex Barnett’s blog</a> post with basic info on REST</li>
</ul>
<p><strong>The Data Synchronization Landscape</strong></p>
<p>Many of the technologies that made an appearance at PDC 2008 make heavy use of data synchronization.  Data synchronization is available to Azure cloud services or to Live Mesh applications.</p>
<p>The underlying engine that handles data synchronization is the <a href="http://msdn.microsoft.com/en-us/sync/default.aspx">Microsoft Sync Framework</a>.  The Sync Framework is a synchronization platform that allows creating sync providers, sitting on top of data that needs to be synchronized, as well as sync consumers&#8212;clients that consume that data.</p>
<p>The basic idea with sync is that you have multiple copies of your data in different physical locations and local clients that make use of that data.  Your client would work with its own local copy of the data and then the Sync Framework would ensure that the data is synched up with all of the other copies of the data.</p>
<p><strong>What’s New</strong></p>
<p>This session talked about an effort to add support in ADO.NET Data Services for offline copies of your Astoria-served data, using the Sync Framework to do data synchronization.</p>
<p>Here are the basic pieces (I’m too lazy to draw a picture).  This is just <strong>one possible scenario</strong>, where you want to have an application that runs locally and makes use of a locally cached copy of your data, which exists in a database somewhere:</p>
<ul>
<li>Data mainly “lives” in a SQL Server database.  Assume that the database itself is <strong>not </strong>exposed to the web</li>
<li>You’ve created a data service using ADO.NET Data Services and EDM that exposes your SQL Server Data to the web using a basic REST-based protocol.  You can now do standard Create/Read/Update/Delete operations through this interface</li>
<li>You might have a web application running somewhere that consumes this data.  E.g. A Web 2.0 site built using Silverlight 2, that allows viewing/modifying the data.  Note that the web server does not have a copy of your data, but goes directly to the data service to read/write its data.</li>
<li>Now you create a thick client that also wants to read/write your data.  E.g. A WPF application.  To start with, you assume that you have a live internet connection and you configure the application to read/write data directly from/to your data service</li>
</ul>
<p>At this point, you have something that you could build today, with the tools in the .NET Framework 3.5 SP1.  You have your data out “in the cloud” and you’ve provided both rich and thin clients that can access the data.</p>
<p>Note: If you were smart, you would have reused lots of code between the thin (Silverlight 2) and thick (WPF) clients.  Doing this gives your users the most consistent GUI between online and offline versions.</p>
<p>Now comes the new stuff.  Let’s say that you have cases when you want your thick WPC client to be able to work even though the Internet connection is not present.  Reasons for doing this include:</p>
<ul>
<li>You&#8217;re working on a laptop, somewhere where you don’t have an Internet connection (e.g. airplane)</li>
<li>You want the application to be more reliable&#8212;i.e. app is still usable even if the connection disappears from time to time</li>
<li>You’d like the application to be slightly better performing.  As it stands, the performance depends on network bandwidth.  (The “lunchtime slowdown” phenomenon).</li>
</ul>
<p>Enter <strong>Astoria Offline</strong>.  This is the set of extensions to Astoria that Pablo described, which is currently not available, but planned to be in Alpha by the end of the year.</p>
<p>With Astoria Offline, the idea is that you get a local cache of your data on the client PC where you’re running your thick client.  Then what happens is the following:</p>
<ul>
<li>Your thick (WPF) application works directly with the offline copy of the data</li>
<li>Performance is improved</li>
<li>Much more reliable&#8212;the data is always there</li>
<li>You initiate synchronization (or set it up from time to time) to synch data back to the online copy</li>
</ul>
<p>This synchronization is accomplished using the new Astoria Offline components.  When you do synchronize, the synchronization is two-ways, which means that you update both copies with any changes that have occurred since you last synched:</p>
<ul>
<li>All data created locally is copied up to the online store</li>
<li>Data created online is copied down</li>
<li>Changes are reconciled&#8212;two-way</li>
<li>Deletions are reconciled&#8212;two-way</li>
</ul>
<p>Pablo did a basic demo of this scenario and it worked just as advertised.  He showed that the client worked with the local copy of the data and that everything synched properly.  He also showed off some early tooling in Visual Studio that will automate much of the configuration that is required for all of this to work.</p>
<p>Interestingly, it looked like in Pablo’s example, the local copy of the data was stored in SQL Server Express.  This was a good match, because the “in the cloud” data was stored in SQL Server.</p>
<p><strong>How Did They Do It?</strong></p>
<p>Jump back to the description of the Microsoft Sync Framework.  Astoria Offline is using the sync framework to do all of the underlying synchronization.  They’ve written a sync provider that knows about the entity data model and interfaces between EDM and the sync framework.</p>
<p><strong>Extensibility Points</strong></p>
<p>I’m a little fuzzier on this area, but I think I have a general sense of what can be done.</p>
<p>Note that the Sync Framework itself is extensible&#8212;you can write your own sync providers, providing synchronized access to any data store that you care to support.  Once you do this, you get 2-way (or more) synchronization between your islands of custom data.</p>
<p>But if I understood Pablo correctly, it sounds like you could do this a bit differently with Astoria Offline in place.  It seems like you could pump your custom data from the Entity Framework, by building a custom data source so that the EDM can see your data.  (EntityFrameworkSyncProvider fits in here somewhere).  I’m guessing that once you serve up your data in a relational manner to the EDM, you can then synch it using the Astoria Offline mechanisms.  Fantastic stuff!</p>
<p><strong>Going Beyond Two Nodes</strong></p>
<p>One could imagine going beyond just an online data source and an offline copy.  You could easily imagine topologies that had many different copies of the data, in various places, all being synched up from time to time.</p>
<p><strong>Other Stuff</strong></p>
<p>Pablo talked about some of the other issues that you need to think about.  Conflict detection and resolution is a big one.  What if two clients both update the same piece of data at the same time?  Classic synchronization issue.</p>
<p>The basic things to know about conflicts, in Astoria Offline, are:</p>
<ul>
<li>Sync Framework provides a rich model for detecting/resolving conflicts, under the covers</li>
<li>Astoria Offline framework will detect conflicts</li>
<li>The application provides “resolution handlers” to dictate how to resolve the conflict
<ul>
<li>Could be locally&#8212;e.g. ask the user what to do</li>
<li>Or online&#8212;automatic policies</li>
</ul>
</li>
</ul>
<p>Pablo also talked briefly about the idea of Incremental Synchronization.  The idea is that you might want to synch things a little bit at a time, in a batch-type environment.</p>
<p>There was a lot more stuff here, and a lot to learn.  Much of the concepts just bubble up from the Sync Framework.</p>
<p><strong>Takeaways</strong></p>
<p>Astoria Offline is potentially game-changing.  In my opinion, of the new technologies presented at PDC 2008, <strong>Astoria Offline is the one most likely to change the landscape</strong>.  In the past, vendors have generally had to pick between working with live data or local data.  Now they can do both.</p>
<p>In the past, the online vs. offline data choice was driven by whether you needed to share the data across multiple users.  So the only apps that went with offline data were the ones that didn’t need to share their data.  What’s interesting about Astoria Offline is that these apps/scenarios  can now use this solution to leave their data essentially local, but <strong>make the data more mobile, across devices</strong>.  Imagine an application that just stores local data that only it consumes.  But now if you want to run that app on multiple machines, you have to manually copy the data&#8212;or move it to a share seen by both devices.  With Astoria Offline, you can set up a sync to an online location that each device synchs to, as needed.  So you can just move from device to device and <strong>your data will just follow you</strong>.  So you can imagine that this makes it much easier to move apps out to mobile devices.</p>
<p>This vision is very similar to what Live Mesh and Live Services promise.  But the difference is that here you don’t need to subscribe to your app and its data living in the MS Live space.  Your data can be in whatever format you like, and nobody needs to sign up with MS Live.</p>
<p><strong>When Can I Get It?</strong></p>
<p>Pablo mentioned a basic timeline:</p>
<ul>
<li>Early Alpha by the end of the year</li>
<li>CTPs later, i.e. next year</li>
</ul>
<p><strong>Resources</strong></p>
<p>In addition to the links I listed above, you might also check out:</p>
<ul>
<li><a href="http://blogs.msdn.com/astoriateam/">Project Astoria Team Blog</a></li>
<li><a href="http://channel9.msdn.com/posts/Andrew+Conrad/Astoria-Design-Walkthrough-Alpha-preview-of-Project-Codename-Astoria-Offline-coming-very-soon/">Design Walkthrough of Astoria Offline</a> Alpha Preview</li>
</ul>
<br />Posted in ADO.NET Data Services, PDC 2008 Tagged: ADO.NET Data Services, Astoria, Astoria Offline, Entity Data Model, Entity Framework, Microsoft PDC, PDC 2008, pdc08, pdc2008, Sync Framework, synchronization <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/spsexton.wordpress.com/367/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/spsexton.wordpress.com/367/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/spsexton.wordpress.com/367/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/spsexton.wordpress.com/367/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/spsexton.wordpress.com/367/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/spsexton.wordpress.com/367/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/spsexton.wordpress.com/367/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/spsexton.wordpress.com/367/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/spsexton.wordpress.com/367/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/spsexton.wordpress.com/367/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=367&subd=spsexton&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://stuff.seans.com/2008/10/31/session-%e2%80%93-offline-enabled-data-services/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8922e4d5254d602ba3ed32dd073b5a4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">spsexton</media:title>
		</media:content>
	</item>
		<item>
		<title>Session – Windows Azure Tables: Programming Cloud Table Storage</title>
		<link>http://stuff.seans.com/2008/10/31/session-%e2%80%93-windows-azure-tables-programming-cloud-table-storage/</link>
		<comments>http://stuff.seans.com/2008/10/31/session-%e2%80%93-windows-azure-tables-programming-cloud-table-storage/#comments</comments>
		<pubDate>Fri, 31 Oct 2008 01:46:29 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[Azure]]></category>
		<category><![CDATA[PDC 2008]]></category>
		<category><![CDATA[Azure Tables]]></category>
		<category><![CDATA[Microsoft PDC]]></category>
		<category><![CDATA[pdc08]]></category>
		<category><![CDATA[pdc2008]]></category>
		<category><![CDATA[Scalable Storage]]></category>

		<guid isPermaLink="false">http://spsexton.wordpress.com/?p=362</guid>
		<description><![CDATA[PDC 2008, Day #3, Session #3, 1 hr 15 mins
Pablo Castro, Niranjan Nilakantan
Pablo and Niranjan did a session that went into some more detail on how the Azure Table objects can be used store data in the cloud.
Context
This talk dealt with the “Scalable Storage” part of the new Azure Services platform.  Scalable Storage is a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=362&subd=spsexton&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p><em>PDC 2008, Day #3, Session #3, 1 hr 15 mins</em></p>
<p><em>Pablo Castro, Niranjan Nilakantan</em></p>
<p>Pablo and Niranjan did a session that went into some more detail on how the Azure Table objects can be used store data in the cloud.</p>
<p><strong>Context</strong></p>
<p>This talk dealt with the “Scalable Storage” part of the new Azure Services platform.  Scalable Storage is a mechanism by which applications can store data “in the cloud” in a highly scalable manner.</p>
<p><strong>Data Types</strong></p>
<p>There are three fundamental data types available to applications using Azure Storage Services:</p>
<ul>
<li>Blobs</li>
<li>Tables</li>
<li>Queues</li>
</ul>
<p>This session focused mainly on Tables.  Specifically, Niranjan and Pablo addressed the different ways that an application might access the storage service programmatically.</p>
<p><strong>Tables</strong></p>
<p>Tables are a “massively scalable” data type for cloud-based storage.  They are able to store billions of rows, are highly available, and “durable”.  The Azure platform takes care of scaling out the data automatically to multiple servers, if necessary.  (With some hints on the part of the developer).</p>
<p><strong>Programming Model</strong></p>
<p>Azure Storage Services are accessed through the ADO.NET Data Services (Astoria).  Using ADO.NET Data Sercices, there are basically two ways for an application to access the service.</p>
<ul>
<li>.NET API   (System.Data.Services.Client)</li>
<li>REST interface   (using HTTP URIs directly)</li>
</ul>
<p><strong>Data Model</strong></p>
<p>It’s important to note that Azure knows nothing about your data model.  It does not store data in a relational database or access it via a relational model.  Rather, you specify a Table that you’d like to store data in, along with a simple query expression for the data that you’d like to retrieve.</p>
<p>A Table represents a single Entity and is composed of a collection of rows.  Each row is uniquely defined by a Row Key, which the developer specifies.  Additionally, the developer specifies a Partition Key, which is used by Azure in knowing how to split the data across multiple servers.</p>
<p>Beyond the Record Key and Partition Key, the developer can add any other properties that she likes, up to a total of 255 properties.  While the Record and Partition Keys must be string data types, the other properties support other data types.</p>
<p><strong>Partitioning</strong></p>
<p>Azure storage services are meant to be automatically scalable, meaning that the data will be automatically spread across multiple servers, as needed.</p>
<p>In order to know how to split up the data, Azure uses a developer-specified Partition Key, which is one of the properties of each record.  (Think “field” or “column”).</p>
<p>The developer should pick a partition key that makes sense for his application.  It’s important to remember two things:</p>
<ul>
<li>Querying for all data having a single value for a partition key is cheap</li>
<li>Querying for data having multiple partition key values is more expensive</li>
</ul>
<p>For example, if your application often retrieves data by date and shows data typically for a single day, then it would make sense to have a CurrentData property in your data entity and to make that property the Partition Key.</p>
<p>The way to think of this is that each possible unique value for a Partition Key represent a “bucket” that will contain one or more records.  If you pick a key that results in only one record per bucket, that would be inefficient.  But if you pick a key that results in a set of records in the bucket that you are likely to ask for together, this will be efficient.</p>
<p><strong>Accessing the Data Programmatically</strong></p>
<p>Pablo demonstrated creating the classes required to access data stored in an Azure storage service.</p>
<p>He started by creating a class representing the data entity to be stored in a single table.  He selected and defined properties for the Partition and Record key, as well as other properties to store any other desired data in.</p>
<p>Pablo also recommended that you create a single class to act as an entry point into the system.  This class then acts as a service entry point for all of the data operations that your client application would like to perform.</p>
<p>He also demonstrated using LINQ to run queries against the Azure storage service.  LINQ automatically created to corresponding URI to retrieve, create, update, or delete the data.</p>
<p><strong>Miscellaneous</strong></p>
<p>Pablo and Niranjan also touched on a few other issues that most applications will deal with:</p>
<ul>
<li>Dealing with concurrent updates  (uses Etag and if-match)</li>
<li>Pagination  (using continuation tokens)</li>
<li>Using Azure Queues for pseudo-transactional deletion of data</li>
</ul>
<p><strong>Takeaways</strong></p>
<p>Pablo and Niranjan demonstrated that it was quite straightforward to access Azure storage services from a .NET application.  It’s also the case that non-.NET stacks could make use of the same services using a simple REST protocol.</p>
<p>It was also helpful to see how Pablo used ADO.NET Data Services to construct a service layer on top of the Azure storage services.  This seems to make consuming the data pretty straightforward.</p>
<p>(I still might have this a little confused&#8212;it’s possible that Astoria was just being used to wrap Azure services, rather than exposing the data in an Astoria-based service to the client.  I need to look at the examples in a little more detail to figure this out).</p>
<p><strong>Original Materials</strong></p>
<p>You can find the video of the session at:  <a href="http://mschnlnine.vo.llnwd.net/d1/pdc08/WMV-HQ/ES07.wmv">http://mschnlnine.vo.llnwd.net/d1/pdc08/WMV-HQ/ES07.wmv</a></p>
<br />Posted in Azure, PDC 2008 Tagged: Azure, Azure Tables, Microsoft PDC, PDC 2008, pdc08, pdc2008, Scalable Storage <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/spsexton.wordpress.com/362/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/spsexton.wordpress.com/362/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/spsexton.wordpress.com/362/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/spsexton.wordpress.com/362/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/spsexton.wordpress.com/362/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/spsexton.wordpress.com/362/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/spsexton.wordpress.com/362/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/spsexton.wordpress.com/362/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/spsexton.wordpress.com/362/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/spsexton.wordpress.com/362/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=362&subd=spsexton&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://stuff.seans.com/2008/10/31/session-%e2%80%93-windows-azure-tables-programming-cloud-table-storage/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
<enclosure url="http://mschnlnine.vo.llnwd.net/d1/pdc08/WMV-HQ/ES07.wmv" length="271816757" type="video/x-ms-wmv" />
	
		<media:content url="http://0.gravatar.com/avatar/8922e4d5254d602ba3ed32dd073b5a4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">spsexton</media:title>
		</media:content>
	</item>
		<item>
		<title>Session – Silverlight Controls Roadmap</title>
		<link>http://stuff.seans.com/2008/10/31/session-%e2%80%93-silverlight-controls-roadmap/</link>
		<comments>http://stuff.seans.com/2008/10/31/session-%e2%80%93-silverlight-controls-roadmap/#comments</comments>
		<pubDate>Fri, 31 Oct 2008 00:47:50 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[PDC 2008]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[AutoComplete]]></category>
		<category><![CDATA[Charting]]></category>
		<category><![CDATA[Microsoft PDC]]></category>
		<category><![CDATA[pdc08]]></category>
		<category><![CDATA[pdc2008]]></category>
		<category><![CDATA[Silverlight Controls]]></category>
		<category><![CDATA[TreeView]]></category>

		<guid isPermaLink="false">http://spsexton.wordpress.com/?p=349</guid>
		<description><![CDATA[PDC 2008, Day #3, Session #2, 45 mins
Shawn Burke
Product Unit Manager
WPF/Silverlight Controls Team, Microsoft
Shawn Burke gave a short talk on the new controls being released this week in the Silverlight Toolkit, on Codeplex.
He started by outlining the general strategy for releasing controls toolkits like this one:

Focus on controls for both WPF &#38; Silverlight
Ship out of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=349&subd=spsexton&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p><em>PDC 2008, Day #3, Session #2, 45 mins</em></p>
<p><em>Shawn Burke<br />
Product Unit Manager<br />
WPF/Silverlight Controls Team, Microsoft</em></p>
<p>Shawn Burke gave a short talk on the new controls being released this week in the Silverlight Toolkit, on <a href="http://www.codeplex.com/Silverlight">Codeplex</a>.</p>
<p>He started by outlining the general strategy for releasing controls toolkits like this one:</p>
<ul>
<li>Focus on controls for both WPF &amp; Silverlight</li>
<li>Ship out of band from major releases</li>
<li>Ship w/source code</li>
<li>Fold best (and most popular) controls back into the mainline product</li>
</ul>
<p>I also appreciated that Shawn outlined the idea of “quality bands”.  Every control goes through a lifecycle, where it passes through various quality bands before eventually making it into the mainline product:</p>
<ul>
<li>Experimental</li>
<li>Preview   (team is committed to it)</li>
<li>Stable  (equivalent to Beta&#8212;feature-complete)</li>
<li>Mature   (bugs are fixed)</li>
</ul>
<p>This is great&#8212;because the team doesn’t have to wait for the entire toolkit to reach a particular quality level before releasing it to the public.  Instead, they can assess the quality of each control and then make that known.</p>
<p><strong>WPF Parity Controls</strong></p>
<p>Some of the controls included in the toolkit are “parity” controls&#8212;i.e. controls that are already in WPF and now being added to Silverlight.  They include:</p>
<ul>
<li>DockPanel</li>
<li>Expander</li>
<li>TreeView</li>
</ul>
<p><strong>DockPanel </strong>(Stable)</p>
<p>A DockPanel control allows docking child elements to one side of the container.  The last child can be made to fill the remaining space in the container.</p>
<p><a href="http://spsexton.files.wordpress.com/2008/10/3-1-dockpanel.jpg"><img class="alignnone size-full wp-image-352" title="3-1-dockpanel" src="http://spsexton.files.wordpress.com/2008/10/3-1-dockpanel.jpg?w=832&#038;h=260" alt="" width="832" height="260" /></a></p>
<p><strong>Expander </strong>(Preview)</p>
<p>The Expander allows display overview and details information, with the details view showing when the user clicks on an expander widget.  You can also change the direction that the content expands to (the default is Down).  The first image below shows the default state&#8212;content not yet expanded.  When the user clicks on the expander icon, the Content appears and the icon changes to show an up arrow.</p>
<p><a href="http://spsexton.files.wordpress.com/2008/10/3-2-expander.jpg"><a href="http://spsexton.files.wordpress.com/2008/10/3-3-expander2.jpg"><img class="alignnone size-full wp-image-354" title="3-3-expander2" src="http://spsexton.files.wordpress.com/2008/10/3-3-expander2.jpg?w=232&#038;h=118" alt="" width="232" height="118" /></a><img class="alignnone size-full wp-image-353" title="3-2-expander" src="http://spsexton.files.wordpress.com/2008/10/3-2-expander.jpg?w=232&#038;h=134" alt="" width="232" height="134" /></a></p>
<p><strong>TreeView </strong>(Stable)</p>
<p>Shawn indicated that the TreeView was by far the control mostly frequently asked for by users.  It’s behavior is quite familiar&#8212;presenting hierarchical data in a dynamic way and allowing the user to expand/collapse the various nodes.</p>
<p>What’s very cool is that the individual nodes in the tree can be basically anything, and fully styled.</p>
<p><a href="http://spsexton.files.wordpress.com/2008/10/3-4-treeview.jpg"><img class="alignnone size-full wp-image-355" title="3-4-treeview" src="http://spsexton.files.wordpress.com/2008/10/3-4-treeview.jpg?w=158&#038;h=268" alt="" width="158" height="268" /></a></p>
<p><strong>New Non-WPF Controls</strong></p>
<p>Shawn mentioned a series of controls that are brand new&#8212;i.e. not yet in WPF either.</p>
<ul>
<li>AutoComplete</li>
<li>Charting</li>
<li>NumericUpDown</li>
</ul>
<p><strong>AutoComplete </strong>(Preview)</p>
<p>Auto completion is a pretty standard feature on the web.  The idea is to do some data lookup while a user types and then display relevant/possible matches to what they are typing.  The cool thing is that the content displayed can be nearly anything.  Shawn demonstrated having a DataGrid show up to display selected data.</p>
<p><a href="http://spsexton.files.wordpress.com/2008/10/3-5-autocomplete.jpg"><img class="alignnone size-full wp-image-356" title="3-5-autocomplete" src="http://spsexton.files.wordpress.com/2008/10/3-5-autocomplete.jpg?w=559&#038;h=193" alt="" width="559" height="193" /></a></p>
<p>Here’s another example, showing some nice styling:</p>
<p><a href="http://spsexton.files.wordpress.com/2008/10/3-6-autocomplete.jpg"><img class="alignnone size-full wp-image-357" title="3-6-autocomplete" src="http://spsexton.files.wordpress.com/2008/10/3-6-autocomplete.jpg?w=424&#038;h=254" alt="" width="424" height="254" /></a></p>
<p><strong>Charting </strong>(Preview)</p>
<p>Shawn ran some pretty amazing charting demos, showing charts on a web page updating in real-time.  He said that Microsoft partnered with Dundas, long-time vendor of charting controls, to gain some expertise in the area.</p>
<p>Here are some samples:</p>
<p><a href="http://spsexton.files.wordpress.com/2008/10/3-7-chart1.jpg"><img class="alignnone size-full wp-image-358" title="3-7-chart1" src="http://spsexton.files.wordpress.com/2008/10/3-7-chart1.jpg?w=382&#038;h=214" alt="" width="382" height="214" /></a></p>
<p><a href="http://spsexton.files.wordpress.com/2008/10/3-8-chart2.jpg"><img class="alignnone size-full wp-image-359" title="3-8-chart2" src="http://spsexton.files.wordpress.com/2008/10/3-8-chart2.jpg?w=448&#038;h=250" alt="" width="448" height="250" /></a></p>
<p><a href="http://spsexton.files.wordpress.com/2008/10/3-9-chart3.jpg"><img class="alignnone size-full wp-image-360" title="3-9-chart3" src="http://spsexton.files.wordpress.com/2008/10/3-9-chart3.jpg?w=394&#038;h=280" alt="" width="394" height="280" /></a></p>
<p><strong>Summary</strong></p>
<p>There are some wonderful goodies in this new set of Silverlight tools.  It’s clear that as time goes by, Silverlight will just continue to become more mature and the set of controls will continue to grow&#8212;in both WPF and Silverlight.</p>
<p><strong>Original Materials</strong></p>
<p>You can find video of Shawn’s presentation at:  <a href="http://mschnlnine.vo.llnwd.net/d1/pdc08/WMV-HQ/PC35.wmv">http://mschnlnine.vo.llnwd.net/d1/pdc08/WMV-HQ/PC35.wmv</a></p>
<p>You can play with “live” samples of the various controls at: <a href="http://silverlight.net/samples/sl2/toolkitcontrolsamples/run/default.html">http://silverlight.net/samples/sl2/toolkitcontrolsamples/run/default.html</a></p>
<p>Charting samples can be found at:  <a href="http://silverlight.net/samples/sl2/toolkitchartsamples/run/default.html">http://silverlight.net/samples/sl2/toolkitchartsamples/run/default.html</a></p>
<br />Posted in PDC 2008, Silverlight Tagged: AutoComplete, Charting, Microsoft PDC, PDC 2008, pdc08, pdc2008, Silverlight, Silverlight Controls, TreeView <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/spsexton.wordpress.com/349/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/spsexton.wordpress.com/349/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/spsexton.wordpress.com/349/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/spsexton.wordpress.com/349/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/spsexton.wordpress.com/349/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/spsexton.wordpress.com/349/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/spsexton.wordpress.com/349/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/spsexton.wordpress.com/349/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/spsexton.wordpress.com/349/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/spsexton.wordpress.com/349/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=349&subd=spsexton&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://stuff.seans.com/2008/10/31/session-%e2%80%93-silverlight-controls-roadmap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://mschnlnine.vo.llnwd.net/d1/pdc08/WMV-HQ/PC35.wmv" length="267669681" type="video/x-ms-wmv" />
	
		<media:content url="http://0.gravatar.com/avatar/8922e4d5254d602ba3ed32dd073b5a4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">spsexton</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2008/10/3-1-dockpanel.jpg" medium="image">
			<media:title type="html">3-1-dockpanel</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2008/10/3-3-expander2.jpg" medium="image">
			<media:title type="html">3-3-expander2</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2008/10/3-2-expander.jpg" medium="image">
			<media:title type="html">3-2-expander</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2008/10/3-4-treeview.jpg" medium="image">
			<media:title type="html">3-4-treeview</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2008/10/3-5-autocomplete.jpg" medium="image">
			<media:title type="html">3-5-autocomplete</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2008/10/3-6-autocomplete.jpg" medium="image">
			<media:title type="html">3-6-autocomplete</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2008/10/3-7-chart1.jpg" medium="image">
			<media:title type="html">3-7-chart1</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2008/10/3-8-chart2.jpg" medium="image">
			<media:title type="html">3-8-chart2</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2008/10/3-9-chart3.jpg" medium="image">
			<media:title type="html">3-9-chart3</media:title>
		</media:content>
	</item>
		<item>
		<title>Session – Live Services: Live Framework Programming Model Architecture and Insights</title>
		<link>http://stuff.seans.com/2008/10/30/session-%e2%80%93-live-services-live-framework-programming-model-architecture-and-insights/</link>
		<comments>http://stuff.seans.com/2008/10/30/session-%e2%80%93-live-services-live-framework-programming-model-architecture-and-insights/#comments</comments>
		<pubDate>Thu, 30 Oct 2008 18:04:13 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[Mesh]]></category>
		<category><![CDATA[PDC 2008]]></category>
		<category><![CDATA[Azure]]></category>
		<category><![CDATA[Live Mesh]]></category>
		<category><![CDATA[Live Operating Environment]]></category>
		<category><![CDATA[Live Services]]></category>
		<category><![CDATA[Microsoft PDC]]></category>
		<category><![CDATA[pdc08]]></category>
		<category><![CDATA[pdc2008]]></category>

		<guid isPermaLink="false">http://spsexton.wordpress.com/?p=341</guid>
		<description><![CDATA[PDC 2008, Day #3, Session #1, 1 hr 15 mins
Ori Amiga
My next session dug a bit deeper into the Live Framework and some of the architecture related to building a Live Mesh application.
Ori Amiga was presenting, filling in for Dharma Shukla (who just became a new Dad).
Terminology
It’s still a little unclear what terminology I should [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=341&subd=spsexton&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p><em>PDC 2008, Day #3, Session #1, 1 hr 15 mins</em></p>
<p><em>Ori Amiga</em></p>
<p>My next session dug a bit deeper into the Live Framework and some of the architecture related to building a Live Mesh application.</p>
<p>Ori Amiga was presenting, filling in for Dharma Shukla (who just became a new Dad).</p>
<p><strong>Terminology</strong></p>
<p>It’s still a little unclear what terminology I should be using.  In some areas, Microsoft is switching from “Mesh” to just plain “Live”.  (E.g. Mesh Operating Environment is now Live Operating Environment).  And the framework that you use to build Mesh applications is the Live Framework.  But they are still very much talking about “Mesh”-enabled applications.</p>
<p>I think that the way to look at is this:</p>
<ul>
<li>Azure is the lowest level of cloud infrastructure stuff</li>
<li>The Live Operating Environment runs on top of Azure and provides some basic services useful for cloud applications</li>
<li>Mesh applications run on top of the LOE and provide access to a live.com user’s “mesh”: devices, applications and data that lives inside their mesh</li>
</ul>
<p>I think that this basically means that you could have an application that makes use of the various Live Services in the Live Operating Environment without actually being a Mesh application.  On the other hand, some of the services in the LOE don’t make any sense to non-Mesh apps.</p>
<p><strong>Live Operating Environment  (LOE)</strong></p>
<p>Ori reviewed the Live Operating Environment, which is the runtime that Mesh applications run on top of.  Here’s a diagram from <a href="http://blogs.zdnet.com/microsoft/?p=1682">Mary Jo Foley’s blog</a>:</p>
<p><a href="http://spsexton.files.wordpress.com/2008/10/2-1-live-framework.jpg"><img class="alignnone size-full wp-image-342" title="2-1-live-framework" src="http://spsexton.files.wordpress.com/2008/10/2-1-live-framework.jpg?w=579&#038;h=362" alt="" width="579" height="362" /></a></p>
<p>This diagram sort of supports my thought that access to a user’s mesh environment is different from the basic stuff provide in the LOE.  According to this particular view, Live Services are services that provide access to the “mesh stuff”, like their contact lists, information about their devices, the data stores (data stored in the mesh or out on the devices), and other applications in that user’s mesh.</p>
<p>The LOE would contain all of the other stuff&#8212;basic a set of utility classes, akin to the CLR for desktop-based applications.  (Oh wait, Azure is supposed to be “akin to the CLR”). *smile*</p>
<p>Ori talked about a list of services that live in the LOE, including:</p>
<ul>
<li>Scripting engine</li>
<li>Formatters</li>
<li>Resource management</li>
<li>FSManager</li>
<li>Peer-to-peer communications</li>
<li>HTTP communications</li>
<li>Application engine</li>
<li>Apt(?) throttle</li>
<li>Authentication/Authorization</li>
<li>Notifications</li>
<li>Device management</li>
</ul>
<p>Here’s another view of the architecture (you can also find it <a href="http://dev.live.com/liveframework/livefxposter.pdf">here</a>).</p>
<p><a href="http://spsexton.files.wordpress.com/2008/10/2-2-liveframeworkdetailed.jpg"><img class="alignnone size-full wp-image-343" title="2-2-liveframeworkdetailed" src="http://spsexton.files.wordpress.com/2008/10/2-2-liveframeworkdetailed.jpg?w=1024&#038;h=640" alt="" width="1024" height="640" /></a></p>
<p>Also, for more information on the Live Framework, you can go <a href="http://msdn.microsoft.com/en-us/library/dd156996.aspx">here</a>.</p>
<p><strong>Data in the Mesh</strong></p>
<p>Ori pointed out an important point about how Mesh applications access their data.  If you have a Mesh client running on your local PC, and you’ve set up its associated data store to synch between the cloud and that device, the application uses local data, rather than pulling data down from the cloud.  Because it’s working entirely with locally cached data, it can run faster than the corresponding web-based version (e.g. running in the Live Desktop).</p>
<p><strong>Resource Scripts</strong></p>
<p>Ori talked a lot about resource scripts and how they might be used by a Mesh-enabled application.  An application can perform actions in the Mesh using these resource scripts, rather than performing actions directly in the code.</p>
<p>The resource scripting language contains things like:</p>
<ul>
<li>Control flow statements – sequence and interleaving, conditionals</li>
<li>Web operation statements – to issue HTTP POST/PUT/GET/DELETE</li>
<li>Synchronization statements – to initiate data synchronization</li>
<li>Data flow constructs – for binding statements to other statements(?)</li>
</ul>
<p>Ori did a demo that showed off a basic script.  One of the most interesting things was how he combined sequential and interleaved statements.  The idea is that you specify what things you need to do in sequence (like getting a mesh object and then getting its children), and what things you can do in parallel (like getting a collection of separate resources).  The parallelism is automatically taken care of by the runtime.</p>
<p><strong>Custom Data</strong></p>
<p>Ori also talked quite a bit about how an application might view its data.  The easiest thing to do would be to simply invent your own schema and then be the only app that reads/writes the data in that schema.</p>
<p>A more open strategy, however, would be to create a data model that other applications could use.  Ori talked philosophically here, arguing that this openness serves to improve the ecosystem.  If you can come up with a custom data model that might be useful to other applications, they could be written to work with the same data that your application uses.</p>
<p>Ori demonstrated this idea of custom data in Mesh.  Basically you create a serializable class and then mark it up so that it gets stored as user data within a particular DataEntry.  (Remember: Mesh objects | Data feeds | Data entries).</p>
<p>This seems like an attractive idea, but it seems a bit clunky.  The custom data is embedded into the standard AtomPub stream, but not in a queryable way.  It looked more like it was jammed into an XML element in the &lt;DataEntry&gt; element.  This means that your custom data items would not be directly queryable.</p>
<p>Ori did go on to admit that custom data isn’t queryable or indexable, but really only for “lightweight data”.  This is really at odds with the philosophy of a reusable schema for other applications.</p>
<p><strong>Tips &amp; Tricks</strong></p>
<p>Finally, Ori presented a handful of tips &amp; tricks for working with Mesh applications:</p>
<ul>
<li>To clean out local data cache, just delete the DB/MR/Assembler directories and re-synch</li>
<li>Local metadata is actually sotred in SQL Server Express.  Go ahead and peek at it, but be careful not to mess it up.</li>
<li>Use the Resource Model Browser to really see what’s going on under the covers.  What it shows you represents the truth of what’s happening between the client and the cloud</li>
<li>One simple way to track synch progress is to just look at the size of the Assembler and MR directories</li>
<li>Collect logs and send to Microsoft when reporting a problem</li>
</ul>
<p><strong>Summary</strong></p>
<p>Ori finished with the following summary:</p>
<ul>
<li>Think of the cloud as just a special kind of device</li>
<li>There is a symmetric cloud/client programming model</li>
<li>Everything is a Resource</li>
</ul>
<br />Posted in Mesh, PDC 2008 Tagged: Azure, Live Mesh, Live Operating Environment, Live Services, Mesh, Microsoft PDC, PDC 2008, pdc08, pdc2008 <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/spsexton.wordpress.com/341/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/spsexton.wordpress.com/341/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/spsexton.wordpress.com/341/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/spsexton.wordpress.com/341/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/spsexton.wordpress.com/341/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/spsexton.wordpress.com/341/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/spsexton.wordpress.com/341/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/spsexton.wordpress.com/341/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/spsexton.wordpress.com/341/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/spsexton.wordpress.com/341/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=341&subd=spsexton&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://stuff.seans.com/2008/10/30/session-%e2%80%93-live-services-live-framework-programming-model-architecture-and-insights/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8922e4d5254d602ba3ed32dd073b5a4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">spsexton</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2008/10/2-1-live-framework.jpg" medium="image">
			<media:title type="html">2-1-live-framework</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2008/10/2-2-liveframeworkdetailed.jpg" medium="image">
			<media:title type="html">2-2-liveframeworkdetailed</media:title>
		</media:content>
	</item>
		<item>
		<title>Keynote #4 – Rashid</title>
		<link>http://stuff.seans.com/2008/10/30/keynote-4-%e2%80%93-rashid/</link>
		<comments>http://stuff.seans.com/2008/10/30/keynote-4-%e2%80%93-rashid/#comments</comments>
		<pubDate>Thu, 30 Oct 2008 13:18:10 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[PDC 2008]]></category>
		<category><![CDATA[Microsoft PDC]]></category>
		<category><![CDATA[Microsoft Research]]></category>
		<category><![CDATA[Microsoft Surface]]></category>
		<category><![CDATA[pdc2008]]></category>
		<category><![CDATA[SecondLight]]></category>

		<guid isPermaLink="false">http://spsexton.wordpress.com/?p=327</guid>
		<description><![CDATA[PDC 2008, Day #3, Keynote #4, 1.5 hrs
Rick Rashid
Rick Rashid, Senior Vice President of Microsoft Research, delivered the final PDC 2008 keynote.
Rick described how Microsoft Research is organized and talked about their mission statement:

Expand state of the art in each area in which we do research
Rapidly transfer innovative technologies into Microsoft products
Ensure that Microsoft products [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=327&subd=spsexton&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p><em>PDC 2008, Day #3, Keynote #4, 1.5 hrs</em></p>
<p><em>Rick Rashid</em></p>
<p>Rick Rashid, Senior Vice President of Microsoft Research, delivered the final PDC 2008 keynote.</p>
<p>Rick described how Microsoft Research is organized and talked about their mission statement:</p>
<ul>
<li>Expand state of the art in each area in which we do research</li>
<li>Rapidly transfer innovative technologies into Microsoft products</li>
<li>Ensure that Microsoft products have a future</li>
</ul>
<p>The Microsoft behemoth is truly impressive.  Here are a couple of tidbits:</p>
<ul>
<li>10-30% of papers presented at most CSci and Software Engineering academic conferences are  by Microsoft Research</li>
<li>Microsoft Research employees about 850 Ph.D. researchers—about as large a staff as most research-oriented universities</li>
</ul>
<p>Mr. Rashid made a good case for why we do basic research.  It’s not so much for the immediate applications.  Instead, he argued the goals are to enable a company to respond quickly to change, based on an existing reservoir of people and technologies that can be brought to bear on new problems.</p>
<p>I for one was expecting some cool demos at the Research keynote.  There were several demos, but they started out as fairly mundane.</p>
<p><strong>Feng Zhao – Energy Sensing</strong></p>
<p>The first demo was by Feng Zhao, a Principal Researcher.  He talked about a little climate sensor that Microsoft developed and which they been using to gather climate data.</p>
<p>The first example was indoors.  Microsoft had actually hung a large number of these sensors from the ceiling of the keynote auditorium.  They’d then been acquiring basic temperature data for several days and transmitting that data back to a server.  Feng was able to show all kinds of graphs showing the temperature map of the room, including how it warmed up a little when people came in.</p>
<p>Feng also explained how they are using similar sensors in outdoor climactic research projects.  For example, they collect various data about Alpine climate data in Switzerland.</p>
<p><strong>World Wide Telescope</strong></p>
<p>The next demo was definitely a notch above the energy sensing.</p>
<p>The WorldWide Telescope is a Microsoft Research project that went public earlier this year.  It’s a web site that ties together a huge database of space images from all different sources.  The end result is a 3D virtual universe that you can fly around in, navigating to and viewing various objects.  As you zip around in the universe, you automatically see stitched together images of whatever objects would be in your view.</p>
<p>Microsoft announced in this keynote a new version of WorldWide Telescope, being released today.  It included lots of new images, as well as improved views of our solar system.</p>
<p>The demo of the new WorldWide Telescope site was truly awe-inspiring.</p>
<p><strong>Boku</strong></p>
<p>The energy level  went up a little bit more as Matt MacLaurin came out to demo Boku&#8212;an animated world used to teach kids how to program.</p>
<p>In the Boku world, kids create “programs” visually by selecting objects and then icons indicating what those objects should do.  Actions can include things like moving towards other objects, eating objects, or shooting at objects.</p>
<p>The demo was pretty impressive.  The little Boku world was rendered beautifully in 3D and Matt was able to very quickly create and animate objects.  More important is that he said that kids find the resulting “programming” environment very intuitive to use.  This allows them to learn basic logic and programming skills at a very early age.</p>
<p>Boku was great, but nothing compared to what came next.</p>
<p><strong>SecondLight</strong></p>
<p>Most of us have seen the online videos and demos of the Microsoft Surface.  The basic idea is that a PC projects an image of a user interface surface up onto a flat table that you can interact with by touching.  It’s sort of a combination coffee table and touchable PC screen.</p>
<p>The big thing about Surface is that it supports something called “multi-touch”.  So not only can you move things around on the surface by touch/dragging with one finger, you can initiate more complicated gestures by using two fingers at the same time.  For example, you might  use your thumb and forefinger to zoom into a photo by putting both fingers down and then spreading them apart.</p>
<p>Surface also includes an infrared camera that allows it to “see” things placed on the surface itself.  This allows user interaction with simple objects, or even something like a user’s arm.  (Think about a Poker game that would flip your cards over when it saw you put your arm down to block them from another player’s view).</p>
<p>That’s the basic idea of Surface.  It’s available today, for something like $15,000.</p>
<p>But at today’s keynote, several of the guys from the Surface team demoed the next big extension to Surface, which they called <em>SecondLight</em>.</p>
<p>The basic idea of SecondLight is to extend both the project area and the infrared detection mechanism out into the space <strong>above the surface</strong>.  So if I held up a piece of tracing paper 8-10” above the surface, I’d see an image on it, as well as the surface.  Ok, no big deal, right?  Well, the big deal is that the image on the tracing paper is <strong>different </strong>from the image on the surface below it?</p>
<p>The guys’ demo showed how this might work.  Let’s say you’re looking at a Virtual Earth map that showed an aerial view of some location.  The Surface would display the standard aerial view of the place.  Now let’s say that you hold a little sheet of tracing paper above the Surface, over one particular area of the map.  Surface might project out a street view, rather than aerial view onto your paper.  But the main surface of the table will continue to show the original aerial view.  Other applications might be to provide a photo on the Surface and then some description about that photo on the paper that you hold over it.</p>
<p>How the <strong>hell </strong>do they do that?  Well, they explained that their projector down under the table can actually interlace two completely separate images&#8212;one that they project up to the surface and one that they project <strong>beyond </strong>the surface.  This happens at such a high frequency that you don’t see any flicker and see both images simultaneously.</p>
<p>But wait, there’s more!  Now the guys demonstrated how Surface can also detect objects above the table with its infrared camera.  They took a little picture frame with a plastic see-through surface&#8212;something about 4-5” across.  To start with, there was a silhouette of a man on the main Surface.  Now when they held the see-through frame above the Surface, the <strong>man moved from the Surface up to the surface of their handheld picture frame</strong>.  Truly a “holy shit” moment.  Even more incredible, the presenter started slowly tilting the picture frame from horizontal to vertical.  As he did this, the aspect ratio of the man on the frame stayed the same&#8212;as opposed to the projection becoming narrower.  The effect was as if you’d grabbed the silhouette off the flat surface and <strong>stood it up</strong>.  Unbelievable.</p>
<p>How did they do this last part?  Well, simple&#8212;the infrared camera can see the outline of the handheld frame, so it knows its dimensions.  And it then pre-foreshortens the image of the man, so the entire image of the man is mapped to the entire size of the picture frame.  The result is that the man stands up.</p>
<p>This final demo was truly the highlight of the keynote and it made up for all of the boring opening acts.  There are many ways that you can imagine using GUI technology like this.  Just think of a computer that can recognize your face and see where you are.  We’re in for some truly amazing advances in user interaction over the next few years.</p>
<p>You can find a video of the demo at: <a href="http://www.youtube.com/watch?v=XfzplPIrzjY">http://www.youtube.com/watch?v=XfzplPIrzjY</a></p>
<br />Posted in PDC 2008 Tagged: Microsoft PDC, Microsoft Research, Microsoft Surface, PDC 2008, pdc2008, SecondLight <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/spsexton.wordpress.com/327/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/spsexton.wordpress.com/327/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/spsexton.wordpress.com/327/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/spsexton.wordpress.com/327/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/spsexton.wordpress.com/327/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/spsexton.wordpress.com/327/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/spsexton.wordpress.com/327/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/spsexton.wordpress.com/327/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/spsexton.wordpress.com/327/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/spsexton.wordpress.com/327/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=327&subd=spsexton&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://stuff.seans.com/2008/10/30/keynote-4-%e2%80%93-rashid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8922e4d5254d602ba3ed32dd073b5a4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">spsexton</media:title>
		</media:content>
	</item>
		<item>
		<title>Session – Deep Dive: Building an Optimized, Graphics-Intensive Application in Microsoft Silverlight</title>
		<link>http://stuff.seans.com/2008/10/30/session-%e2%80%93-deep-dive-building-an-optimized-graphics-intensive-application-in-microsoft-silverlight/</link>
		<comments>http://stuff.seans.com/2008/10/30/session-%e2%80%93-deep-dive-building-an-optimized-graphics-intensive-application-in-microsoft-silverlight/#comments</comments>
		<pubDate>Thu, 30 Oct 2008 05:17:12 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[PDC 2008]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[Microsoft PDC]]></category>
		<category><![CDATA[pdc08]]></category>
		<category><![CDATA[pdc2008]]></category>
		<category><![CDATA[Silverlight performance]]></category>

		<guid isPermaLink="false">http://spsexton.wordpress.com/?p=320</guid>
		<description><![CDATA[PDC 2008, Day #2, Session #4, 1 hr 15 mins
Seema Ramchandani
The final session of the day was all about optimizing graphics-based Silverlight applications.  The talk was a little bit different from what I expected.  I was imagining it being about how to do custom 2D graphics.  Instead, it was more geared at understanding the underlying [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=320&subd=spsexton&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p><em>PDC 2008, Day #2, Session #4, 1 hr 15 mins</em></p>
<p><em>Seema Ramchandani</em></p>
<p>The final session of the day was all about optimizing graphics-based Silverlight applications.  The talk was a little bit different from what I expected.  I was imagining it being about how to do custom 2D graphics.  Instead, it was more geared at understanding the underlying rendering loop and optimizing basic animations.</p>
<p>Seema is a Program Manager in the Silverlight group and described her job as being focused on performance.  She is the person, she explained, that people call when they can’t figure out why their Silverlight application is running so slowly.</p>
<p><strong>The Dancing Peacock</strong></p>
<p>Seema’s first real-world story gives us a new term that we can use in assessing application performance:</p>
<p style="padding-left:30px;"><em>The Dancing Peacock </em>= the portions of your application that are consuming resources, but not contributing to the user experience in any meaningful way.</p>
<p>The story goes something like this.  Someone called up Seema and said that they had a very poorly performing Silverlight application and they could not figure out why it was so slow.  Seema took a look at it and started removing elements to understand which element was contributing to the performance degradation.</p>
<p>What she found, <strong>under </strong>all of the visible controls, was a giant full-screen animated dancing peacock.  It was being rendered, because it was behind all of the other windows, but the designer had left it in the XAML code, figuring that it wasn’t doing any harm.  But as it turns out, code to calculate all of the peacock’s dance steps was still running in the background&#8212;and dragging the entire application down.</p>
<p>So Seema’s basic message throughout the talk was&#8212;look for the dancing peacocks in your application and remove them.</p>
<p><strong>The Graphics Pipeline</strong></p>
<p>Seema argued that it was important to fully understand how the graphics pipeline in Silverlight works.  If you understand the full sequence of what happens to render graphics to the screen, it can greatly help you in debugging the source of any performance problems.</p>
<p>She showed a fairly detailed diagram of the rendering loop and walked through all of the steps, explaining what happens at each point.</p>
<p><a href="http://spsexton.files.wordpress.com/2008/10/6-1-animateloop.jpg"><img class="alignnone size-full wp-image-325" title="6-1-animateloop" src="http://spsexton.files.wordpress.com/2008/10/6-1-animateloop.jpg?w=400&#038;h=298" alt="" width="400" height="298" /></a></p>
<p><strong>Tips / Tricks</strong></p>
<p>Seema also presented miscellaneous tips and tricks for improving performance.  Without going into details, some of the basic ideas were:</p>
<ul>
<li>Blend in as small a region as possible</li>
<li>Mitigate blurry text with UsesLayoutRounding</li>
<li>Avoid large-scale animations  (costly)</li>
<li>Don’t plug up your UI thread with costly operations</li>
<li>Avoid video resizing by encoding at the desired resolution</li>
<li>Simplify XAML – avoid bloat</li>
</ul>
<p><strong>Tools</strong></p>
<p>Seema also demonstrated a very useful tool that you can use for profiling Silverlight applications.  She described using a tool called XPerf, which using Event Tracing for Windows to exactly measure the amount of time spent in each module of the underlying native code.</p>
<p>XPerf can be used for debugging, but is most powerful as a way of comparing alternative designs, to see how they impact performance.</p>
<br />Posted in PDC 2008, Silverlight Tagged: animation, Microsoft PDC, PDC 2008, pdc08, pdc2008, Silverlight, Silverlight performance <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/spsexton.wordpress.com/320/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/spsexton.wordpress.com/320/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/spsexton.wordpress.com/320/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/spsexton.wordpress.com/320/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/spsexton.wordpress.com/320/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/spsexton.wordpress.com/320/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/spsexton.wordpress.com/320/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/spsexton.wordpress.com/320/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/spsexton.wordpress.com/320/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/spsexton.wordpress.com/320/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=320&subd=spsexton&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://stuff.seans.com/2008/10/30/session-%e2%80%93-deep-dive-building-an-optimized-graphics-intensive-application-in-microsoft-silverlight/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8922e4d5254d602ba3ed32dd073b5a4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">spsexton</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2008/10/6-1-animateloop.jpg" medium="image">
			<media:title type="html">6-1-animateloop</media:title>
		</media:content>
	</item>
		<item>
		<title>Session – Microsoft Silverlight Futures: Building Business Focused Applications</title>
		<link>http://stuff.seans.com/2008/10/30/session-%e2%80%93-microsoft-silverlight-futures-building-business-focused-applications/</link>
		<comments>http://stuff.seans.com/2008/10/30/session-%e2%80%93-microsoft-silverlight-futures-building-business-focused-applications/#comments</comments>
		<pubDate>Thu, 30 Oct 2008 04:07:03 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[PDC 2008]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Alexandria]]></category>
		<category><![CDATA[CSLA.NET]]></category>
		<category><![CDATA[Microsoft PDC]]></category>
		<category><![CDATA[pdc08]]></category>
		<category><![CDATA[pdc2008]]></category>
		<category><![CDATA[Rocky Lhotka]]></category>

		<guid isPermaLink="false">http://spsexton.wordpress.com/?p=313</guid>
		<description><![CDATA[PDC 2008, Day #2, Session #3, 1 hr 15 mins
Jamie Cool
In the Silverlight Futures session, Jamie Cool focused on building business applications using Silverlight.  (From now on, when we say “Silverlight”, we really mean “Silverlight 2”).
Jamie started by summarizing the whole thick/thin client thing and reiterating where Silverlight fits in.

WPF apps run natively on your [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=313&subd=spsexton&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p><em>PDC 2008, Day #2, Session #3, 1 hr 15 mins</em></p>
<p><em>Jamie Cool</em></p>
<p>In the Silverlight Futures session, Jamie Cool focused on building business applications using Silverlight.  (From now on, when we say “Silverlight”, we really mean “Silverlight 2”).</p>
<p>Jamie started by summarizing the whole thick/thin client thing and reiterating where Silverlight fits in.</p>
<ul>
<li>WPF apps run natively on your PC
<ul>
<li>Richer UI experience</li>
<li>Better performance</li>
<li>Access to everything on your PC, e.g. file system</li>
</ul>
</li>
<li>ASP.NET web apps run in the browser
<ul>
<li>Broadest reach, running on any platform, any browser</li>
<li>Much more limited UI</li>
<li>Runs in a sandbox, limited access to local resources</li>
</ul>
</li>
<li>Silverlight is somewhere in the middle
<ul>
<li>Runs in your browser</li>
<li>Much better user experience than ASP.NET</li>
<li>Fewer trips back to server, things running on client</li>
<li>Requires client to first download Silverlight runtime</li>
</ul>
</li>
</ul>
<p>People who write business applications hear requests all the time for accessing their apps through a web browser.  In the past, this has meant a radically different and more limited GUI in the form of ASP.NET.  But with Silverlight, you can really have it all&#8212;deliver both rich WPF applications and browser-based applications using Silverlight.  Because Silverlight uses a subset of the .NET Framework, you can even use the same codebase.  (If you’re careful).</p>
<p><strong>Support for Business Apps Using Today’s Platforms</strong></p>
<p>Much of Jamie’s talk focused on a future extension to Silverlight, code-named Alexandria, that would provide a richer framework for allowing business apps hosted in Silverlight to do the kinds of things that they typically need doing.</p>
<p>According to Jamie, business applications have the following characteristics:</p>
<ul>
<li>They are mainly focused on working with data and applying business logic to data</li>
<li>They need
<ul>
<li>A way to move data between tiers</li>
<li>Methods for “shaping” data</li>
<li>Methods for soundly applying business logic to the data</li>
<li>A way to bind data to the user interface</li>
</ul>
</li>
</ul>
<p>In terms of moving data between tiers, Jamie mentioned ADO.NET Data Services as really being the best tool for exposing data stored in a database to a web-based application.  He mentioned the same speaking points as the guys in the Astoria talks&#8212;the ability to expose/consume data using simple a REST protocol.</p>
<p>Jamie also demoed how the Entity Data Model could be used a data layer between the database (or data service) and the application.  He also demoed some of the basics of binding Silverlight controls to the data served up through ADO.NET Data Services.</p>
<p><strong>Futures – A Business Logic Framework</strong></p>
<p>The second half of Jamie’s talk focused on a future extension to Silverlight, code-named Alexandria, that would provide a richer framework for allowing business apps hosted in Silverlight to do the kinds of things that business apps typically need to do.</p>
<p>(Jamie never mentioned “Alexandria”, but he was making use of a namespace that had that name in all of his demos).</p>
<p>Jamie did some basic demos of how Alexandria works.  To start with, you create a class to represent your business object, then set up its data binding and use attributes to specify validation rules.</p>
<p>Hold on just a second!  Alexandria suddenly sounds exactly like Rocky Lhotka’s CSLA.NET Framework&#8212;especially since Rocky is just finishing up a version of CSLA for Silverlight.  With an entire team of developers, Microsoft has managed to develop a framework that Rocky created (mostly) all by himself.</p>
<p>I’m being a little facetious.  I’m really curious what Rocky’s take is on Alexandria, since it seems to fulfill the same basic mission as CSLA.NET.  I don’t know about many of the details of CSLA, but a couple of things occurred to me:</p>
<ul>
<li>CSLA.NET also supports Win Forms and Web Forms, whereas Alexandria appears to be targeted exclusively at Silverlight</li>
<li>CSLA.NET supports a wide variety of transport protocols (anything in WCF, I think), where Alexandria seems to be REST-only</li>
<li>CSLA.NET may not directly support binding to an ADO.NET Data Service, or maybe not as seamlessly as Alexandria</li>
<li>CSLA.NET is open source, so benefit from many improvements that come from the community</li>
</ul>
<p>Anyway, as I said I’m not very knowledgeable about CSLA, but it definitely seemed like Alexandria is targeting the exact same set of business requirements as CSLA.  As with any framework comparison, however, each is certain to have its own strengths and weaknesses and appropriate for a particular category of applications.</p>
<p>Rocky, what is your take on this?  Ditto current users of CSLA.</p>
<br />Posted in PDC 2008, Silverlight Tagged: Alexandria, CSLA.NET, Microsoft PDC, PDC 2008, pdc08, pdc2008, Rocky Lhotka, Silverlight <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/spsexton.wordpress.com/313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/spsexton.wordpress.com/313/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/spsexton.wordpress.com/313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/spsexton.wordpress.com/313/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/spsexton.wordpress.com/313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/spsexton.wordpress.com/313/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/spsexton.wordpress.com/313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/spsexton.wordpress.com/313/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/spsexton.wordpress.com/313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/spsexton.wordpress.com/313/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=313&subd=spsexton&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://stuff.seans.com/2008/10/30/session-%e2%80%93-microsoft-silverlight-futures-building-business-focused-applications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8922e4d5254d602ba3ed32dd073b5a4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">spsexton</media:title>
		</media:content>
	</item>
		<item>
		<title>Session – Developing Applications Using Data Services</title>
		<link>http://stuff.seans.com/2008/10/29/session-%e2%80%93-developing-applications-using-data-services/</link>
		<comments>http://stuff.seans.com/2008/10/29/session-%e2%80%93-developing-applications-using-data-services/#comments</comments>
		<pubDate>Wed, 29 Oct 2008 15:20:51 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[ADO.NET Data Services]]></category>
		<category><![CDATA[PDC 2008]]></category>
		<category><![CDATA[Astoria]]></category>
		<category><![CDATA[Entity Data Model]]></category>
		<category><![CDATA[Microsoft PDC]]></category>
		<category><![CDATA[pdc08]]></category>
		<category><![CDATA[pdc2008]]></category>
		<category><![CDATA[SQL Data Services]]></category>

		<guid isPermaLink="false">http://spsexton.wordpress.com/?p=309</guid>
		<description><![CDATA[PDC 2008, Day #2, Session #2, 1 hr 15 mins
Mike Flasko
Ok, I’m finally starting to understand the very basics of Astoria (now branded ADO.NET Data Services), as well as how it relates to the Entity Data Model and SQL Data Services.
There have been a lot of new data-related services and features coming out of Microsoft [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=309&subd=spsexton&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p><em>PDC 2008, Day #2, Session #2, 1 hr 15 mins</em></p>
<p><em>Mike Flasko</em></p>
<p>Ok, I’m finally starting to understand the very basics of Astoria (now branded ADO.NET Data Services), as well as how it relates to the Entity Data Model and SQL Data Services.</p>
<p>There have been a lot of new data-related services and features coming out of Microsoft lately.  Astoria, SQL Data Services, the Entity Data Model, dynamic data in ASP.NET, etc.  Without understanding what each of them does, it’s hard to see how they all fit together, or when you’d use the different services.</p>
<p>Mike Flasko started this session by talking at the “data services landscape”.  (He had a nice picture that I’d include here if I had a copy).  There are a few points to be made about the various data services:</p>
<ul>
<li>A wide spectrum of data services available</li>
<li>Some you create yourself, some 3rd party</li>
<li>Some on-premises, some hosted/cloud</li>
<li>Characteristics of Microsoft-supplied services
<ul>
<li>Simple REST interface</li>
<li>Uniform interface  (URIs, HTTP, AtomPub) &#8212; i.e. underlying data is different, but you access it in the same way, no matter the service used</li>
</ul>
</li>
</ul>
<p>(By the way, the new buzzword at PDC 2008 is “on premises” data and services&#8212;to be contrasted with data and services that reside “in the cloud”).</p>
<p>ADO.NET Data Services fits in as follows&#8212;it’s a protocol for serving up data from different underlying sources using feeds and a REST-ful interface.</p>
<p>The basic idea behind REST and feeds is that this is a simple HTTP-based protocol&#8212;which means that any tool running on any platform or development stack can make use of it.  For example, because we use a simple HTTP GET request to read data, any browser or software that knows how to access the web can read our data.</p>
<p>REST is basically a way to piggyback classic CRUD data operations on top of existing HTTP verbs.  Here’s how they map:</p>
<ul>
<li>HTTP POST – Create a data item(s?)</li>
<li>HTTP GET – Read one or more data items</li>
<li>HTTP PUT – Update a data item(s?)</li>
<li>HTTP DELETE – Delete a data item(s?)</li>
</ul>
<p>As an example of how you might use ADO.NET Data Services to provide a uniform API to multiple data sources, Mike talked about an application reading/writing data from several different locations:</p>
<ul>
<li>From an on-premises SQL Server database</li>
<li>From SQL Data Services</li>
</ul>
<p>In both cases, you access the data through the ADO.NET Data Services framework, instead of going to SQL Server or the SQL Data service directly.  You can easily add an ADO.NET Data Services layer that sits on top of an on-premises SQL Server databases.  And Mike said that SQL Data Services will support the ADO.NET Data Services conventions.</p>
<p>Mike did a nice demo showing exactly how you might consume on-premises SQL Server data through an ADO.NET Data Services API.  He started by creating a data model using the Entity Data Model framework.  The Entity Data Model is basically just an object/relational mapper that allows you to build a logical data model on top of your physical database.  Once you’ve done this, you just create a service that wires up to the Entity Data Model and exposes its data through ADO.NET Data Services (i.e. a REST-ful interface).</p>
<p>Mike then walked through the actual code for accessing the service that he created.  At this point, you can do everything (Create/Read/Update/Delete) using HTTP POST/GET/PUT/DELETE and simple ASCII URIs.  For example, you can read one or more data elements by just entering the correct URI in your browser.  (Because the browser does an HTTP GET by default).</p>
<p><strong>But… </strong>This does not mean that your application has to traffic exclusively in an HTTP-based API.  It would be ugly to have your .NET managed code doing all of its data access by building up URI strings.  Instead, there is a standard .NET namespace built on top of the REST-based interface that you’d use if you were writing managed code.</p>
<p>This layering of APIs, REST and .NET, might seem crazy.  But the point is that <strong>everything that goes across the wire is REST</strong>.  Microsoft has done this because it’s an open standard and opens up their services to 3rd parties.  It also easily bypasses problems with firewalls.  Finally, they provide an object model on top of the URI goo so that .NET applications can work with managed objects and avoid all of the URI stuff.</p>
<p><strong>Miscellaneous Stuff</strong></p>
<p>Mike also showed how a Silverlight 2 application might make use of ADO.NET Data Services to get its data.  Again, using ADO.NET Data Services gives us a lot of flexibility in how we architect the solution.  In Mike’s case, he had the middle tier (app server) store some data in a local SQL Server and some data up in the cloud using SQL Data Services.</p>
<p>Mike did an excellent job at showing how ADO.NET Data Services fits into the data services landscape at Microsoft.  I’m also glad that he brought the Entity Data Model into his examples, so that we could see where it fits in.</p>
<p>Now I’m just wondering if Mike and his team curse the marketing department every time they have to type “ADO.NET Data Services” rather than “Astoria”.</p>
<br />Posted in ADO.NET Data Services, PDC 2008 Tagged: ADO.NET Data Services, Astoria, Entity Data Model, Microsoft PDC, PDC 2008, pdc08, pdc2008, SQL Data Services <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/spsexton.wordpress.com/309/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/spsexton.wordpress.com/309/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/spsexton.wordpress.com/309/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/spsexton.wordpress.com/309/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/spsexton.wordpress.com/309/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/spsexton.wordpress.com/309/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/spsexton.wordpress.com/309/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/spsexton.wordpress.com/309/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/spsexton.wordpress.com/309/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/spsexton.wordpress.com/309/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=309&subd=spsexton&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://stuff.seans.com/2008/10/29/session-%e2%80%93-developing-applications-using-data-services/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8922e4d5254d602ba3ed32dd073b5a4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">spsexton</media:title>
		</media:content>
	</item>
		<item>
		<title>Session – Live Services: What I Learned Building My First Mesh Application</title>
		<link>http://stuff.seans.com/2008/10/29/session-%e2%80%93-live-services-what-i-learned-building-my-first-mesh-application/</link>
		<comments>http://stuff.seans.com/2008/10/29/session-%e2%80%93-live-services-what-i-learned-building-my-first-mesh-application/#comments</comments>
		<pubDate>Wed, 29 Oct 2008 15:15:17 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[Mesh]]></category>
		<category><![CDATA[PDC 2008]]></category>
		<category><![CDATA[FeedSync]]></category>
		<category><![CDATA[Live Mesh]]></category>
		<category><![CDATA[Microsoft PDC]]></category>
		<category><![CDATA[pdc08]]></category>
		<category><![CDATA[pdc2008]]></category>

		<guid isPermaLink="false">http://spsexton.wordpress.com/?p=305</guid>
		<description><![CDATA[PDC 2008, Day #2, Session #1, 45 mins
Don Gillett
In my next session, Don Gillett explained how he wrote one of the first Live Mesh applications.  Jot is a little note-taking application that allows synchronizing simple lists across instances running on a PC, a phone, or as a “Mesh application” running in your web browser.
Mesh is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=305&subd=spsexton&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p><em>PDC 2008, Day #2, Session #1, 45 mins</em></p>
<p><em>Don Gillett</em></p>
<p>In my next session, Don Gillett explained how he wrote one of the first Live Mesh applications.  Jot is a little note-taking application that allows synchronizing simple lists across instances running on a PC, a phone, or as a “Mesh application” running in your web browser.</p>
<p>Mesh is all about data synchronization and Jot demonstrates how this works.  To start with, the following preconditions must all be set up:</p>
<ul>
<li>User has created a Live Mesh account  (this is free and comes with a free/default amount of storage)</li>
<li>Jot has been installed to the PC and the phone</li>
<li>Jot has been installed in the Mesh desktop as a “Mesh application”</li>
</ul>
<p>At this point, Jot will be able to take advantage of the Mesh platform to automatically synchronize its lists with all three endpoints.</p>
<p>Here’s one possible scenario:</p>
<ul>
<li>John is at home, fires up Jot on his PC and adds “toilet paper” to the “Groceries” list in Jot</li>
<li>Data is automatically synchronized to the other devices in the Mesh&#8212;Jot running on the Mesh desktop and John’s wife’s phone</li>
<li>John’s wife stops at the grocery store on the way home, fires up Jot on her phone and gets the current grocery list, which now includes toilet paper</li>
</ul>
<p>Jot is a very simple application, but it demonstrates the basics of how the Mesh platform works.  It’s primary goal is to synchronize data across multiple devices.</p>
<p>Out of the box, you can synchronize data without creating or running Mesh applications.  You just create a data folder up on the Mesh desktop and then set it up to synchronize on the desired devices.  Changes made to files in the corresponding folders on any of the devices will be automatically pushed out to the other devices, as well as to the folder on the Mesh desktop.</p>
<p>In this out-of-the-box data synch scenario, because the data lives in the Mesh desktop, this supports two main things:</p>
<ul>
<li>Data is always being backed up “to the cloud” because it’s stored in the Mesh</li>
<li>You can access the data from any public web access point by simply going to the Mesh web site</li>
</ul>
<p><strong>Writing Your Own Mesh-Enabled Application</strong></p>
<p>Applications written to support Mesh can take advantage of this cross-device synchronization, <strong>but only for users who have signed up for a Live Mesh account</strong>.</p>
<p>Because this technology is useful only for users who are using Mesh, it remains to be seen how widespread it will be.  If Live Services and Live Mesh aren’t widely adopted, the ecosystem for Mesh applications will be equally limited.</p>
<p>But if do you write an application targeted at Mesh users, the API for subscribing to and publishing Mesh data is very easy to use.  It is simply another .NET namespace that you can get at.  And if you’re writing non-.NET applications, all of the same functionality is available through HTTP, using a REST interface.</p>
<p><strong>What Types of Data Can You Synchronize?</strong></p>
<p>It’s important to remember the Mesh applications aren’t just limited to accessing shared files in shared folders.  Every Mesh application can basically be thought of as a custom data provider and data consumer.  This means two things:</p>
<ul>
<li>It can serve data up to the mesh in any format desired (not just files)</li>
<li>That format is understood by the same app running on other devices</li>
</ul>
<p>As an example, your Mesh application might serve up metadata about files, the files themselves, and combine it with other data local to that device.</p>
<p><strong>The Data Model</strong></p>
<p>Don talked about the underlying data model that your application uses when publishing or consuming data.  It looks something like this:</p>
<p style="padding-left:30px;">Mesh Objects</p>
<p style="padding-left:60px;">Data Feeds</p>
<p style="padding-left:90px;">Data Entries &#8212; optionally pointing to Enclosures</p>
<p>Mesh Objects are the top-level shareable units that your Mesh application traffics in.  They can contain one or more Data Feeds.  If they are too large, synchronization will be too costly, because they will change too often.  If they are too small, or fine-grained, users may get shared data that is incomplete.  What’s important is that a Mesh application gets to decide what data units it wants to serve up to the mesh.</p>
<p>Data Feeds represent a collection of data.</p>
<p>Data Entries are the individual chunks of data within a Data Feed.  Each is uniquely identified.  These are the smallest logical storage units and the chunks that will be synchronized using the underlying synchronization technology.</p>
<p>Enclosures are used when your data grows too large to store directly in an text-based feed.  They are owned by and pointed to by an associated Data Entry.  Media files are an example of data that would be stored in an Enclosure, rather in the Data Entry itself.</p>
<p><strong>The Evolution of a Meshified Application</strong></p>
<p>Don presented a nice plan for how you might start with a simple application and then work towards making it a fully Mesh-aware application:</p>
<ol>
<li>Persist (read/write) data to a local file</li>
<li>Read/write data from/to a local DataFeed object</li>
<li>Utilize FeedSync to read/write your data from/to the Mesh “cloud”</li>
</ol>
<p>Don then walked through an example, building a tiny application that would synch up a list of simple “checklist” objects, containing just a string and an IsChecked Boolean.</p>
<p><strong>Final Thoughts</strong></p>
<p>Don mentioned additional Live Services APIs that your application can take advantage of, in addition to data synchronization:</p>
<ul>
<li>Live ID</li>
<li>Authentication</li>
<li>Contact lists</li>
<li>News Feeds  (who is changing what in Mesh)</li>
</ul>
<p>He also mentioned a couple of tools that are very useful when writing/debugging Mesh applications:</p>
<ul>
<li>Resource Model Browser  (available in the Live Framework SDK)</li>
<li>Fiddler 2, third-party web traffic logger, from <a href="http://fiddlertool.com/fiddler/">fiddlertool.com</a></li>
</ul>
<br />Posted in Mesh, PDC 2008 Tagged: FeedSync, Live Mesh, Mesh, Microsoft PDC, PDC 2008, pdc08, pdc2008 <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/spsexton.wordpress.com/305/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/spsexton.wordpress.com/305/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/spsexton.wordpress.com/305/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/spsexton.wordpress.com/305/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/spsexton.wordpress.com/305/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/spsexton.wordpress.com/305/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/spsexton.wordpress.com/305/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/spsexton.wordpress.com/305/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/spsexton.wordpress.com/305/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/spsexton.wordpress.com/305/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=305&subd=spsexton&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://stuff.seans.com/2008/10/29/session-%e2%80%93-live-services-what-i-learned-building-my-first-mesh-application/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8922e4d5254d602ba3ed32dd073b5a4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">spsexton</media:title>
		</media:content>
	</item>
		<item>
		<title>Keynote #3 – Box, Anderson</title>
		<link>http://stuff.seans.com/2008/10/29/keynote-3-%e2%80%93-box-anderson/</link>
		<comments>http://stuff.seans.com/2008/10/29/keynote-3-%e2%80%93-box-anderson/#comments</comments>
		<pubDate>Wed, 29 Oct 2008 15:06:31 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[Azure]]></category>
		<category><![CDATA[PDC 2008]]></category>
		<category><![CDATA[Don Box]]></category>
		<category><![CDATA[Microsoft PDC]]></category>
		<category><![CDATA[pdc08]]></category>
		<category><![CDATA[pdc2008]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[Windows Azure]]></category>

		<guid isPermaLink="false">http://spsexton.wordpress.com/?p=301</guid>
		<description><![CDATA[PDC 2008, Day #2, Keynote #3, 1.5 hrs
Don Box, Chris Anderson
Don and Chris’ presentation was notable in that they did not use a single Powerpoint slide.  The entire presentation consisted of Don and Chris writing code in Visual Studio.
This will be a short post because Don and Chris went so fast and covered so much [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=301&subd=spsexton&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p><em>PDC 2008, Day #2, Keynote #3, 1.5 hrs</em></p>
<p><em>Don Box, Chris Anderson</em></p>
<p>Don and Chris’ presentation was notable in that they did not use a single Powerpoint slide.  The entire presentation consisted of Don and Chris writing code in Visual Studio.</p>
<p>This will be a short post because Don and Chris went so fast and covered so much stuff that I didn’t make any attempt to take notes on specific techniques.</p>
<p>Their basic demo was to build a simple Azure (cloud-based) service that served up a list of processes running on the server.  They started by writing this service as a “classic” local WCF service, then publishing it on the ServiceBus, to make it available on the cloud.  And finally, they deployed the service into the cloud so that it was being hosted by the Azure servers.</p>
<p>The most important takeaway from this talk was that the service that they wrote was at every point accessible through standards-based protocols.  Azure-based services are accessible through a simple “REST-ful” interface.  The idea of REST is to use the existing GET/PUT/POST/DELETE verbs in HTTP to execute corresponding Read/Update/Create/Delete data operations on the server side.</p>
<p>This session was the hardest to keep up with, mentally, but also the most fun.  Don and Chris traded off talking and coding.  Both were equally quick at talking through explanations of what they’d do next, in moving from a local service to a service published up in the Azure cloud.  And both were equally quick to write the corresponding code in Visual Studio.  They probably used fewer code snippets than any of the other presenters so far at PDC.</p>
<p>All in all, an excellent session, though it did make my head spin.</p>
<br />Posted in Azure, PDC 2008 Tagged: Don Box, Microsoft PDC, PDC 2008, pdc08, pdc2008, REST, Windows Azure <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/spsexton.wordpress.com/301/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/spsexton.wordpress.com/301/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/spsexton.wordpress.com/301/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/spsexton.wordpress.com/301/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/spsexton.wordpress.com/301/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/spsexton.wordpress.com/301/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/spsexton.wordpress.com/301/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/spsexton.wordpress.com/301/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/spsexton.wordpress.com/301/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/spsexton.wordpress.com/301/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=301&subd=spsexton&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://stuff.seans.com/2008/10/29/keynote-3-%e2%80%93-box-anderson/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8922e4d5254d602ba3ed32dd073b5a4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">spsexton</media:title>
		</media:content>
	</item>
		<item>
		<title>Keynote #2 – Ozzie, Sinofsky, Guthrie, Treadwell</title>
		<link>http://stuff.seans.com/2008/10/29/keynote-2-%e2%80%93-ozzie-sinofsky-guthrie-treadwell/</link>
		<comments>http://stuff.seans.com/2008/10/29/keynote-2-%e2%80%93-ozzie-sinofsky-guthrie-treadwell/#comments</comments>
		<pubDate>Wed, 29 Oct 2008 15:02:24 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[Azure]]></category>
		<category><![CDATA[Mesh]]></category>
		<category><![CDATA[PDC 2008]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[pdc08]]></category>
		<category><![CDATA[Windows 7]]></category>
		<category><![CDATA[Microsoft PDC]]></category>
		<category><![CDATA[Live Mesh]]></category>
		<category><![CDATA[Windows Azure]]></category>
		<category><![CDATA[Live Services]]></category>
		<category><![CDATA[Office 14]]></category>
		<category><![CDATA[Ribbon]]></category>
		<category><![CDATA[Multi-touch]]></category>
		<category><![CDATA[Scott Guthrie]]></category>
		<category><![CDATA[Visual Studio 2010]]></category>
		<category><![CDATA[ASP.NET 4]]></category>
		<category><![CDATA[Ray Ozzie]]></category>
		<category><![CDATA[Windows Vista]]></category>
		<category><![CDATA[Sinofsky]]></category>
		<category><![CDATA[pdc2008]]></category>
		<category><![CDATA[cloud computing]]></category>

		<guid isPermaLink="false">http://spsexton.wordpress.com/?p=283</guid>
		<description><![CDATA[PDC 2008, Day #2, Keynote #2, 2 hrs
Ray Ozzie, Steven Sinofsky, Scott Guthrie, David Treadwell
Wow.  In contrast to yesterday’s keynote, where Windows Azure was launched, today’s keynote was the kind of edge-of-your-seat collection of product announcements that explain why people shell out $1,000+ to come to PDC.  The keynote was a 2-hr extravaganza of non-stop [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=283&subd=spsexton&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p><em>PDC 2008, Day #2, Keynote #2, 2 hrs</em></p>
<p><em>Ray Ozzie, Steven Sinofsky, Scott Guthrie, David Treadwell</em></p>
<p>Wow.  In contrast to yesterday’s keynote, where Windows Azure was launched, today’s keynote was the kind of edge-of-your-seat collection of product announcements that explain why people shell out $1,000+ to come to PDC.  The keynote was a 2-hr extravaganza of non-stop announcements and demos.</p>
<p>In short, we got a good dose of Windows 7, as well as new tools in .NET 3.5 SP1, Visual Studio 2008 SP1 and the future release of Visual Studio 2010.  Oh yeah&#8212;and an intro to Office 14, with online web-based versions of all of your favorite Office apps.</p>
<p>Not to mention a new Paint applet with a ribbon interface.  Really.</p>
<p><strong>Ray Ozzie Opening</strong></p>
<p>The keynote started once again today with Ray Ozzie, reminding us of what was announced yesterday&#8212;the Azure Services Platform.</p>
<p><a href="http://spsexton.files.wordpress.com/2008/10/1-0-azureservices.jpg"><img class="alignnone size-full wp-image-284" title="1-0-azureservices" src="http://spsexton.files.wordpress.com/2008/10/1-0-azureservices.jpg?w=549&#038;h=245" alt="" width="549" height="245" /></a></p>
<p>Ray pointed out that while yesterday focused on the back-end, today’s keynote would focus on the front-end: new features and technologies from a user’s perspective.</p>
<p>He pointed out that the desktop-based PC and the internet are still two completely separate world.  The PC is where we sit when running high-performance close-to-the-metal applications.  And the web is how we access the rest of the world, finding and accessing other people and information.</p>
<p>Ray also talked about the phone being the third main device where people spend their time.  It’s always with us, so can respond to our spontaneous need for information.</p>
<p>The goal for Microsoft, of course, is that applications try to span all three of these devices&#8212;the desktop PC, the web, and the phone.  The apps that can do this, says Ozzie, will deliver the greatest value.</p>
<p>It’s no surprise either that Ray mentioned Microsoft development tools as providing the best platform for developing these apps that will span the desktop/web/phone silos.</p>
<p>Finally, Ray positioned Windows 7 as being the best <strong>platform </strong>for users, since we straddle these three worlds.</p>
<p><strong>Steven Sinofsky</strong></p>
<p>Next up was Steven Sinofsky,Senior VP for Windows and Windows Live Engineering Group at Microsoft. Steven’s part of the keynote was to introduce Windows 7.  Here are a couple of tidbits:</p>
<ul>
<li>Windows 7 now in pre-beta</li>
<li>Today’s pre-beta represents “M3”&#8212;a feature-complete milestone on the way to Beta and eventual RTM.  (The progression is M1/M2/M3/M4/Beta)</li>
<li>The beta will come out early in 2009</li>
<li>Release still targeted at 3-yrs after the RTM of Vista, putting it at November of 2009</li>
<li>Server 2008 R2 is also in pre-beta, sharing its kernel with Windows 7</li>
</ul>
<p>Steven mentioned three warm-fuzzies that Windows 7 would focus on:</p>
<ul>
<li>Focus on the personal experience</li>
<li>Focus on connecting devices</li>
<li>Focus on bringing functionality to developers</li>
</ul>
<p><strong>Julie Larson-Green &#8212; Windows 7 Demo</strong></p>
<p>Next up was Julie Larson-Green, Corporate VP, Windows Experience.  She took a spin through Windows 7 and showed off a number of the new features and capabilities.</p>
<p>New taskbar</p>
<ul>
<li>Combines Alt-Tab for task switching, current taskbar, and current quick launch</li>
<li>Taskbar includes icons for running apps, as well as non-running (icons to launch apps)</li>
<li>Can even switch between IE tabs from the taskbar, or close tabs</li>
<li>Can close apps directly from the taskbar</li>
<li>Can access app’s MRU lists from the taskbar (recent files)</li>
<li>Can drag/dock windows on desktop, so that they quickly take exactly half available real estate</li>
</ul>
<p>Windows Explorer</p>
<ul>
<li>New <em>Libraries </em>section
<ul>
<li>A library is a virtual folder, providing access to one or more physical folders</li>
<li>Improved search within a library, i.e. across a subset of folders</li>
</ul>
</li>
</ul>
<p>Home networking</p>
<ul>
<li>Automatic networking configuration when you plug a machine in, connecting to new “Homegroup”</li>
<li>Automatic configuration of shared resources, like printers</li>
<li>Can search across entire Homegroup (don’t need to know what machine a file lives on)</li>
</ul>
<p>Media</p>
<ul>
<li>New lightweight media player</li>
<li>Media center libraries now shared &amp; integrated with Windows Explorer</li>
<li>Right-click on media and select device to play on, e.g. home stereo</li>
</ul>
<p>Devices</p>
<ul>
<li>New Device Stage window, summarizing all the operations you can perform with a connected device (e.g. mobile device)</li>
<li>Configure the mobile device directly from this view</li>
</ul>
<p>Gadgets</p>
<ul>
<li>Can now exist on your desktop even without the sidebar being present</li>
</ul>
<p>Miscellaneous</p>
<ul>
<li>Can share desktop themes with other users</li>
<li>User has full control of what icons appear in system tray</li>
<li>New <em>Action Center </em>view is central place for reporting on PC’s performance and health characteristics</li>
</ul>
<p>Multi-touch capabilities</p>
<ul>
<li>Even apps that are not touch-aware can leverage basic gestures (e.g. scrolling/zooming).  Standard mouse behaviors are automatically mapped to equivalent gestures</li>
<li>Internet Explorer has been made touch-aware, for additional functionality:
<ul>
<li>On-screen keyboard</li>
<li>Navigate to hyperlink by touching it</li>
<li>Back/Forward with flick gesture</li>
</ul>
</li>
</ul>
<p>Applet updates</p>
<ul>
<li>Wordpad gets Ribbon UI</li>
<li>MS Paint gets Ribbon UI</li>
<li>New calculator applet with separate Scientific / Programmer / Statistics modes</li>
</ul>
<p><strong>Sinofsky Redux</strong></p>
<p>Sinofsky returned to touch on a few more points for Windows 7:<strong><br />
</strong></p>
<ul>
<li>Connecting to Live Services</li>
<li>Vista “lessons learned”</li>
<li>How developers will view Windows 7</li>
</ul>
<p>Steve talked briefly about how Windows 7 will more seamlessly allow users to connect to “Live Essentials”, extending their desktop experience to the cloud.  It’s not completely clear what this means.  He mentioned the user choosing their own non-Microsoft services to connect to.  I’m guessing that this is about some of the Windows 7 UI bits being extensible and able to incorporate data from Microsoft Live services.  Third party services could presumably also provide content to Windows 7, assuming that they implemented whatever APIs are required.</p>
<p>The next segment was a fun one&#8212;Vista “lessons learned”.  Steve made a funny reference to all of the feedback that Microsoft has gotten on Vista, including a particular TV commercial.  It was meant as a clever joke, but Steve didn’t get that many laughs&#8212;likely because it was just too painfully true.</p>
<p>Here are the main lessons learned with Vista.  (I’ve changed the verb tense slightly, so that we can read this as more of a confession).</p>
<ul>
<li>The ecosystem wasn’t ready for us.
<ul>
<li>Ecosystem required lots of work to get to the point where Vista would run on everything</li>
<li>95% of all PCs running today are indeed able to run Vista</li>
<li><em>Windows 7 is based on the same kernel, so we won’t run into this problem again</em></li>
</ul>
</li>
<li>We didn’t adhere to standards
<ul>
<li>He’s talking about IE7 here</li>
<li>IE8 addresses that, with full CSS standards compliance</li>
<li>They’ve even released their compliance test results to the public</li>
<li><em>Win 7 ships with IE8, so we’re fully standards-compliant, out of the box</em></li>
</ul>
</li>
<li>We broke application compatibility
<ul>
<li>With UAC, applications were forced to support running as a standard user</li>
<li>It was painful</li>
<li>We had good intentions and Vista is now more secure</li>
<li>But we realize that UAC is still horribly annoying</li>
<li><em>Most software now supports running as a standard user</em></li>
</ul>
</li>
<li>We delivered features, rather than solutions to typical user scenarios
<ul>
<li>E.g. Most typical users have no hope of properly setting up a home network</li>
<li>Microsoft failed to deliver the “last mile” of required functionality</li>
<li><em>Much better in Windows 7, with things like automatic network configuration</em></li>
</ul>
</li>
</ul>
<p>The read-between-the-lines takeaway is <strong>we won’t make these same mistakes with Windows 7</strong>.  That’s a clever message.  The truth is that these shortcomings have basically already been addressed in Vista SP1.  So because Windows 7 is essentially just the next minor rev of Vista, it inherits the same solutions.</p>
<p>But there is one shortcoming with Vista that Sinofsky failed to mention&#8212;branding.  Vista is still called “Vista” and the damage is already done.  There are users out there who will <strong>never </strong>upgrade to Vista, no matter what marketing messages we throw at them.  For these users, we have <strong>Windows 7</strong>&#8212;a shiny new brand to slap on top of Vista, which is in fact a stable platform.</p>
<p>This is a completely reasonable tactic.  Vista basically works great&#8212;the only remaining problem is the perception of its having not hit the mark.  And Microsoft’s goal is to <strong>create the perception that Windows 7 is everything that Vista was not</strong>.</p>
<p>Enough ranting.  On to Sinofsky’s list of things that Windows 7 provides for Windows developers:</p>
<ul>
<li>The ribbon UI
<ul>
<li>The new Office ribbon UI element has proved itself in the various Office apps.  So it’s time to offer it up to developers as a standard control</li>
<li>The ribbon UI will also gradually migrate to other Windows/Microsoft applications</li>
<li>In Windows 7, we now get the ribbon in Wordpad and Paint.  (I’m also suspecting that they are now WPF applications)</li>
</ul>
</li>
</ul>
<p><a href="http://spsexton.files.wordpress.com/2008/10/1-1-paintribbon1.jpg"><img class="alignnone size-full wp-image-289" title="1-1-paintribbon1" src="http://spsexton.files.wordpress.com/2008/10/1-1-paintribbon1.jpg?w=664&#038;h=174" alt="" width="664" height="174" /></a></p>
<p><a href="http://spsexton.files.wordpress.com/2008/10/1-2-wordpadribbon.jpg"><img class="alignnone size-full wp-image-290" title="1-2-wordpadribbon" src="http://spsexton.files.wordpress.com/2008/10/1-2-wordpadribbon.jpg?w=872&#038;h=202" alt="" width="872" height="202" /></a></p>
<ul>
<li>Jump lists
<ul>
<li>These are new context menus built into the taskbar that applications can hook into</li>
<li>E.g. For “most recently used” file lists</li>
</ul>
</li>
<li>Libraries
<ul>
<li>Apps can make use of new Libraries concept, loading files from libraries rather than folders</li>
</ul>
</li>
<li>Multi-touch, Ink, Speech
<ul>
<li>Apps can leverage new input mechanisms</li>
<li>These mechanisms just augment the user experience</li>
<li>New/unique hardware allows for some amazing experiences</li>
</ul>
</li>
<li>DirectX family
<ul>
<li>API around powerful graphics hardware</li>
<li>Windows 7 extends the DirectX APIs</li>
</ul>
</li>
</ul>
<p>Next, Steven moved on to talk about basic <strong>fundamentals </strong>that have been improved in Windows 7:</p>
<p><span style="text-decoration:underline;">Decrease</span></p>
<ul>
<li>Memory &#8212; kernel has smaller memory footprint</li>
<li>Disk I/O &#8212; reduced registry reads and use of indexer</li>
<li>Power  &#8212; DVD playback cheaper, ditto for timers</li>
</ul>
<p><span style="text-decoration:underline;">Increase</span></p>
<ul>
<li>Speed  &#8212; quicker boot time, device-ready time</li>
<li>Responsiveness  &#8212; worked hard to ensure Start Menu always very responsive</li>
<li>Scale  &#8212; can scale out to 256 processors</li>
</ul>
<p>Yes, you read that correctly&#8212;256 processors!  Hints of things to come over the next few years on the hardware side.  Imagine how slow your single-threaded app will appear to run when running on a 256-core machine!</p>
<p>Sinofsky at this point ratcheted up and went into a sort of <em>but wait, there’s more </em>mode that would put Ron Popeil to shame.  Here are some other nuggets of goodness in Windows 7:</p>
<ul>
<li>Bitlocker encryption for memory sticks
<ul>
<li>No more worries when you lose these</li>
</ul>
</li>
<li>Natively mount/managed Virtual Hard Drives
<ul>
<li>Create VHDs from within Windows</li>
<li>Boot from VHDs</li>
</ul>
</li>
<li>DPI
<ul>
<li>Easier to set DPI and work with it</li>
<li>Easier to manage multiple monitors</li>
</ul>
</li>
<li>Accessibility
<ul>
<li>Built-in magnifier with key shortcuts</li>
</ul>
</li>
<li>Connecting to an external projector in Alt-Tab fashion
<ul>
<li>Could possibly be the single most important reason for upgrading to Win 7</li>
</ul>
</li>
<li>Remote Desktop can now access multiple monitors</li>
<li>Can move Taskbar all over the place</li>
<li>Can customize the shutdown button  <em>(cheers)</em></li>
<li>Action Center allows turning off annoying messages from various subsystems</li>
<li>New slider that allows user to tweak the “annoying-ness” of UAC<em> (more cheers)</em></li>
</ul>
<p>As a final note, Sinofsky mentioned that as developers, we had damn well all be developing for 64-bit platforms.  Windows 7 is likely to ship a good percentage of new boxes on x64.  (His language wasn’t this strong, but that was the message).</p>
<p><strong>Scott Guthrie</strong></p>
<p>As wilted as we all were with the flurry of Windows 7 takeaways, we were only about half done.  Scott Guthrie, VP, Developer Division at Microsoft, came on stage to talk about development tools.</p>
<p>He started by pointing out that you can target Windows 7 features from both managed (.NET) and native (Win32) applications.  Even C++/MFC are being updated to support some of the new features in Windows 7.</p>
<p>Scott talked briefly about the .NET Framework 3.5 SP1, which has already released:</p>
<ul>
<li>Streamlined setup experience</li>
<li>Improved startup times for managed apps  (up to 40% improvement to cold startup times)</li>
<li>Graphics improvements, better performance</li>
<li>DirectX interop</li>
<li>More controls</li>
<li>3.5 SP1 built into Windows 7</li>
</ul>
<p>Scott then demoed taking an existing WPF application and adding support for Windows 7 features:</p>
<ul>
<li>He added a ribbon at the top of the app</li>
<li>Add JumpList support for MRU lists in the Windows taskbar</li>
<li>Added Multi-touch support</li>
</ul>
<p>Scott announced a new WPF toolkit being released this week that includes:</p>
<ul>
<li>DatePicker, DataGrid, Calendar controls</li>
<li>Visual State Manager support (like Silverlight 2)</li>
<li>Ribbon control  (CTP for now)</li>
</ul>
<p>Scott talked about some of the basics coming in .NET 4 (coming sometime in 2009?):</p>
<ul>
<li>Different versions of .NET CLR running SxS in the same process</li>
<li>Easier managed/native interop</li>
<li>Support for dynamic languages</li>
<li>Extensibility Component Model (MEF)</li>
</ul>
<p>At this point, Scott also starts dabbling in the but wait, there’s more world, as he demoed Visual Studio 2010:</p>
<ul>
<li>Much better design-time support for WPF</li>
<li><em><strong>Visual Studio itself now rewritten in WPF</strong></em></li>
<li>Multi-monitor support</li>
<li>More re-factoring support</li>
<li>Better support for Test Driven Development workflow</li>
<li>Can easily create plugins using MEF</li>
</ul>
<p>Whew.  Now he got to the truly sexy part&#8212;probably the section of the keynote that got the biggest reaction out of the developer crowd.  Scott showed off a little “third party” Visual Studio plug-in that pretty-formatted XML comments (e.g. function headers) as little graphical WPF widgets.  Even better, the function headers, now graphically styled, also contained hot links right into a local bug database.  Big cheers.</p>
<p>Sean’s prediction&#8212;this will lead to a new ecosystem for Visual Studio plugins and interfaces to other tools.</p>
<p>Another important takeaway&#8212;MEF, the new extensibility framework, isn’t just for Visual Studio.  You can also use MEF to extend your own applications, creating your own framework.</p>
<p><strong>Tesco.com Demo of Rich WPF Client Application</strong></p>
<p>Here we got our obligatory partner demo, as a guy from Tesco.com showed off their snazzy application that allowed users to order groceries.  Lots of 2D and 3D graphical effects&#8212;one of the more compelling WPF apps that I’ve seen demoed.</p>
<p><strong>Scott Redux</strong></p>
<p>Scott came back out to talk a bit about new and future offerings on the web development side of things.</p>
<p>Here are some of the ASP.NET improvements that were delivered with .NET 3.5 SP1:</p>
<ul>
<li>Dynamic Data</li>
<li>REST support</li>
<li>MVC (Model-View-Controller framework)</li>
<li>AJAX / jQuery  (with jQuery intellisense in Visual Studio 2008)</li>
</ul>
<p>ASP.NET 4 will include:</p>
<ul>
<li>Web Forms improvements</li>
<li>MVC improvements</li>
<li>AJAX improvements</li>
<li>Richer CSS support</li>
<li>Distributed caching</li>
</ul>
<p>Additionally, Visual Studio 2010 will include better support for web development:</p>
<ul>
<li>Code-focused improvements  (??)</li>
<li>Better JavaScript / AJAX tooling</li>
<li>Design View CSS2 support</li>
<li>Improved publishing and deployment</li>
</ul>
<p>Scott then switched gears to talk about new and future offerings for Silverlight.</p>
<p>Silverlight 2 was just RTM’d two weeks ago.  Additionally, Scott presented two very interesting statistics:</p>
<ul>
<li>Silverlight 1 is now present on 25% of all Internet-connected machines</li>
<li>Silverlight 2 has been downloaded to 100 million machines</li>
</ul>
<p>IIS will inherit the adaptive (smooth) media streaming that was developed for the NBC Olympics web site.  This is available today.</p>
<p>A new Silverlight toolkit is being released today, including:</p>
<ul>
<li>Charting controls, TreeView, DockPanel, WrapPanel, ViewBox, Expander, NumericUpDown, AutoComplete et al</li>
<li>Source code will also be made available</li>
</ul>
<p>Visual Studio 2010 will ship with a Silverlight 2 designer, based on the existing WPF designer.</p>
<p>We should also expect a major release of Silverlight next year, including things like:</p>
<ul>
<li>H264 media support</li>
<li><em><strong>Running Silverlight applications outside of the browser</strong></em></li>
<li>Richer graphics support</li>
<li>Richer data-binding support</li>
</ul>
<p>Whew.  Take a breath..</p>
<p><strong>David Treadwell – Live Services</strong></p>
<p>While we were all still reeling from Scott Gu’s segment, David Treadweall, Corporate VP, Live Platform Services at Microsoft, came out to talk about Live Services.</p>
<p>The Live Services offerings are basically a set of services that allow applications to interface with the various Windows Live properties.</p>
<p>The key components of Live Services are:</p>
<ul>
<li>Identity – Live ID and federated identity</li>
<li>Directory – access to social graph through a Contacts API</li>
<li>Communication &amp; Presence – add Live Messenger support directly to your web site</li>
<li>Search &amp; Geo-spatial – including mashups on your web sites</li>
</ul>
<p>The Live Services are all made available via standards-based protocols.  This means that you can invoke them from not only the .NET development world, but also from other development stacks.</p>
<p>David talked a lot about Live Mesh, a key component of Live Services:</p>
<ul>
<li>Allows applications to bridge Users / Devices / Applications</li>
<li>Data synchronization is a core concept</li>
</ul>
<p>Applications access the various Live Services through a new Live Framework:</p>
<ul>
<li>Set of APIs that allow apps to get at Live Services</li>
<li>Akin to CLR in desktop environment</li>
<li>Live Framework available from PC / Web / Phone applications</li>
<li>Open protocol, based on REST, callable from anything</li>
</ul>
<p><strong>Ori Amiga Demo</strong></p>
<p>Ori Amiga came out to do a quick demonstration of how to “Meshify” an existing application.</p>
<p>The basic idea of Mesh is that it allows applications to synchronize data across all of a user’s devices.  But importantly, this means&#8212;for users who have already signed up for Live Mesh.</p>
<p>Live Mesh supports storing the user’s data “in the cloud”, in addition to on the various devices.  But this isn’t required.  Applications could use Mesh merely as a transport mechanism between instances of the app on various devices.</p>
<p><strong>Takeshi Numoto – The Closer</strong></p>
<p>Finally, Takeshi Numoto, GM, Office Client at Microsoft, came out to talk about Office 14.</p>
<p>Office 14 will deliver <strong>Office Web Applications</strong>&#8212;lightweight versions of the various Office applications that run in a browser.  Presumably they can also store all of their data in the cloud.</p>
<p>Takeshi then did a demo that focused a bit more on the collaboration features of Office 14 than on the ability to run apps in the browser.  (Running in the browser just works and the GUI looks just like the rich desktop-based GUI).</p>
<p>Takeshi showed off some pretty impressive features and use cases:</p>
<ul>
<li>Two users editing the same document at the same time, both able to write to it</li>
<li>As users change pieces of the document, little graphical widget shows up on the other user’s screen, showing what piece the first user is currently changing.  All updated automatically, in real-time</li>
<li>Changes are pushed out immediately to other users who are viewing/editing the same document</li>
<li>This works in Word, Excel, and OneNote  (at least these apps were demoed)</li>
<li>Can publish data out to data stores in Live Services</li>
</ul>
<p><strong>Ray’s Wrapup</strong></p>
<p>Ray Ozzie came back out to wrap everything up.  He pointed out that everything we’d seen today was real.  He also pointed out that some of these technologies were more “nascent” than others.  In other words&#8212;no complaints if some bits don’t work perfectly.  It seemed an odd note to end on.</p>
<br />Posted in Azure, Mesh, PDC 2008, Silverlight Tagged: ASP.NET 4, cloud computing, Live Mesh, Live Services, Microsoft PDC, Multi-touch, Office 14, PDC 2008, pdc08, pdc2008, Ray Ozzie, Ribbon, Scott Guthrie, Silverlight, Sinofsky, Visual Studio 2010, Windows 7, Windows Azure, Windows Vista <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/spsexton.wordpress.com/283/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/spsexton.wordpress.com/283/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/spsexton.wordpress.com/283/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/spsexton.wordpress.com/283/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/spsexton.wordpress.com/283/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/spsexton.wordpress.com/283/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/spsexton.wordpress.com/283/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/spsexton.wordpress.com/283/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/spsexton.wordpress.com/283/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/spsexton.wordpress.com/283/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stuff.seans.com&blog=4003566&post=283&subd=spsexton&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://stuff.seans.com/2008/10/29/keynote-2-%e2%80%93-ozzie-sinofsky-guthrie-treadwell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8922e4d5254d602ba3ed32dd073b5a4e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">spsexton</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2008/10/1-0-azureservices.jpg" medium="image">
			<media:title type="html">1-0-azureservices</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2008/10/1-1-paintribbon1.jpg" medium="image">
			<media:title type="html">1-1-paintribbon1</media:title>
		</media:content>

		<media:content url="http://spsexton.files.wordpress.com/2008/10/1-2-wordpadribbon.jpg" medium="image">
			<media:title type="html">1-2-wordpadribbon</media:title>
		</media:content>
	</item>
	</channel>
</rss>