<?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>Programmer Payback</title>
	<atom:link href="http://programmerpayback.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://programmerpayback.com</link>
	<description>Giving a little back to my fellow programmers</description>
	<lastBuildDate>Thu, 11 Mar 2010 19:45:19 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='programmerpayback.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/661984c7f840feb03ac8bd5dba27cbdb?s=96&#038;d=http://s2.wp.com/i/buttonw-com.png</url>
		<title>Programmer Payback</title>
		<link>http://programmerpayback.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://programmerpayback.com/osd.xml" title="Programmer Payback" />
	<atom:link rel='hub' href='http://programmerpayback.com/?pushpress=hub'/>
		<item>
		<title>Use Silverlight Reactive Extensions (Rx) to build responsive UIs</title>
		<link>http://programmerpayback.com/2010/03/11/use-silverlight-reactive-extensions-rx-to-build-responsive-uis/</link>
		<comments>http://programmerpayback.com/2010/03/11/use-silverlight-reactive-extensions-rx-to-build-responsive-uis/#comments</comments>
		<pubDate>Thu, 11 Mar 2010 19:45:19 +0000</pubDate>
		<dc:creator>Tim Greenfield</dc:creator>
				<category><![CDATA[Silverlight tips and tricks]]></category>
		<category><![CDATA[Reactive extensions]]></category>
		<category><![CDATA[Rx]]></category>
		<category><![CDATA[silverlight]]></category>

		<guid isPermaLink="false">http://programmerpayback.com/?p=529</guid>
		<description><![CDATA[Use reactive extensions in Silverlight to easily build responsive applications. In this post, we will build a super simple Silverlight app that updates a ListBox with and without Rx.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programmerpayback.com&blog=5145140&post=529&subd=programmerpayback&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>If you haven&#8217;t heard of Reactive extensions (Rx) for .NET, it&#8217;s time to get familar. Rx is extremely cool and once you understand it, it will change the way you write client-side code forever. Instead of providing an overview of Rx, I&#8217;m going to urge readers to check out <a href="http://www.silverlightshow.net/items/Using-Reactive-Extensions-in-Silverlight.aspx">Pencho Popadiyn&#8217;s blog post</a>, where he does a much better job of explaining it that I probably could.</p>
<p>Instead, I&#8217;m going to demonstrate one practical use for Rx extensions here in my 2 part blog. Yes, 2 parts! That&#8217;s how cool I think Rx is. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  And keep in mind that I&#8217;m only scratching the surface on the ways Rx can be used. Enough fanfair, let&#8217;s get started by building a super simple Silverlight app that updates a ListBox with and without Rx and you be the judge of which is better.</p>
<p>Let&#8217;s work backwards by looking at the end result first and then going over how to create it.</p>
<p><a href="http://programmerpayback.s3.amazonaws.com/RxTest.html"><strong>Click here to run</strong></a></p>
<p><a href="http://cid-829bad56e1f5cacd.skydrive.live.com/self.aspx/Public/Rx.zip">Download source code here</a></p>
<p><span style="color:#0000ff;"><strong>Now, here&#8217;s how it works&#8230;</strong></span></p>
<p><strong><span style="color:#0000ff;">Step 1:</span></strong> <a href="http://msdn.microsoft.com/en-us/devlabs/ee794896.aspx">Download and install Rx for Silverlight</a> (link about one page down on the right hand side).</p>
<p><span style="color:#0000ff;"><strong>Step 2:</strong></span> In your Silverlight 3 project, Add a reference to the 3 Rx assemblies: <strong>System.CoreEx</strong>, <strong>System.Observable</strong>, &amp; <strong>System.Reactive</strong>.</p>
<p><a href="http://programmerpayback.files.wordpress.com/2010/03/rxreferences.png"><img class="alignnone size-full wp-image-560" title="RxReferences" src="http://programmerpayback.files.wordpress.com/2010/03/rxreferences.png?w=500&#038;h=356" alt="" width="500" height="356" /></a></p>
<p>Note: The 3 files only add ~70K to your .xap file.</p>
<p><span style="color:#0000ff;"><strong>Step 3:</strong></span> Create a function that returns a model. For this example, we&#8217;ll just have an IEnumerable&lt;String&gt; as our model and <strong>I&#8217;ll toss in a delay between each item so we can exagerate the difference between Rx and non-Rx</strong>.</p>
<div style="font-family:Courier New;font-size:10pt;color:black;background:white;">
<pre style="margin:0;"><span style="color:blue;">public</span> <span style="color:blue;">static</span> <span style="color:#2b91af;">IEnumerable</span>&lt;<span style="color:blue;">string</span>&gt; GetModel()</pre>
<pre style="margin:0;">{</pre>
<pre style="margin:0;">    <span style="color:blue;">for</span> (<span style="color:blue;">int</span> i = 0; i &lt; 5; ++i)</pre>
<pre style="margin:0;">    {</pre>
<pre style="margin:0;">        System.Threading.<span style="color:#2b91af;">Thread</span>.Sleep(500);</pre>
<pre style="margin:0;">        <span style="color:blue;">yield</span> <span style="color:blue;">return</span> <span style="color:#a31515;">"Item "</span> + i;</pre>
<pre style="margin:0;">    }</pre>
<pre style="margin:0;">}</pre>
</div>
<p><span style="color:#0000ff;"><strong>Step 4:</strong></span> The standard way to put that model into our ListBox would be to assign it (the IEnumerable) to ListBox.ItemsSource. However, for the sake of an apples to apples comparison, I&#8217;ll manually loop thru my model and insert each item into an ObservableCollection that is bound to the ListBox.</p>
<div style="font-family:Courier New;font-size:10pt;color:black;background:white;">
<pre style="margin:0;"><span style="color:green;">//MyList.ItemsSource = GetModel();</span></pre>
<pre style="margin:0;"><span style="color:blue;">var</span> items = <span style="color:blue;">new</span> <span style="color:#2b91af;">ObservableCollection</span>&lt;<span style="color:blue;">string</span>&gt;();</pre>
<pre style="margin:0;">MyList.ItemsSource = items;</pre>
<pre style="margin:0;"><span style="color:blue;">foreach</span> (<span style="color:blue;">string</span> item <span style="color:blue;">in</span> GetModel())</pre>
<pre style="margin:0;">    items.Add(item);</pre>
</div>
<p><span style="color:#0000ff;"><strong>Step 5:</strong></span> Rx magic time! First, I&#8217;ll write similar code as in Step 4 but using Rx&#8230;</p>
<div style="font-family:Courier New;font-size:10pt;color:black;background:white;">
<pre style="margin:0;"><span style="color:blue;">var</span> items = <span style="color:blue;">new</span> <span style="color:#2b91af;">ObservableCollection</span>&lt;<span style="color:blue;">string</span>&gt;();</pre>
<pre style="margin:0;">MyList.ItemsSource = items;</pre>
<pre style="margin:0;"><span style="color:#2b91af;">IObservable</span>&lt;<span style="color:blue;">string</span>&gt; observable = GetModel().ToObservable();</pre>
<pre style="margin:0;">observable.Subscribe(item =&gt; items.Add(item));</pre>
</div>
<p>Instead of iterating through the IEnumerable, we create an Observable object from our IEnumerable using the .ToObservable extension method. Then, we subscribe to that observer which tells it to iterate over the collection and run our lamba expression for each item. Bottom line: same result.</p>
<p><strong><span style="color:#0000ff;">Step 6:</span></strong> More Rx magic. Let&#8217;s use the power of multi-threading and get our model to be created on a background thread, while we add our items to our observable collection (in order to avoid an invalid cross thread exception). We just have to change the last two lines a little bit..</p>
<div style="font-family:Courier New;font-size:10pt;color:black;background:white;">
<pre style="margin:0;"><span style="color:#2b91af;">IObservable</span>&lt;<span style="color:blue;">string</span>&gt; observable = GetModel()</pre>
<pre style="margin:0;">    .ToObservable(System.Concurrency.<span style="color:#2b91af;">Scheduler</span>.NewThread);</pre>
<pre style="margin:0;">observable.ObserveOnDispatcher().Subscribe(item =&gt; items.Add(item));</pre>
</div>
<p>Passing in NewThread to .ToObservable() causes the GetModel function to run on a new thread and .ObserveOnDispatcher() causes our Subscription callbacks to run through the dispatcher (therefore allowing us to update the UI). The end result is a UI left totally responsive while the model is manufactured on it&#8217;s own thread and each new model item appears as soon as possible in the UI.</p>
<p>This is certainly possible to do by running GetModel() on a new thread and calling Dispatcher.BeginInvoke for each item. Afterall, this is what Rx is doing internally for us, but I personally think the Rx code is much more readable and writeable.</p>
<p><span style="color:#0000ff;"><strong>Next to come:</strong></span> Combining M-V-VM, Rx, and unbuffered REST webservices for clean, easy, and hyper responsive applications that need to communicate with the server!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/programmerpayback.wordpress.com/529/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/programmerpayback.wordpress.com/529/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/programmerpayback.wordpress.com/529/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/programmerpayback.wordpress.com/529/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/programmerpayback.wordpress.com/529/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/programmerpayback.wordpress.com/529/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/programmerpayback.wordpress.com/529/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/programmerpayback.wordpress.com/529/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/programmerpayback.wordpress.com/529/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/programmerpayback.wordpress.com/529/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programmerpayback.com&blog=5145140&post=529&subd=programmerpayback&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://programmerpayback.com/2010/03/11/use-silverlight-reactive-extensions-rx-to-build-responsive-uis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Tim Greenfield</media:title>
		</media:content>

		<media:content url="http://programmerpayback.files.wordpress.com/2010/03/rxreferences.png" medium="image">
			<media:title type="html">RxReferences</media:title>
		</media:content>
	</item>
		<item>
		<title>Cool demonstration of Silverlight VideoBrush</title>
		<link>http://programmerpayback.com/2010/03/07/cool-demonstration-of-silverlight-videobrush/</link>
		<comments>http://programmerpayback.com/2010/03/07/cool-demonstration-of-silverlight-videobrush/#comments</comments>
		<pubDate>Sun, 07 Mar 2010 19:21:44 +0000</pubDate>
		<dc:creator>Tim Greenfield</dc:creator>
				<category><![CDATA[Silverlight tips and tricks]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[online jigsaw puzzles]]></category>
		<category><![CDATA[silverlight]]></category>
		<category><![CDATA[VideoBrush]]></category>

		<guid isPermaLink="false">http://programmerpayback.com/?p=533</guid>
		<description><![CDATA[A fun and novel use of the VideoBrush in Silverlight.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programmerpayback.com&blog=5145140&post=533&subd=programmerpayback&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>Silverlight provides a variety of <a href="http://msdn.microsoft.com/en-us/library/cc189003(VS.95).aspx">brushes</a> that can be used to paint just about any area in your app: from text to shapes to borders. The most common brushes are for painting color and images: <a href="http://msdn.microsoft.com/en-us/library/system.windows.media.solidcolorbrush(VS.95).aspx">SolidColorBrush</a>, <a href="http://msdn.microsoft.com/en-us/library/system.windows.media.lineargradientbrush(VS.95).aspx">LinearGradientBrush</a>, <a href="http://msdn.microsoft.com/en-us/library/system.windows.media.radialgradientbrush(VS.95).aspx">RadialGradiantBrush</a>, and <a href="http://msdn.microsoft.com/en-us/library/system.windows.media.imagebrush(VS.95).aspx">ImageBrush</a>.</p>
<p>However, today I paired the less common <a href="http://msdn.microsoft.com/en-us/library/system.windows.media.videobrush(VS.95).aspx">VideoBrush</a> with an unusual visual element. <strong>Click below</strong> to see a demonstration of a fun and novel use of the VideoBrush in Silverlight:</p>
<h1><a href="http://PuzzleTouch.com/?puzzle=oot154">Video Jigsaw Puzzle</a></h1>
<p> </p>
<p>Note: PuzzleTouch also now allows you to create your own video puzzles using .wmv or .mp4 files. All work is done 100% on the client! To create your own video puzzle, go to the <a href="http://PuzzleTouch.com">Online Jigsaw Puzzles by PuzzleTouch</a> homepage, choose &#8220;Custom Puzzle&#8221;, and have fun!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/programmerpayback.wordpress.com/533/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/programmerpayback.wordpress.com/533/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/programmerpayback.wordpress.com/533/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/programmerpayback.wordpress.com/533/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/programmerpayback.wordpress.com/533/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/programmerpayback.wordpress.com/533/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/programmerpayback.wordpress.com/533/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/programmerpayback.wordpress.com/533/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/programmerpayback.wordpress.com/533/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/programmerpayback.wordpress.com/533/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programmerpayback.com&blog=5145140&post=533&subd=programmerpayback&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://programmerpayback.com/2010/03/07/cool-demonstration-of-silverlight-videobrush/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Tim Greenfield</media:title>
		</media:content>
	</item>
		<item>
		<title>SuperStackPanel = Grid + StackPanel</title>
		<link>http://programmerpayback.com/2010/02/25/superstackpanel-grid-stackpanel/</link>
		<comments>http://programmerpayback.com/2010/02/25/superstackpanel-grid-stackpanel/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 04:54:09 +0000</pubDate>
		<dc:creator>Tim Greenfield</dc:creator>
				<category><![CDATA[Programming Tools]]></category>
		<category><![CDATA[Silverlight tips and tricks]]></category>
		<category><![CDATA[grid]]></category>
		<category><![CDATA[silverlight]]></category>
		<category><![CDATA[silverlight controls]]></category>
		<category><![CDATA[stackpanel]]></category>
		<category><![CDATA[tool]]></category>
		<category><![CDATA[xaml]]></category>

		<guid isPermaLink="false">http://programmerpayback.com/?p=506</guid>
		<description><![CDATA[StackPanels are great, but missing the ability to stretch children to fit. Grids accomplish the job but are overkill and take more Xaml to make work. SuperStackPanel is a lightweight and simple to use.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programmerpayback.com&blog=5145140&post=506&subd=programmerpayback&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>Here’s a new panel to add to your tool chest. It’s one I expect to use almost daily and save approximately 3.1 hours of typing over the next year. Hopefully you’ll find it useful as useful as I think it is.</p>
<h2>What’s wrong with the built-in StackPanel:</h2>
<p>You can’t get children to conform to the size of the panel. Imagine you want the following label and list but want the height of the Listbox to stretch or shrink according to the room available:</p>
<p><a href="http://programmerpayback.files.wordpress.com/2010/02/notpossible.png"><img class="alignnone size-full wp-image-509" title="notpossible" src="http://programmerpayback.files.wordpress.com/2010/02/notpossible.png?w=270&#038;h=221" alt="" width="270" height="221" /></a></p>
<p>At first glance, a StackPanel would seem to be the natural choice for which panel to accomplish this. Afterall, you just want a linear list of two objects: a TextBlock and ListBox. However, unless you are willing to hardcode the size of the ListBox or resize it with code, with a StackPanel you’ll end up with:</p>
<p><a href="http://programmerpayback.files.wordpress.com/2010/02/stackpanel1.png"><img class="alignnone size-full wp-image-511" title="StackPanel" src="http://programmerpayback.files.wordpress.com/2010/02/stackpanel1.png?w=451&#038;h=222" alt="" width="451" height="222" /></a><a href="http://programmerpayback.files.wordpress.com/2010/02/stackpanel.png"></a></p>
<p>Yuck! Clipping instead of a scrollbar. So how do you get the desired behavior?</p>
<p>Answer: <strong>Grid</strong>.</p>
<p><a href="http://programmerpayback.files.wordpress.com/2010/02/grid.png"><img class="alignnone size-full wp-image-512" title="Grid" src="http://programmerpayback.files.wordpress.com/2010/02/grid.png?w=463&#038;h=140" alt="" width="463" height="140" /></a></p>
<h2>So what&#8217;s wrong with a Grid?</h2>
<ol>
<li><strong>Grids take more lines xaml to create.</strong> Compare the StackPanel Xaml to the Grid’s above and notice the 4 extra lines of Xaml. Ok, not a huge deal but if you’re doing this every day like me, you start to get sick of creating RowDefinition and ColumnDefinition objects.</li>
<li>With a grid <strong>you have to explicitly define the order of the children</strong>. Adding the attached property Grid.Row is easy on your first pass but what happens if you want to insert a new row somewhere in the middle. You not only have to add a new RowDefinition, but you also have to remember to go increment the row number on all subsequent siblings. This is a pain and error prone because a sibling would potentially be defined in any order in the grid.</li>
</ol>
<h2>Wouldn&#8217;t it be great if you could get the best of both worlds?</h2>
<p>What we really want here is a StackPanel that allows you to define the size of the children.</p>
<h1>Welcome SuperStackPanel:</h1>
<p><a href="http://programmerpayback.files.wordpress.com/2010/02/superstackpanel1.png"><img class="alignnone size-full wp-image-526" title="superstackpanel" src="http://programmerpayback.files.wordpress.com/2010/02/superstackpanel1.png?w=500&#038;h=64" alt="" width="500" height="64" /></a></p>
<p>Just set the attached property <strong>StackPanel.Length</strong> to &#8220;*&#8221; to get a child to stretch.</p>
<p>In fact, SuperStackPanel lets you use all the same GridLength values you can use in a Grid (Auto, *, n*, and x):</p>
<p><a href="http://programmerpayback.files.wordpress.com/2010/02/superstackpanel2.png"><img class="alignnone size-full wp-image-514" title="superstackpanel2" src="http://programmerpayback.files.wordpress.com/2010/02/superstackpanel2.png?w=500&#038;h=297" alt="" width="500" height="297" /></a></p>
<p>Have I sold you yet? The nice part is that SuperStackPanel is completely compatible with a normal StackPanel. Just swap out your StackPanel for SuperStackPanel and everything will look the same because the default value of Length is &#8220;Auto&#8221;. Frankly, I&#8217;d love to see Microsoft expand the role of StackPanel to support this natively. Of course, until then, there&#8217;s SuperStackPanel.</p>
<p>SuperStackPanel is lightweight and simple to add to your project, just <a href="http://cid-829bad56e1f5cacd.skydrive.live.com/self.aspx/Public/StackPanel.cs"><strong>download the C# source code</strong></a>, add to your project, add the namespace to your xaml and away you&#8217;ll go. Enjoy!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/programmerpayback.wordpress.com/506/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/programmerpayback.wordpress.com/506/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/programmerpayback.wordpress.com/506/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/programmerpayback.wordpress.com/506/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/programmerpayback.wordpress.com/506/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/programmerpayback.wordpress.com/506/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/programmerpayback.wordpress.com/506/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/programmerpayback.wordpress.com/506/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/programmerpayback.wordpress.com/506/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/programmerpayback.wordpress.com/506/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programmerpayback.com&blog=5145140&post=506&subd=programmerpayback&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://programmerpayback.com/2010/02/25/superstackpanel-grid-stackpanel/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Tim Greenfield</media:title>
		</media:content>

		<media:content url="http://programmerpayback.files.wordpress.com/2010/02/notpossible.png" medium="image">
			<media:title type="html">notpossible</media:title>
		</media:content>

		<media:content url="http://programmerpayback.files.wordpress.com/2010/02/stackpanel1.png" medium="image">
			<media:title type="html">StackPanel</media:title>
		</media:content>

		<media:content url="http://programmerpayback.files.wordpress.com/2010/02/grid.png" medium="image">
			<media:title type="html">Grid</media:title>
		</media:content>

		<media:content url="http://programmerpayback.files.wordpress.com/2010/02/superstackpanel1.png" medium="image">
			<media:title type="html">superstackpanel</media:title>
		</media:content>

		<media:content url="http://programmerpayback.files.wordpress.com/2010/02/superstackpanel2.png" medium="image">
			<media:title type="html">superstackpanel2</media:title>
		</media:content>
	</item>
		<item>
		<title>Use Silverlight to resize images and increase compression BEFORE uploading</title>
		<link>http://programmerpayback.com/2010/01/21/use-silverlight-to-resize-images-and-increase-compression-before-uploading/</link>
		<comments>http://programmerpayback.com/2010/01/21/use-silverlight-to-resize-images-and-increase-compression-before-uploading/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 06:21:04 +0000</pubDate>
		<dc:creator>Tim Greenfield</dc:creator>
				<category><![CDATA[Silverlight tips and tricks]]></category>
		<category><![CDATA[silverlight]]></category>
		<category><![CDATA[WriteableBitmap]]></category>

		<guid isPermaLink="false">http://programmerpayback.com/?p=488</guid>
		<description><![CDATA[Resize your images and reduce their quality before you upload them to your server to save yourself money, improve user experience, and increase scalability.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programmerpayback.com&blog=5145140&post=488&subd=programmerpayback&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m always looking for ways to take advantage of Silverlight to accomplish tasks that traditional web technologies can&#8217;t. Here&#8217;s one that will <strong>save you money</strong>, <strong>increase scalability</strong>, and<strong> improve your user&#8217;s experience</strong>&#8230;</p>
<p>Allowing users to upload images is becoming common place for many websites and applications today. Equally common is the fact that most cameras and phones today produce very large and high quality images. On the other hand, very rarely do you actually want a high resolution / low compression image sitting on your server; nor does the average user know or care enough to manually reduce the size of their image before uploading it to your site.</p>
<p>Therefore, unless you&#8217;re lazy or in &#8220;get it done&#8221; mode, you are probably going to want to <strong>shrink the image and even increase the compression on that image before storing it on your server</strong>. Doing so will result in faster downloads of that image which means lower bandwidth costs and a better user experience.</p>
<p>The typical (and only option for standard Javascript+HTML based sites) is to do the work on the server. But<strong> wouldn&#8217;t it be great if you could do this work on the client BEFORE sending it up to your server!?</strong> Doing so would 1) decrease the time it takes to upload the image in the first place, 2) decrease the amount of work required by your server; thereby increasing scalability of your site, and 3) decrease the bandwidth used by both you and your user; thereby saving you money.</p>
<h1>Silverlight has your answer! Here&#8217;s how:</h1>
<p></p>
<h2><span style="color:#888888;">Step 1) Use the OpenFileDialog to acquire the stream that contains the bytes of the image.</span></h2>
<p><!-- {\rtf1\ansi\ansicpg\lang1024\noproof65001\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Courier New;}}{\colortbl;??\red43\green145\blue175;\red255\green255\blue255;\red0\green0\blue0;\red0\green0\blue255;\red163\green21\blue21;\red0\green128\blue0;}??\fs20 \cf1 OpenFileDialog\cf0  openDialog = \cf4 new\cf0  \cf1 OpenFileDialog\cf0 ();\par ??openDialog.Filter = \cf5 "JPEG Files (*.jpg;*.jpeg)|*.jpg;*.jpeg"\cf0 ;\par ??\cf4 if\cf0  (openDialog.ShowDialog().GetValueOrDefault(\cf4 false\cf0 ))\par ??\{\par ??    \cf4 using\cf0  (\cf1 FileStream\cf0  stream = openDialog.File.OpenRead())\par ??    \{\par ??        \cf6 // now you have the filestream\par ??\cf0     \}\par ??\}} --></p>
<div style="font-family:Courier New;font-size:10pt;color:black;background:white;">
<p style="margin:0;"><span style="color:#2b91af;">OpenFileDialog</span> openDialog = <span style="color:blue;">new</span> <span style="color:#2b91af;">OpenFileDialog</span>();</p>
<p style="margin:0;">openDialog.Filter = <span style="color:#a31515;">&#8220;JPEG Files (*.jpg;*.jpeg)|*.jpg;*.jpeg&#8221;</span>;</p>
<p style="margin:0;"><span style="color:blue;">if</span> (openDialog.ShowDialog().GetValueOrDefault(<span style="color:blue;">false</span>))</p>
<p style="margin:0;">{</p>
<p style="margin:0;">    <span style="color:blue;">using</span> (<span style="color:#2b91af;">FileStream</span> stream = openDialog.File.OpenRead())</p>
<p style="margin:0;">    {</p>
<p style="margin:0;">        <span style="color:green;">// now you have the filestream</span></p>
<p style="margin:0;">    }</p>
<p style="margin:0;">}</p>
</div>
<h2><span style="color:#888888;">Step 2) Create a WriteableBitmap from those bytes using a ScaleTransform to shrink the image.</span></h2>
<div style="font-family:Courier New;font-size:10pt;color:black;background:white;">
<p style="margin:0;"><span style="color:blue;">public</span> <span style="color:blue;">static</span> <span style="color:#2b91af;">WriteableBitmap</span> GetImageSource(<span style="color:#2b91af;">Stream</span> stream, <span style="color:blue;">double</span> maxWidth, <span style="color:blue;">double</span> maxHeight)</p>
<p style="margin:0;">{</p>
<p style="margin:0;">    <span style="color:#2b91af;">BitmapImage</span> bmp = <span style="color:blue;">new</span> <span style="color:#2b91af;">BitmapImage</span>();</p>
<p style="margin:0;">    bmp.SetSource(stream);</p>
<p style="margin:0;"> </p>
<p style="margin:0;">    <span style="color:#2b91af;">Image</span> img = <span style="color:blue;">new</span> <span style="color:#2b91af;">Image</span>();</p>
<p style="margin:0;">    img.Effect = <span style="color:blue;">new</span> <span style="color:#2b91af;">DropShadowEffect</span>() { ShadowDepth = 0, BlurRadius = 0 };</p>
<p style="margin:0;">    img.Source = bmp;</p>
<p style="margin:0;"> </p>
<p style="margin:0;">    <span style="color:blue;">double</span> scaleX = 1;</p>
<p style="margin:0;">    <span style="color:blue;">double</span> scaleY = 1;</p>
<p style="margin:0;"> </p>
<p style="margin:0;">    <span style="color:blue;">if</span> (bmp.PixelHeight &gt; maxHeight)</p>
<p style="margin:0;">        scaleY = maxHeight / bmp.PixelHeight;</p>
<p style="margin:0;">    <span style="color:blue;">if</span> (bmp.PixelWidth &gt; maxWidth)</p>
<p style="margin:0;">        scaleX = maxWidth / bmp.PixelWidth;</p>
<p style="margin:0;"> </p>
<p style="margin:0;">    <span style="color:green;">// maintain aspect ratio by picking the most severe scale</span></p>
<p style="margin:0;">    <span style="color:blue;">double</span> scale = <span style="color:#2b91af;">Math</span>.Min(scaleY, scaleX);</p>
<p style="margin:0;"> </p>
<p style="margin:0;">    <span style="color:blue;">return</span> <span style="color:blue;">new</span> <span style="color:#2b91af;">WriteableBitmap</span>(img, <span style="color:blue;">new</span> <span style="color:#2b91af;">ScaleTransform</span>() { ScaleX = scale, ScaleY = scale });</p>
<p style="margin:0;">}</p>
</div>
<p>Note: I&#8217;m still investigating the need for setting the Effect property on your image control. While this code does not actually affect the user&#8217;s image, it is necessary to get this to work. Maybe a bug in Silverlight 3?</p>
<h2><span style="color:#888888;">Step 3) Encode the WriteableBitmap object back to a Jpeg using FJCore and set your compression quality.</span></h2>
<div style="font-family:Courier New;font-size:10pt;color:black;background:white;">
<p style="margin:0;"><span style="color:#2b91af;">Stream</span> Source = Encode(wb, 20);</p>
<p><!-- {\rtf1\ansi\ansicpg\lang1024\noproof65001\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Courier New;}}{\colortbl;??\red0\green0\blue255;\red255\green255\blue255;\red0\green0\blue0;\red43\green145\blue175;\red0\green128\blue0;}??\fs20 \cf1 public\cf0  \cf1 static\cf0  \cf4 Stream\cf0  Encode(\cf4 WriteableBitmap\cf0  bitmap, \cf1 int\cf0  quality)\par ??\{\par ??    \cf5 //Convert the Image to pass into FJCore\par ??\cf0     \cf1 int\cf0  width = bitmap.PixelWidth;\par ??    \cf1 int\cf0  height = bitmap.PixelHeight;\par ??    \cf1 int\cf0  bands = 3;\par ??\par ??    \cf1 byte\cf0 [][,] raster = \cf1 new\cf0  \cf1 byte\cf0 [bands][,];\par ??\par ??    \cf1 for\cf0  (\cf1 int\cf0  i = 0; i &lt; bands; i++)\par ??    \{\par ??        raster[i] = \cf1 new\cf0  \cf1 byte\cf0 [width, height];\par ??    \}\par ??\par ??    \cf1 for\cf0  (\cf1 int\cf0  row = 0; row &lt; height; row++)\par ??    \{\par ??        \cf1 for\cf0  (\cf1 int\cf0  column = 0; column &lt; width; column++)\par ??        \{\par ??            \cf1 int\cf0  pixel = bitmap.Pixels[width * row + column];\par ??            raster[0][column, row] = (\cf1 byte\cf0 )(pixel &gt;&gt; 16);\par ??            raster[1][column, row] = (\cf1 byte\cf0 )(pixel &gt;&gt; 8);\par ??            raster[2][column, row] = (\cf1 byte\cf0 )pixel;\par ??        \}\par ??    \}\par ??\par ??    \cf4 ColorModel\cf0  model = \cf1 new\cf0  \cf4 ColorModel\cf0  \{ colorspace = \cf4 ColorSpace\cf0 .RGB \};\par ??\par ??    FluxJpeg.Core.\cf4 Image\cf0  img = \cf1 new\cf0  FluxJpeg.Core.\cf4 Image\cf0 (model, raster);\par ??\par ??    \cf5 //Encode the Image as a JPEG\par ??\cf0     \cf4 MemoryStream\cf0  stream = \cf1 new\cf0  \cf4 MemoryStream\cf0 ();\par ??    \cf4 JpegEncoder\cf0  encoder = \cf1 new\cf0  \cf4 JpegEncoder\cf0 (img, quality, stream);\par ??\par ??    encoder.Encode();\par ??\par ??    \cf5 //Move back to the start of the stream\par ??\cf0     stream.Flush();\par ??    stream.Seek(0, \cf4 SeekOrigin\cf0 .Begin);\par ??    \cf1 return\cf0  stream;\par ??\}} --></p>
<div style="font-family:Courier New;font-size:10pt;color:black;background:white;">
<p style="margin:0;"><span style="color:blue;">public</span> <span style="color:blue;">static</span> <span style="color:#2b91af;">Stream</span> Encode(<span style="color:#2b91af;">WriteableBitmap</span> bitmap, <span style="color:blue;">int</span> quality)</p>
<p style="margin:0;">{</p>
<p style="margin:0;">    <span style="color:green;">//Convert the Image to pass into FJCore</span></p>
<p style="margin:0;">    <span style="color:blue;">int</span> width = bitmap.PixelWidth;</p>
<p style="margin:0;">    <span style="color:blue;">int</span> height = bitmap.PixelHeight;</p>
<p style="margin:0;">    <span style="color:blue;">int</span> bands = 3;</p>
<p style="margin:0;"> </p>
<p style="margin:0;">    <span style="color:blue;">byte</span>[][,] raster = <span style="color:blue;">new</span> <span style="color:blue;">byte</span>[bands][,];</p>
<p style="margin:0;"> </p>
<p style="margin:0;">    <span style="color:blue;">for</span> (<span style="color:blue;">int</span> i = 0; i &lt; bands; i++)</p>
<p style="margin:0;">    {</p>
<p style="margin:0;">        raster[i] = <span style="color:blue;">new</span> <span style="color:blue;">byte</span>[width, height];</p>
<p style="margin:0;">    }</p>
<p style="margin:0;"> </p>
<p style="margin:0;">    <span style="color:blue;">for</span> (<span style="color:blue;">int</span> row = 0; row &lt; height; row++)</p>
<p style="margin:0;">    {</p>
<p style="margin:0;">        <span style="color:blue;">for</span> (<span style="color:blue;">int</span> column = 0; column &lt; width; column++)</p>
<p style="margin:0;">        {</p>
<p style="margin:0;">            <span style="color:blue;">int</span> pixel = bitmap.Pixels[width * row + column];</p>
<p style="margin:0;">            raster[0][column, row] = (<span style="color:blue;">byte</span>)(pixel &gt;&gt; 16);</p>
<p style="margin:0;">            raster[1][column, row] = (<span style="color:blue;">byte</span>)(pixel &gt;&gt; 8);</p>
<p style="margin:0;">            raster[2][column, row] = (<span style="color:blue;">byte</span>)pixel;</p>
<p style="margin:0;">        }</p>
<p style="margin:0;">    }</p>
<p style="margin:0;"> </p>
<p style="margin:0;">    <span style="color:#2b91af;">ColorModel</span> model = <span style="color:blue;">new</span> <span style="color:#2b91af;">ColorModel</span> { colorspace = <span style="color:#2b91af;">ColorSpace</span>.RGB };</p>
<p style="margin:0;"> </p>
<p style="margin:0;">    FluxJpeg.Core.<span style="color:#2b91af;">Image</span> img = <span style="color:blue;">new</span> FluxJpeg.Core.<span style="color:#2b91af;">Image</span>(model, raster);</p>
<p style="margin:0;"> </p>
<p style="margin:0;">    <span style="color:green;">//Encode the Image as a JPEG</span></p>
<p style="margin:0;">    <span style="color:#2b91af;">MemoryStream</span> stream = <span style="color:blue;">new</span> <span style="color:#2b91af;">MemoryStream</span>();</p>
<p style="margin:0;">    <span style="color:#2b91af;">JpegEncoder</span> encoder = <span style="color:blue;">new</span> <span style="color:#2b91af;">JpegEncoder</span>(img, quality, stream);</p>
<p style="margin:0;"> </p>
<p style="margin:0;">    encoder.Encode();</p>
<p style="margin:0;"> </p>
<p style="margin:0;">    <span style="color:green;">//Move back to the start of the stream</span></p>
<p style="margin:0;">    stream.Flush();</p>
<p style="margin:0;">    stream.Seek(0, <span style="color:#2b91af;">SeekOrigin</span>.Begin);</p>
<p style="margin:0;">    <span style="color:blue;">return</span> stream;</p>
<p style="margin:0;">}</p>
</div>
<h2><span style="color:#888888;">Step 4) Send the stream for the new, potentially MUCH smaller Jpeg up to your server!</span><br />
<!-- {\rtf1\ansi\ansicpg\lang1024\noproof65001\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Courier New;}}{\colortbl;??\red0\green0\blue255;\red255\green255\blue255;\red0\green0\blue0;\red43\green145\blue175;}??\fs20 \cf1 byte\cf0 [] buffer;\par ??\cf1 using\cf0  (\cf4 Stream\cf0  Source = \cf4 JpgEncoder\cf0 .Encode(wb, 50))\par ??\{\par ??    \cf1 int\cf0  bufferSize = \cf4 Convert\cf0 .ToInt32(Source.Length);\par ??    buffer = \cf1 new\cf0  \cf1 byte\cf0 [bufferSize];\par ??    Source.Read(buffer, 0, bufferSize);\par ??    Source.Close();\par ??\}\par ??\cf4 Service1Client\cf0  service = \cf1 new\cf0  \cf4 Service1Client\cf0 ();\par ??service.SaveImageAsync(buffer);} --></h2>
<div style="font-family:Courier New;font-size:10pt;color:black;background:white;">
<p style="margin:0;"><span style="color:blue;">byte</span>[] buffer;</p>
<p style="margin:0;"><span style="color:blue;">using</span> (<span style="color:#2b91af;">Stream</span> Source = <span style="color:#2b91af;">JpgEncoder</span>.Encode(wb, 50))</p>
<p style="margin:0;">{</p>
<p style="margin:0;">    <span style="color:blue;">int</span> bufferSize = <span style="color:#2b91af;">Convert</span>.ToInt32(Source.Length);</p>
<p style="margin:0;">    buffer = <span style="color:blue;">new</span> <span style="color:blue;">byte</span>[bufferSize];</p>
<p style="margin:0;">    Source.Read(buffer, 0, bufferSize);</p>
<p style="margin:0;">    Source.Close();</p>
<p style="margin:0;">}</p>
<p style="margin:0;"><span style="color:#2b91af;">Service1Client</span> service = <span style="color:blue;">new</span> <span style="color:#2b91af;">Service1Client</span>();</p>
<p style="margin:0;">service.SaveImageAsync(buffer);</p>
</div>
<p>That&#8217;s it! Plug this code into your Silverlight app everywhere you upload images and improve your website!</p>
<p><a href="http://cid-829bad56e1f5cacd.skydrive.live.com/self.aspx/Public/ImageUploader.zip">Download the source code here</a>.</p>
<h2>Credits</h2>
<p>Kudos to the folks that made <a href="http://code.google.com/p/fjcore/">FJCore</a> for sharing all their hard work with those of us that would never consider trying to build it ourselves!</p>
<p>Kudos to <a href="http://nokola.com/blog/post/2010/01/11/Calculating-Shader-Effects-in-WriteableBitmap-(Fast-Float-Computations-And-More).aspx">nokola</a> for finding a way to build a WriteableBitmap object from an image control without touching the VisualTree.</p>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/programmerpayback.wordpress.com/488/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/programmerpayback.wordpress.com/488/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/programmerpayback.wordpress.com/488/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/programmerpayback.wordpress.com/488/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/programmerpayback.wordpress.com/488/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/programmerpayback.wordpress.com/488/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/programmerpayback.wordpress.com/488/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/programmerpayback.wordpress.com/488/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/programmerpayback.wordpress.com/488/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/programmerpayback.wordpress.com/488/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programmerpayback.com&blog=5145140&post=488&subd=programmerpayback&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://programmerpayback.com/2010/01/21/use-silverlight-to-resize-images-and-increase-compression-before-uploading/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Tim Greenfield</media:title>
		</media:content>
	</item>
		<item>
		<title>Google Web Toolkit 2.0 brings web apps one step closer to… Silverlight</title>
		<link>http://programmerpayback.com/2009/12/10/google-web-toolkit-2-0-and-silverlight/</link>
		<comments>http://programmerpayback.com/2009/12/10/google-web-toolkit-2-0-and-silverlight/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 04:19:52 +0000</pubDate>
		<dc:creator>Tim Greenfield</dc:creator>
				<category><![CDATA[Commentary]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[GWT]]></category>
		<category><![CDATA[GWT 2.0]]></category>
		<category><![CDATA[HTML 5]]></category>
		<category><![CDATA[Java FX]]></category>
		<category><![CDATA[silverlight]]></category>

		<guid isPermaLink="false">http://programmerpayback.com/?p=474</guid>
		<description><![CDATA[What is GWT, what's new in GWT 2.0, and what its future holds.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programmerpayback.com&blog=5145140&post=474&subd=programmerpayback&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p><strong>What is GWT?</strong></p>
<p>In case you haven’t had a chance to explore, <a href="http://code.google.com/webtoolkit/">Google Web Toolkit</a> (GWT) is a great new tool for building web applications. At its core, GWT allows developers to code in Java and essentially “compile” to Javascript. But it offers much more: GWT also provides a set of common controls (or widgets) to build UIs and even provides a plugin for Eclipse that allows developers to debug both client and server-side code in the same environment that they write their code. Cross browser compatibility is taken care of for you and if you stay within the confines of GWT, for all practical purposes you’ll think you were building a native Java client/server application.</p>
<p><strong>What’s new in GWT 2.0?</strong></p>
<p>Yesterday Google released Google Web Toolkit 2.0. GWT 2.0 provides a number of improvements but the most important one is the ability to define your UI using markup instead of code. You could always create good old fashion html with GWT, but if you wanted to use the native UI widgets, you’d have to do all the creational work in code. With 2.0 you are now able to use a feature called uiBinder to build your own native GWT widgets (the equivalent of UserControls) all in markup. The cool part is, you can mix html with your GWT markup if you want to.</p>
<p><strong>The Good:</strong></p>
<p>GWT helps developers build complex client/server applications with first class tools in a first class language and target any browser without the need for a plugin. The developer doesn’t have to know anything about Javascript, Html, or cross browser quirks and can use accepted design patterns for building complex web applications.</p>
<p><strong>The Bad:</strong></p>
<p>Before my time, assembly programmers must have argued with C programmers that they could never write code in C that would be as efficient as assembly. They must have argued that there would be certain advanced tasks that couldn’t be done easily in C, and that the compiled C would be bloated by comparison and nearly impossible to read if something went wrong and you needed to inspect your code. This is the same argument GWT faces today from the Javascript camp. Ultimately, a javascript app is still being created under the hood and because of it, GWT developers will never have the same level of control and flexibility as if it had built in Javascript from the beginning. All choices have tradeoffs and this is one of GWT’s.</p>
<p><strong>The Ugly:</strong></p>
<p>The product that GWT allows a developer to create will always only be as good as the browser running it and will be held back by the older browsers that it needs to support. In the near term, in order for the GWT feature set to progress, 2 things have to happen: 1) browsers have to natively start supporting new features (can anyone say HTML5?), and 2) certain features in your GWT app won’t support older browsers. While this is a reasonable way to compete with ASP.NET Webforms, jQuery, and Ruby on Rails, this is not a sustainable path to compete with Flash, Silverlight, or Java FX. Hence…</p>
<p><strong>My opinion on GWT’s long term strategy:</strong></p>
<p>Either GWT will ultimately be positioned as a technology suited for catering to lowest common denominator scenarios or…</p>
<p>Google will have to adopt something similar to the plugin approach. GWT developers will still build their app using GWT the way they do today but if they want access to all those extra goodies that Flash, Silverlight and Java FX have (the ones that are not supported in the current version of HTML or Javascript), GWT will need to build those features into Chrome and allow developers to build apps that require some variation of Chrome (Chrome browser, the Chrome OS, or the <a href="http://www.google.com/chromeframe">Chrome Frame plugin</a>). Google may try to bake these feautres into whatever the next version of HTML is at the time but my guess is that they won&#8217;t always be willing to wait around for W3C to agree and will start adding them to Chrome as they need them. In the end, GWT apps that need the latest features will essentially be native Chrome apps built on (for all practical purposes) a Java powered plugin framework.</p>
<p>Personally, I say unless you need a plugin independent app, why wait? Silverlight, Flash, and Java FX give you today everything that GWT will provide tomorrow.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/programmerpayback.wordpress.com/474/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/programmerpayback.wordpress.com/474/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/programmerpayback.wordpress.com/474/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/programmerpayback.wordpress.com/474/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/programmerpayback.wordpress.com/474/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/programmerpayback.wordpress.com/474/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/programmerpayback.wordpress.com/474/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/programmerpayback.wordpress.com/474/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/programmerpayback.wordpress.com/474/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/programmerpayback.wordpress.com/474/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programmerpayback.com&blog=5145140&post=474&subd=programmerpayback&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://programmerpayback.com/2009/12/10/google-web-toolkit-2-0-and-silverlight/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Tim Greenfield</media:title>
		</media:content>
	</item>
		<item>
		<title>PuzzleTouch wins the ComponentArt Silverlight Coding Contest</title>
		<link>http://programmerpayback.com/2009/11/04/componentart-contest-final-five/</link>
		<comments>http://programmerpayback.com/2009/11/04/componentart-contest-final-five/#comments</comments>
		<pubDate>Wed, 04 Nov 2009 02:19:50 +0000</pubDate>
		<dc:creator>Tim Greenfield</dc:creator>
				<category><![CDATA[Silverlight tips and tricks]]></category>
		<category><![CDATA[ComponentArt]]></category>
		<category><![CDATA[PuzzleTouch]]></category>
		<category><![CDATA[silverlight]]></category>

		<guid isPermaLink="false">http://programmerpayback.com/?p=464</guid>
		<description><![CDATA[PuzzleTouch Online Jigsaw Puzzles wins the ComponentArt Silverlight Coding Contest.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programmerpayback.com&blog=5145140&post=464&subd=programmerpayback&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p><strong>UPDATE: The results are in and </strong><a href="http://www.componentart.com/community/blogs/miljan/archive/2009/11/11/lone-programmer-wins-our-silverlight-coding-competition.aspx"><strong>PuzzleTouch won the grand prize!</strong></a> I had some tough competition so I am extra excited to have won.</p>
<p>The <a href="http://www.componentart.com/company/news.aspx#news75">ComponentArt Silverlight Coding Contest results are in for the five finalists</a> and I am super excited to annouce that my creation: <a href="http://puzzletouch.com">PuzzleTouch Online Jigsaw Puzzles</a> made the cut! Thanks to all who voted for me!</p>
<p>If you haven&#8217;t see PuzzleTouch yet, check it out. It&#8217;s as fun to play as it was to write and is a great testament to what Silverlight is capable of producing.</p>
<p style="text-align:center;"><a href="http://puzzletouch.com"><img class="size-full wp-image-467 aligncenter" title="PuzzleTouch Online Jigsaw Puzzles" src="http://programmerpayback.files.wordpress.com/2009/11/puzzletouch.jpg?w=280&#038;h=220" alt="PuzzleTouch Free Online Jigsaw Puzzles" width="280" height="220" /></a></p>
<p>It&#8217;s the only online jigsaw puzzle on the web that supports 360 degree rotation, 100% mathamatically unique shapes, unlimited levels of difficulty, full multi-touch support (my favorite for those that have the hardware!), out of browser mode, the ability to save games, and the ability to run offline (great for planes, trains, and autos).</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/programmerpayback.wordpress.com/464/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/programmerpayback.wordpress.com/464/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/programmerpayback.wordpress.com/464/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/programmerpayback.wordpress.com/464/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/programmerpayback.wordpress.com/464/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/programmerpayback.wordpress.com/464/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/programmerpayback.wordpress.com/464/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/programmerpayback.wordpress.com/464/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/programmerpayback.wordpress.com/464/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/programmerpayback.wordpress.com/464/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programmerpayback.com&blog=5145140&post=464&subd=programmerpayback&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://programmerpayback.com/2009/11/04/componentart-contest-final-five/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Tim Greenfield</media:title>
		</media:content>

		<media:content url="http://programmerpayback.files.wordpress.com/2009/11/puzzletouch.jpg" medium="image">
			<media:title type="html">PuzzleTouch Online Jigsaw Puzzles</media:title>
		</media:content>
	</item>
		<item>
		<title>Host your Silverlight apps on Amazon S3</title>
		<link>http://programmerpayback.com/2009/11/01/host-your-silverlight-apps-on-amazon-s3/</link>
		<comments>http://programmerpayback.com/2009/11/01/host-your-silverlight-apps-on-amazon-s3/#comments</comments>
		<pubDate>Sun, 01 Nov 2009 02:50:54 +0000</pubDate>
		<dc:creator>Tim Greenfield</dc:creator>
				<category><![CDATA[Silverlight tips and tricks]]></category>
		<category><![CDATA[S3]]></category>
		<category><![CDATA[silverlight]]></category>

		<guid isPermaLink="false">http://programmerpayback.com/?p=447</guid>
		<description><![CDATA[Guide to eliminate scalability concerns for your Silverlight app by hosting your xap on Amazon S3.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programmerpayback.com&blog=5145140&post=447&subd=programmerpayback&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>Silverlight apps are nothing more than big zip files and Amazon S3 is dirt cheap and hyper-scalable. Why would you ever host your Silverlight .xap files on your own server or ISP? &#8230; especially with <a href="http://blogs.zdnet.com/microsoft/?p=4286">Silverlight Streaming being dropped soon</a>.</p>
<p>Here&#8217;s a quick <strong>guide to putting your Silverlight apps on Amazon S3</strong> and depending on your app, never worry about scalability or bandwidth costs again&#8230;</p>
<p><strong>1)</strong> Create your <a href="http://aws.amazon.com/s3/">Amazon S3 account</a>.</p>
<p><strong>2)</strong> <a href="https://addons.mozilla.org/en-US/firefox/addon/3247">Install S3 Organizer</a> FireFox plugin (this is the equivelent of an FTP client for Amazon S3).</p>
<p><strong>3)</strong> Run S3 Organizer, log into your account and create your bucket.</p>
<p><img class="alignnone size-full wp-image-448" title="Create a bucket in S3 Organizer via the toolbar" src="http://programmerpayback.files.wordpress.com/2009/11/createbucket.png?w=151&#038;h=63" alt="Create a bucket in S3 Organizer via the toolbar" width="151" height="63" /></p>
<p><strong>4)</strong> Upload your xap file to your bucket.<strong> BUT&#8230; you must add custom headers</strong> unless you are also going to host your .html file there too. <a href="http://www.jeff.wilcox.name/2008/11/xap-mime-type/">Silverlight xaps need a MIME type specified when they are loaded from another domain.</a> The good news is, this is easy with S3 as long as you do it at the time that you upload the file. There is probably a way to set it after the fact but not with S3 Organizer.</p>
<p><img class="alignnone size-full wp-image-449" title="Upload" src="http://programmerpayback.files.wordpress.com/2009/11/upload.png?w=437&#038;h=125" alt="Upload your .xap file to Amazon S3 but don't forget to add custom headers" width="437" height="125" /></p>
<p><img class="alignnone size-full wp-image-451" title="Set the content type for your xap file" src="http://programmerpayback.files.wordpress.com/2009/11/setcustomheaders1.png?w=497&#038;h=310" alt="Set the content type for your xap file" width="497" height="310" /></p>
<p>Simply set the content type to &#8216;application/x-silverlight-app&#8217; and send up your xap. Don&#8217;t forget to do this EVERY time you upload an update.</p>
<p><strong>5)</strong> After uploading your .xap file, set permissions so everyone can read your xap file. Right click on your newly uploaded xap file and choose &#8220;Edit ACL&#8230;&#8221;. Then check Read access for Everyone and Authenticated Users. You do NOT need to do this every time as S3 remembers your ACL settings.</p>
<p><img class="alignnone size-full wp-image-458" title="Edit ACL settings in S3 Organizer for your xap file" src="http://programmerpayback.files.wordpress.com/2009/11/acl.png?w=481&#038;h=385" alt="Edit ACL settings in S3 Organizer for your xap file" width="481" height="385" /></p>
<p><strong>6)</strong> Add the enableHtmlAccess param to your object tag within your html file to enable access to the DOM bridge (assuming your Silverlight app needs access to the DOM bridge).</p>
<p>For example:</p>
<p><img class="alignnone size-full wp-image-453" title="enableHtmlAccess" src="http://programmerpayback.files.wordpress.com/2009/11/enablehtmlaccess1.png?w=500&#038;h=98" alt="Set EnableHtmlAccess param in the object tag" width="500" height="98" /></p>
<p><strong>7)</strong> Change your html page to load your xap file from S3 directly by setting the source param in your object tag.</p>
<p>For example:</p>
<p><img class="alignnone size-full wp-image-454" title="Change the source of your xap file to load from S3" src="http://programmerpayback.files.wordpress.com/2009/11/xapsource.png?w=500&#038;h=98" alt="Change the source of your xap file to load from S3" width="500" height="98" /></p>
<p>Note: &#8216;mybucket&#8217; is the name of your bucket on S3.</p>
<p><strong>8 )</strong> Upload your html (or aspx) page to your web server. <a href="http://www.godaddy.com">GoDaddy.com</a> offers cheap hosting for only $5 per month.</p>
<p>That&#8217;s it! At this point, the only scalability concerns you should have are those of your web services (assuming you call web services from your Silverlight app).</p>
<p>And with S3, the costs depend on the usage &#8212; which will literally cost you just pennies per month until you have some descent traffic. Do the math and you&#8217;ll see that it would only cost 17 cents to have a  300K .xap get hit 3500 times. At that rate you&#8217;d pay ~$48 to have 1 million new users per month. (I say &#8220;new&#8221; users because unless you update your xap, users should be caching your xap file and won&#8217;t need to re-download it).</p>
<p>Happy cheap hosting and Silverlight coding!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/programmerpayback.wordpress.com/447/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/programmerpayback.wordpress.com/447/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/programmerpayback.wordpress.com/447/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/programmerpayback.wordpress.com/447/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/programmerpayback.wordpress.com/447/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/programmerpayback.wordpress.com/447/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/programmerpayback.wordpress.com/447/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/programmerpayback.wordpress.com/447/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/programmerpayback.wordpress.com/447/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/programmerpayback.wordpress.com/447/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programmerpayback.com&blog=5145140&post=447&subd=programmerpayback&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://programmerpayback.com/2009/11/01/host-your-silverlight-apps-on-amazon-s3/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Tim Greenfield</media:title>
		</media:content>

		<media:content url="http://programmerpayback.files.wordpress.com/2009/11/createbucket.png" medium="image">
			<media:title type="html">Create a bucket in S3 Organizer via the toolbar</media:title>
		</media:content>

		<media:content url="http://programmerpayback.files.wordpress.com/2009/11/upload.png" medium="image">
			<media:title type="html">Upload</media:title>
		</media:content>

		<media:content url="http://programmerpayback.files.wordpress.com/2009/11/setcustomheaders1.png" medium="image">
			<media:title type="html">Set the content type for your xap file</media:title>
		</media:content>

		<media:content url="http://programmerpayback.files.wordpress.com/2009/11/acl.png" medium="image">
			<media:title type="html">Edit ACL settings in S3 Organizer for your xap file</media:title>
		</media:content>

		<media:content url="http://programmerpayback.files.wordpress.com/2009/11/enablehtmlaccess1.png" medium="image">
			<media:title type="html">enableHtmlAccess</media:title>
		</media:content>

		<media:content url="http://programmerpayback.files.wordpress.com/2009/11/xapsource.png" medium="image">
			<media:title type="html">Change the source of your xap file to load from S3</media:title>
		</media:content>
	</item>
		<item>
		<title>Silverlight Presentation at EADNUG</title>
		<link>http://programmerpayback.com/2009/10/22/silverlight-presentation-at-eadnug/</link>
		<comments>http://programmerpayback.com/2009/10/22/silverlight-presentation-at-eadnug/#comments</comments>
		<pubDate>Thu, 22 Oct 2009 05:05:05 +0000</pubDate>
		<dc:creator>Tim Greenfield</dc:creator>
				<category><![CDATA[Silverlight tips and tricks]]></category>
		<category><![CDATA[EADNUG]]></category>
		<category><![CDATA[silverlight]]></category>

		<guid isPermaLink="false">http://programmerpayback.com/?p=445</guid>
		<description><![CDATA[Thanks to all who attended my presentation tonight at the Eugene .NET users group (EADNUG)! There were many great questions I had a fantastic time showing off all the cool things Silverlight can do.
Click here to get all the fun little projects covered (and a few we didn&#8217;t have time for).
See you again at the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programmerpayback.com&blog=5145140&post=445&subd=programmerpayback&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>Thanks to all who attended my presentation tonight at the <a href="http://eadnug.org/">Eugene .NET users group</a> (EADNUG)! There were many great questions I had a fantastic time showing off all the cool things Silverlight can do.</p>
<p><a href="http://cid-829bad56e1f5cacd.skydrive.live.com/self.aspx/Public/Silverlight.zip">Click here</a> to get all the fun little projects covered (and a few we didn&#8217;t have time for).</p>
<p>See you again at the next meeting.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/programmerpayback.wordpress.com/445/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/programmerpayback.wordpress.com/445/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/programmerpayback.wordpress.com/445/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/programmerpayback.wordpress.com/445/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/programmerpayback.wordpress.com/445/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/programmerpayback.wordpress.com/445/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/programmerpayback.wordpress.com/445/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/programmerpayback.wordpress.com/445/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/programmerpayback.wordpress.com/445/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/programmerpayback.wordpress.com/445/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programmerpayback.com&blog=5145140&post=445&subd=programmerpayback&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://programmerpayback.com/2009/10/22/silverlight-presentation-at-eadnug/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Tim Greenfield</media:title>
		</media:content>
	</item>
		<item>
		<title>How HTML5 can compete with Silverlight and Flash</title>
		<link>http://programmerpayback.com/2009/09/23/how-html5-can-compete-with-silverlight-and-flash/</link>
		<comments>http://programmerpayback.com/2009/09/23/how-html5-can-compete-with-silverlight-and-flash/#comments</comments>
		<pubDate>Wed, 23 Sep 2009 02:26:51 +0000</pubDate>
		<dc:creator>Tim Greenfield</dc:creator>
				<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Silverlight tips and tricks]]></category>
		<category><![CDATA[Chrome]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[IE]]></category>
		<category><![CDATA[silverlight]]></category>

		<guid isPermaLink="false">http://programmerpayback.com/?p=435</guid>
		<description><![CDATA[Most of the tech journalists out there don't seem to understand what this is really all about. It's about HTML5 vs. Silverlight vs. Flash.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programmerpayback.com&blog=5145140&post=435&subd=programmerpayback&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p><span style="color:black;">In case you haven&#8217;t heard, Google just debuted <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a>; allowing developers to run the Google Chrome rendering engine inside IE as a plugin and thereby trumping IE.</span></p>
<p><span style="color:black;">Reading <a href="http://www.techcrunch.com/2009/09/22/google-turns-internet-explorer-into-chrome-yes-seriously/">blogs like this one</a>, I distinctly get the feeling that most of the tech journalists out there don&#8217;t understand what this is really all about. This is not about Google being annoyed with old versions of IE, i</span><span style="color:black;"><strong>t&#8217;s about HTML5 vs. Silverlight vs. Flash</strong>. Right now <strong>HTML5 has 3 big disadvantages</strong> over their plugin counterparts&#8230; </span></p>
<ol>
<li><span style="color:black;">Different browsers will implement HTML5 differently. Even if it is standards based. </span></li>
<li><span style="color:black;">Most browsers don&#8217;t support HTML5 and getting a user to switch browsers is a lot harder than getting them to install a plugin.</span></li>
<li><span style="color:black;">Standards based innovation is slow. <a href="http://www.webmonkey.com/blog/HTML_5_Won_t_Be_Ready_Until_2022DOT_Yes__2022DOT">HTML5 in its entirety should be ready for browsers to implement in 2012</a>; just in time to be as far behind Flash and Silverlight as HTML4 is today.</span></li>
</ol>
<p><span style="color:black;">In the end, there are only 2 ways around all of these disadvantages: </span></p>
<ol>
<li><span style="color:black;"><strong>Either get everyone to use your browser or </strong></span></li>
<li><span style="color:black;"><strong>Run everything thru a plugin</strong>. </span></li>
</ol>
<p><span style="color:black;">Google Chrome (the browser) and Google Chrome Frame together make it possible for developers to write and test code in an IE-less world, thereby getting more developers to care about Chrome, less to care about IE, and more to choose HTML5 as a framework to develop apps on.</span></p>
<p><span style="color:black;">Right now the plugin is an ActiveX plugin and therefore only works on IE, but give Google some time and I&#8217;m sure they&#8217;ll have a Netscape plugin too that will work in Safari and Firefox. It&#8217;s only a matter of time before you Google will be nearly in complete control over how HTML5 will be rendered (if the developer chooses so) and thereby won&#8217;t need to wait on a standards committe to approve further innovation to HTML.</span></p>
<p><span style="color:black;">Of course, the picture is even bigger than that&#8230; whoever owns the developers will own the dominant OS. In my opinion, this is all a tactic in the Android/Chrome OS vs. iApple vs. Windows war and the reason Google built Chrome in the first place.</span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/programmerpayback.wordpress.com/435/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/programmerpayback.wordpress.com/435/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/programmerpayback.wordpress.com/435/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/programmerpayback.wordpress.com/435/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/programmerpayback.wordpress.com/435/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/programmerpayback.wordpress.com/435/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/programmerpayback.wordpress.com/435/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/programmerpayback.wordpress.com/435/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/programmerpayback.wordpress.com/435/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/programmerpayback.wordpress.com/435/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programmerpayback.com&blog=5145140&post=435&subd=programmerpayback&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://programmerpayback.com/2009/09/23/how-html5-can-compete-with-silverlight-and-flash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Tim Greenfield</media:title>
		</media:content>
	</item>
		<item>
		<title>You say hello and I say goodbye (to Windows Azure)</title>
		<link>http://programmerpayback.com/2009/07/19/you-say-hello-and-i-say-goodbye-to-windows-azure/</link>
		<comments>http://programmerpayback.com/2009/07/19/you-say-hello-and-i-say-goodbye-to-windows-azure/#comments</comments>
		<pubDate>Sun, 19 Jul 2009 18:49:01 +0000</pubDate>
		<dc:creator>Tim Greenfield</dc:creator>
				<category><![CDATA[Windows Azure]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Azure]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[webservice]]></category>

		<guid isPermaLink="false">http://programmerpayback.com/?p=430</guid>
		<description><![CDATA[Windows Azure costs $86.40 / month to host a simple .aspx page that gets no traffic.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programmerpayback.com&blog=5145140&post=430&subd=programmerpayback&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>This week Microsoft finally revealed its <a href="http://www.microsoft.com/azure/pricing.mspx">pricing structure for Windows Azure</a> hosting services. Using Azure to host the simplest website in the world costs a minimum of $0.12 / hour. Work out the math: 0.12 * 24 * 30 = <strong>$86.40 / month.</strong></p>
<p>While this might sound reasonable to a large organization with tons of traffic or anyone currently using <a href="http://aws.amazon.com/ec2/">Amazon EC2</a> or <a href="http://www.rackspacecloud.com/">Rackspace&#8217;s Mosso</a>, this is way out of reach for the majority of developers and organizations who are just trying to create a useful webservice or website that <em>could</em> scale in the off chance their idea took off or got mentioned by the press.</p>
<p>Based on this pricing it&#8217;s obvious that Microsoft is trying to compete with Amazon and targetting the same market. Nevertheless, I personally had high hopes that Microsoft was actually trying to compete with <a href="http://code.google.com/appengine/">Google App Engine</a> by offering the first and only affordable and scalable Windows hosting option&#8230; which raises the point: <span style="color:#888888;">(in case anyone from Microsoft is listening)</span> if Microsoft wants .NET to compete long-term as a server-side platform (which is essential for Windows to thrive as a server-side OS), someone is going to have to solve this problem soon or it will find itself playing catch-up.</p>
<p>I love Windows Azure and I believe it is a great, simple and affordable option for the big boys. But as Windows Azure leaves beta and the world says hello, I say goodbye before I have to start coughing up ~$100/mo for my personal websites. Back to shared hosting at <a href="https://www.godaddy.com/">GoDaddy</a> ($4/mo for Windows + SQL).</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/programmerpayback.wordpress.com/430/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/programmerpayback.wordpress.com/430/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/programmerpayback.wordpress.com/430/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/programmerpayback.wordpress.com/430/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/programmerpayback.wordpress.com/430/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/programmerpayback.wordpress.com/430/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/programmerpayback.wordpress.com/430/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/programmerpayback.wordpress.com/430/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/programmerpayback.wordpress.com/430/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/programmerpayback.wordpress.com/430/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programmerpayback.com&blog=5145140&post=430&subd=programmerpayback&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://programmerpayback.com/2009/07/19/you-say-hello-and-i-say-goodbye-to-windows-azure/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Tim Greenfield</media:title>
		</media:content>
	</item>
	</channel>
</rss>