<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Development in a Blink &#187; WPF</title>
	<atom:link href="http://www.dougfinke.com/blog/index.php/category/wpf/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dougfinke.com/blog</link>
	<description>Researching the optimal; implementing the practical</description>
	<lastBuildDate>Tue, 07 Sep 2010 00:22:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>PowerShell Hacker #13</title>
		<link>http://www.dougfinke.com/blog/index.php/2010/08/27/powershell-hacker-13/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=powershell-hacker-13</link>
		<comments>http://www.dougfinke.com/blog/index.php/2010/08/27/powershell-hacker-13/#comments</comments>
		<pubDate>Fri, 27 Aug 2010 23:41:54 +0000</pubDate>
		<dc:creator>Doug Finke</dc:creator>
				<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Raven DB]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Sql Server]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://www.dougfinke.com/blog/index.php/2010/08/27/powershell-hacker-13/</guid>
		<description><![CDATA[My daughter is set up at the freshman dorms in college. Let’s see what PowerShell goodness is out there. Chad Miller published his Really Simple Data Dictionary &#8211; a meta data collector for SQL Server and Oracle. Developed in PowerShell Here is a PowerShell script that exports a Raven DB Index to CSV (comma separated [...]]]></description>
			<content:encoded><![CDATA[<p>My daughter is set up at the freshman dorms in college. Let’s see what PowerShell goodness is out there.</p>
<ul>
<li><a href="http://sev17.com/">Chad Miller</a> published his <a href="http://rsdd.codeplex.com/">Really Simple Data Dictionary</a> &#8211; a meta data collector for SQL Server and Oracle. Developed in PowerShell </li>
<li><a href="http://www.mattfreeman.co.uk/2010/08/exporting-a-ravendb-index-to-csv-using-powershell/">Here is a PowerShell script</a> that exports a <a href="http://ravendb.net/">Raven DB</a> Index to CSV (comma separated values). Raven is an Open Source document database for the .NET/Windows platform </li>
<li>Alan Renouf wrote a nice PowerShell script, <a href="http://www.virtu-al.net/2010/08/23/simple-powershell-selection-box/">Simple PowerShell selection box</a>, which takes a list of items and puts it in a WinForm combo box, then after selecting the item sends, it down the pipeline. Check out these other posts:
<ul>
<li><a href="http://www.dougfinke.com/blog/index.php/2009/08/15/inject-dynamic-wpf-guis-into-your-powershell-pipeline/">Inject Dynamic WPF GUIs into your PowerShell Pipeline</a> </li>
<li><a href="http://www.dougfinke.com/blog/index.php/2009/08/17/3-more-ways-to-inject-dynamic-wpf-guis-into-your-powershell-pipeline/">3 More Ways To Inject Dynamic WPF GUIs into your PowerShell Pipeline</a> </li>
<li><a href="http://www.dougfinke.com/blog/index.php/2009/08/29/update-dynamic-guis-and-the-powershell-pipeline/">Update: Dynamic GUIs and the PowerShell Pipeline</a> </li>
</ul>
</li>
<li>Colleague <a href="http://northhorizon.net/">Daniel Moore</a> chatted with me about his cool <a href="http://northhorizon.net/2010/alpha-blending-colors-in-powershell/">Alpha-Blending Colors in PowerShell</a> script. I like his walk through discussing his choice points in refactoring </li>
<li>Bought my copy of Lee Holmes’ new book <a href=" http://www.leeholmes.com/blog/PowerShellCookbookV2NowAvailable.aspx">PowerShell Cookbook Version 2</a> </li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.dougfinke.com/blog/index.php/2010/08/27/powershell-hacker-13/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Doug Finke on the OData PowerShell Explorer!</title>
		<link>http://www.dougfinke.com/blog/index.php/2010/08/18/doug-finke-on-the-odata-powershell-explorer/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=doug-finke-on-the-odata-powershell-explorer</link>
		<comments>http://www.dougfinke.com/blog/index.php/2010/08/18/doug-finke-on-the-odata-powershell-explorer/#comments</comments>
		<pubDate>Thu, 19 Aug 2010 00:17:45 +0000</pubDate>
		<dc:creator>Doug Finke</dc:creator>
				<category><![CDATA[OData]]></category>
		<category><![CDATA[Podcasts]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[RunAs Radio]]></category>
		<category><![CDATA[Tcl/Tk]]></category>
		<category><![CDATA[Visualizing Data]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[WPK]]></category>
		<category><![CDATA[Webcast]]></category>

		<guid isPermaLink="false">http://www.dougfinke.com/blog/index.php/2010/08/18/doug-finke-on-the-odata-powershell-explorer/</guid>
		<description><![CDATA[Richard and Greg over on RunAs Radio talked to me about the OData PowerShell Explorer I built and put up on CodePlex. Check it out. HERE is the podcast. We talked about: OData – Open Data Protocol http://www.odata.org/ PowerShell WPK (WPF for PowerShell, think Tcl/Tk) PowerShell and Data visualization, HERE, HERE and HERE and more [...]]]></description>
			<content:encoded><![CDATA[<p>Richard and Greg over on <a href="http://www.runasradio.com/default.aspx">RunAs Radio</a> talked to me about the <a href=" http://psodata.codeplex.com">OData PowerShell Explorer</a> I built and put up on CodePlex. </p>
<p>Check it out. <a href="http://www.runasradio.com/default.aspx?showNum=173">HERE</a> is the podcast.</p>
<p>We talked about:</p>
<ul>
<li>OData – Open Data Protocol <a href="http://www.odata.org/">http://www.odata.org/</a></li>
<li><a href="http://support.microsoft.com/kb/968930">PowerShell</a></li>
<li><a href="http://www.dougfinke.com/blog/index.php/category/wpk/">WPK</a> (<a href="http://code.msdn.microsoft.com/PowerShellPack">WPF for PowerShell</a>, think <a href="http://tcl.tk/">Tcl/Tk</a>)</li>
<li>PowerShell and Data visualization, <a href="http://www.dougfinke.com/blog/?s=nodexl">HERE</a>, <a href="http://www.dougfinke.com/blog/index.php/category/netmap/">HERE</a> and <a href="http://www.dougfinke.com/blog/index.php/category/dgml/">HERE</a></li>
<li>and more</li>
</ul>
<p>I want to thank Richard and Greg for having me on, smart guys and smart questions. They got me thinking about next steps for using PowerShell and features to add to the OData PowerShell Explorer.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dougfinke.com/blog/index.php/2010/08/18/doug-finke-on-the-odata-powershell-explorer/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>OData PowerShell Explorer</title>
		<link>http://www.dougfinke.com/blog/index.php/2010/08/04/odata-powershell-explorer/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=odata-powershell-explorer</link>
		<comments>http://www.dougfinke.com/blog/index.php/2010/08/04/odata-powershell-explorer/#comments</comments>
		<pubDate>Wed, 04 Aug 2010 23:11:26 +0000</pubDate>
		<dc:creator>Doug Finke</dc:creator>
				<category><![CDATA[CodePlex]]></category>
		<category><![CDATA[Data Services]]></category>
		<category><![CDATA[OData]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Sql Server]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[WPK]]></category>

		<guid isPermaLink="false">http://www.dougfinke.com/blog/index.php/2010/08/04/odata-powershell-explorer/</guid>
		<description><![CDATA[I’ve been working with OData and decided to build, and make available on CodePlex, an OData PowerShell Explorer that let’s you access and drill down on a service from either the command line or the GUI. The Open Data Protocol (OData) is a Web protocol for querying and updating data that provides a way to [...]]]></description>
			<content:encoded><![CDATA[<p>I’ve been working with <a href="http://www.odata.org/home">OData</a> and decided to build, and make available on CodePlex, an <a href="http://psodata.codeplex.com/">OData PowerShell Explorer</a> that let’s you access and drill down on a service from either the command line or the GUI.</p>
<blockquote><p>The <strong>Open Data Protocol (OData)</strong> is a Web protocol for querying and updating data that provides a way to unlock your data and free it from silos that exist in applications today.</p>
<p><a href="http://www.odata.org/home">Open Data Protocol Home</a></p>
</blockquote>
<p>One of the many interesting parts of this open source module is, it is a GUI written in PowerShell built on top of&#160; PowerShell code. You can either use the GUI to navigate the data or do it directly at the command line. Both are driven by the OData PowerShell module.</p>
<p>Another interesting note is the GUI’s ‘Drill Down’ buttons dynamically change depending on which service and collection you are viewing. </p>
<p>Same goes for the command line objects. The objects methods are dynamically built on the fly as you navigate the details of a collection and drill down.</p>
<h3>Using the PowerShell WPK GUI with OData Services</h3>
<p><a href="http://dougfinke.com/uploadPictures/ODataPowerShellExplorer_1010D/image.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://dougfinke.com/uploadPictures/ODataPowerShellExplorer_1010D/image_thumb.png" width="552" height="221" /></a> </p>
<h3>Using the PowerShell Command Line with OData Services</h3>
<p><a href="http://dougfinke.com/uploadPictures/ODataPowerShellExplorer_1010D/image_3.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://dougfinke.com/uploadPictures/ODataPowerShellExplorer_1010D/image_thumb_3.png" width="549" height="243" /></a> </p>
<h3>Great Automation Story</h3>
<p>Using the OData PowerShell module at the command line blends the power of Open Data Protocol for sharing and PowerShell’s great range of cmdlets to slice, dice, transform and store data.</p>
<p>In a few lines of PowerShell you can fetch information from several data services and then export them to Excel, Databases, XML and more.</p>
<h3>Query Options</h3>
<p>The PowerShell OData module also supports OData query options like $expand, $filter, $top, $skip and more. So for example you could do this:&#160; </p>
<pre class="PowerShellColorizedScript"><span style="color: #0000ff">Import-Module</span> <span style="color: #8a2be2">C:\CodePlex\psodata\trunk\modules\OData.psm1</span>            

<span style="color: #ff4500">$netflix</span> <span style="color: #a9a9a9">=</span> <span style="color: #0000ff">New-ODataService</span> <span style="color: #8b0000">&quot;http://odata.netflix.com/Catalog&quot;</span>
<span style="color: #ff4500">$netflix</span><span style="color: #a9a9a9">.</span><span style="color: #000000">People</span><span style="color: #000000">(</span><span style="color: #8b0000">&quot;`$filter=endswith(Name, 'Abbott')&quot;</span><span style="color: #000000">)</span>            

<span style="color: #006400"># Results</span>
<span style="color: #8b0000">Id       Name
--       ----
189      Bruce Abbott
190      Bud Abbott
196      George Abbott
20006674 Mark Abbott
20013692 Philip Abbott
20017929 John Abbott
20018086 David Abbott
20031575 Abdul Malik Abbott
20038388 Diahnne Abbott
20045891 Annie Abbott
20057657 Jennifer Abbott
20057988 Norman Abbott
.....</span></pre>
<p>There are many ways to subset the data. This is faster because there is less data returned from the remote server. An alternative would eliminate the $filter query option and use PowerShell’s <em>Where-Object {$_.name.EndsWith(‘Abbott’)}</em>. The tradeoff being that all the data is fetched from the server and then subsetted.</p>
<h3>Summary</h3>
<p>I’ll continue to grow the PowerShell module to encompass additional features and surface them in the GUI as well. </p>
<p>Meanwhile <a href="http://psodata.codeplex.com/">grab the code</a> and let me know what you think.</p>
<h3>Resources</h3>
<ul>
<li><a href="http://msdn.microsoft.com/en-us/library/ff478141.aspx">Open Data Protocol by Example</a> </li>
<li><a href="http://www.chriswoodruff.com/index.php/2010/07/29/odata-workshop-screencast-introduction-to-protocol/">OData Workshop Screencast – Introduction to Protocol</a> </li>
<li><a href="http://www.odataprimer.com/MainPage.ashx">OData Primer</a> </li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.dougfinke.com/blog/index.php/2010/08/04/odata-powershell-explorer/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PowerShell Hacker #1</title>
		<link>http://www.dougfinke.com/blog/index.php/2010/05/15/powershell-hacker-1/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=powershell-hacker-1</link>
		<comments>http://www.dougfinke.com/blog/index.php/2010/05/15/powershell-hacker-1/#comments</comments>
		<pubDate>Sat, 15 May 2010 17:24:44 +0000</pubDate>
		<dc:creator>Doug Finke</dc:creator>
				<category><![CDATA[IronRuby]]></category>
		<category><![CDATA[PowerBoots]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[PowerShell Hacker]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[XAML]]></category>

		<guid isPermaLink="false">http://dougfinke.com/blog/index.php/2010/05/15/powershell-hacker-1/</guid>
		<description><![CDATA[Why PowerShell Hacker? Why Not? I like Jeffrey Snover&#8217;s tweet &#8211; Become a first follower and join the dance! http://www.youtube.com/watch?v=fW8amMCVAJQ&#38;sns=em Silverlight Profiling PowerShell helper &#8211; Jason Jarrett uses PowerShell to capture and simply the steps of profiling his Silverlight app Script everything with PowerShell and IronRuby &#8211; shows how to use PowerShell Runspaces in IronRuby. [...]]]></description>
			<content:encoded><![CDATA[<p>Why PowerShell Hacker? Why Not? </p>
<p>I like Jeffrey Snover&rsquo;s tweet &#8211; Become a first follower and join the dance! <a href="http://www.youtube.com/watch?v=fW8amMCVAJQ&amp;sns=em">http://www.youtube.com/watch?v=fW8amMCVAJQ&amp;sns=em</a></p>
<ul>
<li><a href="http://elegantcode.com/2010/05/15/silverlight-profiling-powershell-helper/">Silverlight Profiling PowerShell helper</a> &ndash; Jason Jarrett uses PowerShell to capture and simply the steps of profiling his Silverlight app </li>
<li><a href="http://ironruby-rocks.com/2010/04/28/script-everything-with-powershell-and-ironruby/#IronRuby">Script everything with PowerShell and IronRuby</a> &ndash; shows how to use PowerShell Runspaces in IronRuby. Same as you would in C# </li>
<li><a href="http://huddledmasses.org/creating-wpf-uis-for-powershell-with-powerboots-and-visual-studio-wpf-designer/">Creating WPF UIs for PowerShell with PowerBoots and Visual Studio WPF Designer</a> &ndash; Joel Bennett creates a WPF GUI in Visual Studio and use the Xaml file in PowerShell PowerBoots </li>
<li><a href="http://blogs.msdn.com/powershell/archive/2010/05/01/a-powershell-wander-toolbox-mindset-expandproperty-dmzs-and-remote-profiles.aspx">A PowerShell Wander: ToolBox Mindset, &ndash;ExpandProperty, DMZs and Remote Profiles</a> &ndash; Jeffrey Snover writes about PowerShell as a <strong>toolbox and has </strong>general purpose utilities that creative people can use their inspiration to do things that the tool designers didn&rsquo;t think of when they developed the tool </li>
<li>Richard Siddaway uses the <em>Compare-Object </em>cmdlet in <a href="http://richardsiddaway.spaces.live.com/blog/cns!43CFA46A74CF3E96!2844.entry">Comparing folder contents</a> for diffing subdirectories </li>
<li>Very useful <a href="http://www.tellingmachine.com/post/Test-Member-The-Missing-PowerShell-Cmdlet.aspx">Test-Member &#8211; The Missing PowerShell Cmdlet</a> &#8211; Verifies whether a specific property or method member exists for a given .NET object </li>
<li><a href="http://blogs.msdn.com/virtual_pc_guy/archive/2010/05/03/powershell-script-to-connect-iso-to-a-vm-hyper-v.aspx">PowerShell Script to Connect .ISO to a VM [Hyper-V]</a> </li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.dougfinke.com/blog/index.php/2010/05/15/powershell-hacker-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I&#8217;m a Judge in the PowerShell Games</title>
		<link>http://www.dougfinke.com/blog/index.php/2010/04/23/im-a-judge-in-the-powershell-games/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=im-a-judge-in-the-powershell-games</link>
		<comments>http://www.dougfinke.com/blog/index.php/2010/04/23/im-a-judge-in-the-powershell-games/#comments</comments>
		<pubDate>Fri, 23 Apr 2010 13:14:23 +0000</pubDate>
		<dc:creator>Doug Finke</dc:creator>
				<category><![CDATA[2010 Scripting Games]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[WPK]]></category>

		<guid isPermaLink="false">http://dougfinke.com/blog/index.php/2010/04/23/im-a-judge-in-the-powershell-games/</guid>
		<description><![CDATA[Thanks for the invite Hey, Scripting Guy! (Ed Wilson) The 2010 Scripting Games Events There are Beginner and Advanced events, prizes and lots to learn, I know I will. PowerShell is an Automation Platform Surfaced as a command line console and scripting language. Become a productive IT Pro or Productive Programmer as never before on [...]]]></description>
			<content:encoded><![CDATA[<p>Thanks for the invite <a href="http://blogs.technet.com/heyscriptingguy/default.aspx">Hey, Scripting Guy! (Ed Wilson)</a></p>
<h3>The 2010 Scripting Games Events</h3>
<p>There are <a href="http://blogs.technet.com/heyscriptingguy/archive/2010/03/20/hey-scripting-guy-march-20-2010.aspx">Beginner and Advanced events</a>, prizes and lots to learn, I know I will.</p>
<h3>PowerShell is an Automation Platform</h3>
<p>Surfaced as a command line console and scripting language. </p>
<p>Become a productive IT Pro or Productive Programmer as never before on the Windows platform. </p>
<p>Watch the games and check out enormous range of applying PowerShell to your daily automation needs.</p>
<p>You can even use PowerShell to <a href="http://blogs.technet.com/heyscriptingguy/archive/2010/03/24/hey-scripting-guy-march-24-2010.aspx">build WPF GUIs with WPK</a>.</p>
<h3>Sign Up</h3>
<p>See you there!</p>
<table border="0" cellspacing="0" cellpadding="2" width="135">
<tbody>
<tr>
<td valign="top" width="133"><a href="http://blogs.technet.com/heyscriptingguy/archive/2010/04/19/hey-scripting-guy-april-19-2010.aspx"><img style="border-right-width: 0px; margin: 0px auto; display: block; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" alt="2010 Scripting Games" src="http://bit.ly/2010sgbadge" /></a> </td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.dougfinke.com/blog/index.php/2010/04/23/im-a-judge-in-the-powershell-games/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MVC+PAC+WPF == MVC4WPF</title>
		<link>http://www.dougfinke.com/blog/index.php/2010/04/18/mvcpacwpf-mvc4wpf/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=mvcpacwpf-mvc4wpf</link>
		<comments>http://www.dougfinke.com/blog/index.php/2010/04/18/mvcpacwpf-mvc4wpf/#comments</comments>
		<pubDate>Sun, 18 Apr 2010 12:11:50 +0000</pubDate>
		<dc:creator>Doug Finke</dc:creator>
				<category><![CDATA[MVC]]></category>
		<category><![CDATA[MVC4WPF]]></category>
		<category><![CDATA[PAC]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://dougfinke.com/blog/index.php/2010/04/18/mvcpacwpf-mvc4wpf/</guid>
		<description><![CDATA[MVC4WPF is based on a hybrid of the MVC (Model&#8211;View&#8211;Controller) pattern and the PAC (Presentation-abstraction-control) patterns. The creators have seen a dramatic improvement in productivity, ability to leverage entry level developers, and a massive reduction in development costs. The framework helps your developers follow the right path and do the right thing. Channel9 ARCast videos [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://mvc4wpf.codeplex.com/">MVC4WPF</a> is based on a hybrid of the <a href="http://en.wikipedia.org/wiki/Model-view-controller">MVC</a> (Model&ndash;View&ndash;Controller) pattern and the <a href="http://en.wikipedia.org/wiki/Presentation-abstraction-control">PAC</a> (Presentation-abstraction-control) patterns.</p>
<p>The creators have seen a dramatic improvement in productivity, ability to leverage entry level developers, and a massive reduction in development costs. The framework helps your developers follow the right path and do the right thing. </p>
<h3>Channel9 ARCast videos</h3>
<ul>
<li><a href="http://channel9.msdn.com/shows/ARCast.TV/ARCastTV-An-Overview-of-MVC4WPF-Part-1-of-3/">Part 1</a></li>
<li><a href="http://channel9.msdn.com/shows/ARCast.TV/ARCastTV-An-Overview-of-MVC4WPF-Part-2-of-3/">Part 2</a></li>
<li><a href="http://channel9.msdn.com/shows/ARCast.TV/ARCastTV-An-Overview-of-MVC4WPF-Part-3-of-3/">Part 3</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.dougfinke.com/blog/index.php/2010/04/18/mvcpacwpf-mvc4wpf/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PowerShell WPK NetFlix Viewer Using Microsoft&#8217;s OData</title>
		<link>http://www.dougfinke.com/blog/index.php/2010/03/28/powershell-wpk-netflix-viewer-using-microsofts-odata/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=powershell-wpk-netflix-viewer-using-microsofts-odata</link>
		<comments>http://www.dougfinke.com/blog/index.php/2010/03/28/powershell-wpk-netflix-viewer-using-microsofts-odata/#comments</comments>
		<pubDate>Sun, 28 Mar 2010 22:45:46 +0000</pubDate>
		<dc:creator>Doug Finke</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Netflix]]></category>
		<category><![CDATA[OData]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[WPK]]></category>

		<guid isPermaLink="false">http://dougfinke.com/blog/index.php/2010/03/28/powershell-wpk-netflix-viewer-using-microsofts-odata/</guid>
		<description><![CDATA[Netflix has partnered with Microsoft to create an OData API for the Netflix catalog information. Here it is OData Catalog API (Preview). Assuming you have Windows 7 installed (PowerShell comes out of the box) and PowerShell Pack the script below should work. If you don&#8217;t have Windows 7 no problem, you can download PowerShell Version [...]]]></description>
			<content:encoded><![CDATA[<p>Netflix has partnered with Microsoft to create an OData API for the Netflix catalog information. Here it is <a href="http://developer.netflix.com/docs/oData_Catalog">OData Catalog API (Preview)</a>.</p>
<p>Assuming you have Windows 7 installed (PowerShell comes out of the box) and <a href="http://code.msdn.microsoft.com/PowerShellPack">PowerShell Pack</a> the script below should work.</p>
<p>If you don&rsquo;t have Windows 7 no problem, you can download PowerShell Version 2 for your OS <a href="http://support.microsoft.com/kb/968929">HERE</a>.</p>
<p><a href="http://dougfinke.com/uploadPictures/PowerShellWPFNetFlixViewer_13523/image.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://dougfinke.com/uploadPictures/PowerShellWPFNetFlixViewer_13523/image_thumb.png" width="568" height="267" /></a> </p>
<h3>The Viewer</h3>
<p>Miguel de Icaza&rsquo;s talks about NetFlix and OData in his post <a href="http://tirania.org/blog/archive/2010/Mar-22.html">OData Client goes Open Source</a>. </p>
<p>Here are some other &lsquo;queries&rsquo; you can try in the viewer, just copy/paste it in the text box at the top and press enter.</p>
<ul>
<li>Name eq &#8216;The Name of The Rose&#8217; </li>
<li>ReleaseYear le 1989 and ReleaseYear ge 1980 and AverageRating gt 4 </li>
<li>Type eq &#8216;Movie&#8217; and Instant/Available eq true and (Rating eq &#8216;G&#8217; or Rating eq &#8216;PG-13&#8242;) </li>
<li>Type eq &#8216;Movie&#8217; and Instant/Available eq true and (Rating ne &#8216;R&#8217; and Rating ne &#8216;NC-17&#8242; and Rating ne &#8216;UR&#8217; and Rating ne &#8216;NR&#8217;) </li>
<li>substringof(&#8216;bank&#8217;,Synopsis) and ReleaseYear eq 2010 </li>
</ul>
<h3>The Code</h3>
<pre class="PowerShellColorizedScript"><span style="color: #00008b">Function</span> <span style="color: #8a2be2">Get-NetFlixTitles</span> <span style="color: #000000">{</span>
    <span style="color: #00008b">param</span> <span style="color: #000000">(</span><span style="color: #ff4500">$filter</span><span style="color: #000000">)</span>            

    <span style="color: #ff4500">$url</span> <span style="color: #a9a9a9">=</span> <span style="color: #8b0000">&quot;http://odata.netflix.com/Catalog/Titles?`$filter=&quot;</span>                

    <span style="color: #ff4500">$wc</span>   <span style="color: #a9a9a9">=</span> <span style="color: #0000ff">New-Object</span> <span style="color: #8a2be2">net.webclient</span>
    <span style="color: #ff4500">$feed</span> <span style="color: #a9a9a9">=</span> <span style="color: #008080">[xml]</span><span style="color: #000000">(</span><span style="color: #ff4500">$wc</span><span style="color: #a9a9a9">.</span><span style="color: #000000">downloadstring</span><span style="color: #000000">(</span><span style="color: #8b0000">&quot;$($url)$($filter)&quot;</span><span style="color: #000000">)</span><span style="color: #000000">)</span>            

    <span style="color: #ff4500">$feed</span> <span style="color: #a9a9a9">|</span>
        <span style="color: #0000ff">select</span> <span style="color: #000080">-ExpandProperty</span> <span style="color: #8a2be2">feed</span> <span style="color: #a9a9a9">|</span>
        <span style="color: #0000ff">select</span> <span style="color: #000080">-ExpandProperty</span> <span style="color: #8a2be2">entry</span> <span style="color: #a9a9a9">|</span>
            <span style="color: #0000ff">ForEach</span> <span style="color: #000000">{</span>
                <span style="color: #0000ff">New-Object</span> <span style="color: #8a2be2">PSObject</span> <span style="color: #000080">-Property</span> <span style="color: #000000">@{</span>
                <span style="color: #000000">Title</span> <span style="color: #a9a9a9">=</span> <span style="color: #ff4500">$_</span><span style="color: #a9a9a9">.</span><span style="color: #000000">title</span><span style="color: #a9a9a9">.</span><span style="color: #8b0000">'#text'</span>
                <span style="color: #000000">Url</span> <span style="color: #a9a9a9">=</span> <span style="color: #ff4500">$_</span><span style="color: #a9a9a9">.</span><span style="color: #000000">properties</span><span style="color: #a9a9a9">.</span><span style="color: #000000">TinyUrl</span>
            <span style="color: #000000">}</span>
    <span style="color: #000000">}</span>
<span style="color: #000000">}</span>            

<span style="color: #0000ff">Import-Module</span> <span style="color: #8a2be2">wpk</span>            

<span style="color: #0000ff">New-Window</span> <span style="color: #000080">-Title</span> <span style="color: #8b0000">&quot;NetFlix OData&quot;</span> <span style="color: #000080">-WindowStartupLocation</span> <span style="color: #8a2be2">CenterScreen</span> <span style="color: #000080">-Width</span> <span style="color: #800080">1200</span> <span style="color: #000080">-Height</span> <span style="color: #800080">600</span> <span style="color: #000080">-Show</span> <span style="color: #000080">-On_Loaded</span> <span style="color: #000000">{</span>
    <span style="color: #ff4500">$lstBox</span> <span style="color: #a9a9a9">=</span> <span style="color: #ff4500">$window</span> <span style="color: #a9a9a9">|</span> <span style="color: #0000ff">Get-ChildControl</span> <span style="color: #8a2be2">lstBox</span>
    <span style="color: #ff4500">$lstBox</span><span style="color: #a9a9a9">.</span><span style="color: #000000">ItemsSource</span> <span style="color: #a9a9a9">=</span> <span style="color: #000000">@(</span><span style="color: #0000ff">Get-NetFlixTitles</span> <span style="color: #8b0000">&quot;ReleaseYear eq 2010&quot;</span><span style="color: #000000">)</span>
<span style="color: #000000">}</span> <span style="color: #000000">{</span>
    <span style="color: #0000ff">New-Grid</span> <span style="color: #000080">-Rows</span> <span style="color: #800080">32</span><span style="color: #a9a9a9">,</span> <span style="color: #8a2be2">1*</span> <span style="color: #000080">-Columns</span> <span style="color: #800080">300</span><span style="color: #a9a9a9">,</span> <span style="color: #8a2be2">900*</span> <span style="color: #000000">{</span>            

        <span style="color: #0000ff">New-TextBox</span> <span style="color: #000080">-Name</span> <span style="color: #8a2be2">txtBox</span> <span style="color: #000080">-Text</span> <span style="color: #8b0000">&quot;ReleaseYear eq 2010&quot;</span> <span style="color: #000080">-Row</span> <span style="color: #800080">0</span> <span style="color: #000080">-ColumnSpan</span> <span style="color: #800080">2</span> <span style="color: #000080">-Margin</span> <span style="color: #800080">3</span> <span style="color: #000080">-On_PreviewKeyUp</span> <span style="color: #000000">{</span>
            <span style="color: #00008b">if</span><span style="color: #000000">(</span><span style="color: #ff4500">$_</span><span style="color: #a9a9a9">.</span><span style="color: #000000">Key</span> <span style="color: #a9a9a9">-eq</span> <span style="color: #8b0000">&quot;Enter&quot;</span><span style="color: #000000">)</span> <span style="color: #000000">{</span>
                <span style="color: #ff4500">$lstBox</span> <span style="color: #a9a9a9">=</span> <span style="color: #ff4500">$window</span> <span style="color: #a9a9a9">|</span> <span style="color: #0000ff">Get-ChildControl</span> <span style="color: #8a2be2">lstBox</span>
                <span style="color: #ff4500">$txtBox</span> <span style="color: #a9a9a9">=</span> <span style="color: #ff4500">$window</span> <span style="color: #a9a9a9">|</span> <span style="color: #0000ff">Get-ChildControl</span> <span style="color: #8a2be2">txtBox</span>
                <span style="color: #ff4500">$lstBox</span><span style="color: #a9a9a9">.</span><span style="color: #000000">ItemsSource</span> <span style="color: #a9a9a9">=</span> <span style="color: #000000">@(</span><span style="color: #0000ff">Get-NetFlixTitles</span> <span style="color: #8b0000">&quot;$($txtBox.Text)&quot;</span><span style="color: #000000">)</span>
            <span style="color: #000000">}</span>
        <span style="color: #000000">}</span>            

        <span style="color: #0000ff">New-ListBox</span> <span style="color: #000080">-Name</span> <span style="color: #8a2be2">lstBox</span> <span style="color: #000080">-Row</span> <span style="color: #800080">1</span> <span style="color: #000080">-Column</span> <span style="color: #800080">0</span> <span style="color: #000080">-DisplayMemberPath</span> <span style="color: #8a2be2">Title</span> <span style="color: #000000">`
</span>            <span style="color: #000080">-On_SelectionChanged</span> <span style="color: #000000">{</span>
                <span style="color: #ff4500">$browser</span> <span style="color: #a9a9a9">=</span> <span style="color: #ff4500">$window</span> <span style="color: #a9a9a9">|</span> <span style="color: #0000ff">Get-ChildControl</span> <span style="color: #8a2be2">browser</span>
                <span style="color: #ff4500">$browser</span><span style="color: #a9a9a9">.</span><span style="color: #000000">Source</span> <span style="color: #a9a9a9">=</span> <span style="color: #ff4500">$this</span><span style="color: #a9a9a9">.</span><span style="color: #000000">SelectedItem</span><span style="color: #a9a9a9">.</span><span style="color: #000000">Url</span>
            <span style="color: #000000">}</span>            

        <span style="color: #0000ff">New-WebBrowser</span> <span style="color: #000080">-Name</span> <span style="color: #8a2be2">browser</span> <span style="color: #000080">-Column</span> <span style="color: #800080">1</span> <span style="color: #000080">-Row</span> <span style="color: #800080">1</span>
    <span style="color: #000000">}</span>
<span style="color: #000000">}</span></pre>
<h3>Download the PowerShell Script</h3>
<p><iframe style="padding-bottom: 0px; background-color: #fcfcfc; padding-left: 0px; width: 98px; padding-right: 0px; height: 115px; padding-top: 0px" title="Preview" marginheight="0" src="http://cid-5dec3b62d9308943.skydrive.live.com/embedicon.aspx/PowerShell%20NetFlix%20Viewer/Get-NetFlix.zip" frameborder="0" marginwidth="0" scrolling="no"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dougfinke.com/blog/index.php/2010/03/28/powershell-wpk-netflix-viewer-using-microsofts-odata/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>My PowerShell WPF Article is up on the Microsoft Site</title>
		<link>http://www.dougfinke.com/blog/index.php/2010/03/25/my-powershell-wpf-article-is-up-on-the-microsoft-site/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=my-powershell-wpf-article-is-up-on-the-microsoft-site</link>
		<comments>http://www.dougfinke.com/blog/index.php/2010/03/25/my-powershell-wpf-article-is-up-on-the-microsoft-site/#comments</comments>
		<pubDate>Fri, 26 Mar 2010 01:41:51 +0000</pubDate>
		<dc:creator>Doug Finke</dc:creator>
				<category><![CDATA[Article]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[WPK]]></category>

		<guid isPermaLink="false">http://dougfinke.com/blog/index.php/2010/03/25/my-powershell-wpf-article-is-up-on-the-microsoft-site/</guid>
		<description><![CDATA[Using the Windows Presentation Foundation PowerShell Kit to Create a GUI]]></description>
			<content:encoded><![CDATA[<p><a href="http://blogs.technet.com/heyscriptingguy/archive/2010/03/24/hey-scripting-guy-march-24-2010.aspx">Using the Windows Presentation Foundation PowerShell Kit to Create a GUI</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dougfinke.com/blog/index.php/2010/03/25/my-powershell-wpf-article-is-up-on-the-microsoft-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New open source project called MVC4WPF</title>
		<link>http://www.dougfinke.com/blog/index.php/2010/01/10/new-open-source-project-called-mvc4wpf/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=new-open-source-project-called-mvc4wpf</link>
		<comments>http://www.dougfinke.com/blog/index.php/2010/01/10/new-open-source-project-called-mvc4wpf/#comments</comments>
		<pubDate>Mon, 11 Jan 2010 02:08:09 +0000</pubDate>
		<dc:creator>Doug Finke</dc:creator>
				<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://dougfinke.com/blog/index.php/2010/01/10/new-open-source-project-called-mvc4wpf/</guid>
		<description><![CDATA[It is a new framework and guidance package that helps you quickly build enterprise WPF applications. They have seen a dramatic improvement in productivity, ability to leverage entry level developers, and a massive reduction in development costs. The framework helps your developers follow the right path and do the right thing. An Overview of MVC4WPF [...]]]></description>
			<content:encoded><![CDATA[<p>It is a new framework and guidance package that helps you quickly build enterprise WPF applications. They have seen a dramatic improvement in productivity, ability to leverage entry level developers, and a massive reduction in development costs. The framework helps your developers follow the right path and do the right thing. </p>
<p><a href="http://channel9.msdn.com/shows/ARCast.TV/ARCastTV-An-Overview-of-MVC4WPF-Part-1-of-3/">An Overview of MVC4WPF &#8211; Part 1 of 3</a></p>
<p>via <a href="http://twitter.com/sempf/statuses/7613287448">Bill Sempf</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dougfinke.com/blog/index.php/2010/01/10/new-open-source-project-called-mvc4wpf/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>10 PowerShell Posts I Did in 2009</title>
		<link>http://www.dougfinke.com/blog/index.php/2010/01/01/10-powershell-posts-i-did-in-2009/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=10-powershell-posts-i-did-in-2009</link>
		<comments>http://www.dougfinke.com/blog/index.php/2010/01/01/10-powershell-posts-i-did-in-2009/#comments</comments>
		<pubDate>Fri, 01 Jan 2010 20:05:15 +0000</pubDate>
		<dc:creator>Doug Finke</dc:creator>
				<category><![CDATA[Excel]]></category>
		<category><![CDATA[ISE]]></category>
		<category><![CDATA[Integrated Scripting Environment]]></category>
		<category><![CDATA[Intellipad]]></category>
		<category><![CDATA[MGrammar]]></category>
		<category><![CDATA[Oslo]]></category>
		<category><![CDATA[Pivot Tables]]></category>
		<category><![CDATA[PowerBoots]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[SQL Server Modeling]]></category>
		<category><![CDATA[Try Python]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[trigrams]]></category>
		<category><![CDATA[yUML]]></category>

		<guid isPermaLink="false">http://dougfinke.com/blog/index.php/2010/01/01/10-powershell-posts-i-did-in-2009/</guid>
		<description><![CDATA[I had fun doing these PowerShell posts. &#160; Try PowerShell &#8211; An Interactive Tutorial Michael Foord inspired this with his Try Python Silverlight application How to Host PowerShell in a WPF Application A How To video PowerShell Out-ExcelPivotTable &#8211; Quickly Create Pivot Tables in Microsoft Excel Automating Excel Pivot tables with PowerShell PowerShell, An Exercise [...]]]></description>
			<content:encoded><![CDATA[<p>I had fun doing these PowerShell posts.</p>
<p><a href="http://dougfinke.com/blog/index.php/2009/01/10/11th-grade-activities-for-career-success-powershell/"><img style="display: block; float: none; margin-left: auto; margin-right: auto" title="image" alt="image" src="http://dougfinke.com/uploadPictures/MyTop5PowerShellPosts_85B8/image.png" width="454" height="284" /></a>&#160;</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="276">
<p><a href="http://dougfinke.com/blog/index.php/2009/09/28/try-powershell-an-interactive-tutorial/">Try PowerShell &ndash; An Interactive Tutorial</a></p>
</td>
<td valign="top" width="278">
<p><a href="http://www.voidspace.org.uk/python/weblog/index.shtml">Michael Foord</a> inspired this with his <a href="http://www.trypython.org/">Try Python</a> Silverlight application</p>
</td>
</tr>
<tr>
<td valign="top" width="276">
<p><a href="http://dougfinke.com/blog/index.php/2009/09/02/how-to-host-powershell-in-a-wpf-application/">How to Host PowerShell in a WPF Application</a></p>
</td>
<td valign="top" width="278">
<p>A How To video</p>
</td>
</tr>
<tr>
<td valign="top" width="276">
<p><a href="http://dougfinke.com/blog/index.php/2009/06/24/powershell-out-excelpivottable-quickly-create-pivot-tables-in-microsoft-excel/">PowerShell Out-ExcelPivotTable &ndash; Quickly Create Pivot Tables in Microsoft Excel</a></p>
</td>
<td valign="top" width="278">
<p>Automating Excel Pivot tables with PowerShell</p>
</td>
</tr>
<tr>
<td valign="top" width="276">
<p><a href="http://dougfinke.com/blog/index.php/2009/02/17/powershell-an-exercise-in-species-barcoding/">PowerShell, An Exercise in Species Barcoding</a></p>
</td>
<td valign="top" width="278">
<p>Inspired by Peter Norvig&rsquo;s (Director of research at Google) python version</p>
</td>
</tr>
<tr>
<td valign="top" width="276">
<p><a href="http://dougfinke.com/blog/index.php/2009/02/07/powershell-find-the-k-most-common-words-in-a-file/">PowerShell &ndash; Find the K most common words in a file</a></p>
</td>
<td valign="top" width="278">
<p>Based on Jon Bentley&rsquo;s approach in &ldquo;Little Languages&rdquo;</p>
</td>
</tr>
<tr>
<td valign="top" width="276">
<p><a href="http://dougfinke.com/blog/index.php/2009/02/06/powershell-ise-cream-alias-expansion/">PowerShell ISE-Cream &ndash; Alias Expansion</a></p>
</td>
<td valign="top" width="278">
<p>Uses PowerShell&rsquo;s tokenizer to expand aliases like %, ? etc. into ForEach and Where</p>
</td>
</tr>
<tr>
<td valign="top" width="276">
<p><a href="http://dougfinke.com/blog/index.php/2009/08/29/update-dynamic-guis-and-the-powershell-pipeline/">Update: Dynamic GUIs and the PowerShell Pipeline</a></p>
</td>
<td valign="top" width="278">
<p>How to inject GUIs into a PowerShell Pipeline</p>
</td>
</tr>
<tr>
<td valign="top" width="276">
<p><a href="http://dougfinke.com/blog/index.php/2009/08/20/powershell-yuml-workbench/">PowerShell yUML Workbench</a></p>
</td>
<td valign="top" width="278">
<p>yUML is a web service.&#160; A How To using PowerShell to generate UML diagrams</p>
</td>
</tr>
<tr>
<td valign="top" width="276">
<p><a href="http://dougfinke.com/blog/index.php/2009/07/01/powershell-powerboots-and-an-oslo-dsl-grammar/">PowerShell, PowerBoots and an Oslo DSL Grammar</a></p>
</td>
<td valign="top" width="278">
<p>Blending MGrammar and PowerShell</p>
</td>
</tr>
<tr>
<td valign="top" width="276">
<p><a href="http://dougfinke.com/blog/index.php/2009/05/20/creating-and-displaying-trigrams-with-powershell/">Creating and Displaying Trigrams with PowerShell</a></p>
</td>
<td valign="top" width="278">
<p>Based on Wolfram|Alphas Trigram visuals. Combines PowerShell and yUML</p>
</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.dougfinke.com/blog/index.php/2010/01/01/10-powershell-posts-i-did-in-2009/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
