<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Progressive Digressive</title>
	
	<link>http://www.marcuswhitworth.com</link>
	<description>Marcus Whitworth's tech blog – .NET, C#, Silverlight, WPF, Flex…etc, etc</description>
	<lastBuildDate>Sat, 06 Feb 2010 09:50:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/MarcusWhitworth" /><feedburner:info uri="marcuswhitworth" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Dynamic Linq with Expression Trees</title>
		<link>http://feedproxy.google.com/~r/MarcusWhitworth/~3/lFWZCYWP-Nk/</link>
		<comments>http://www.marcuswhitworth.com/2009/12/dynamic-linq-with-expression-trees/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 19:28:16 +0000</pubDate>
		<dc:creator>Marcus</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[expression trees]]></category>
		<category><![CDATA[linq]]></category>

		<guid isPermaLink="false">http://www.marcuswhitworth.com/?p=106</guid>
		<description><![CDATA[I recently came across a project requirement for the client to create custom validation rules for retrieving data from the SQL database. The rules needed be applied against any number of member applications, and can be altered by the client at any point. From the client perspective, the administration of the rules would look something [...]]]></description>
			<content:encoded><![CDATA[<p>I recently came across a project requirement for the client to create custom validation rules for retrieving data from the SQL database.  The rules needed be applied against any number of member applications, and can be altered by the client at any point.</p>
<p>From the client perspective, the administration of the rules would look something like the following:</p>
<p><img class="aligncenter size-full wp-image-110" title="Rules Administration" src="http://www.marcuswhitworth.com/wp-content/uploads/2009/12/Screen-shot-2009-12-02-at-15.19.47.png" alt="Rules Administration" width="477" height="125" /></p>
<p>Simple enough concept.  Historically, given such a requirement, you'd likely end up with some fudged SQL string (if querying a database), and/or a whole lot of conditional logic.  The application already uses Linq2SQL, so I didn't want to go backwards by introducing some extensive SQL string generation.</p>
<p>The first Linq based option I came across was the <a href="http://weblogs.asp.net/scottgu/archive/2008/01/07/dynamic-linq-part-1-using-the-linq-dynamic-query-library.aspx" target="_blank">Dynamic Linq Query Library</a>, which essentially enables you to use SQL-like strings as expressions in your conditional clauses.  Nice, but it still smelled a bit like the SQL string concatenation of old.</p>
<p>The second option I looked at was <a href="http://www.albahari.com/nutshell/predicatebuilder.aspx" target="_blank">PredicateBuilder</a>.  It's a neat solution for the right problem, but it assumes that you know the properties/columns you're querying against at compile time.</p>
<p>So, I decided to have a play around with Expression Trees, in an effort to dynamically generate my conditional expressions at runtime.  I hadn't really delved much into this area before, so I figured it'd be a good learning experience, even if it didn't end up working out.  To cut to the chase, the method I ended up with for parsing my rules into Lambda Expressions looks like the following:</p>
<pre  class="brush:csharp">public static Expression&lt;Func&lt;T, bool&gt;&gt; GetExpression&lt;T&gt;(
	string propertyName, string operatorType, string propertyValue)
{
	var isNegated = operatorType.StartsWith("!");
	if (isNegated)
		operatorType = operatorType.Substring(1);

	var parameter = Expression.Parameter(typeof (T), "type");
	var property = Expression.Property(parameter, propertyName);

	// Cast propertyValue to correct property type
	var td = TypeDescriptor.GetConverter(property.Type);
	var constantValue = Expression.Constant(td.ConvertFromString(propertyValue), property.Type);

	// Check if specified method is an Expression member
	var operatorMethod = typeof(Expression).GetMethod(operatorType, new[] { typeof(MemberExpression), typeof(ConstantExpression) });

	Expression expression;

	if (operatorMethod == null)
	{
		// Execute against type members
		var method = property.Type.GetMethod(operatorType, new[] {property.Type});
		expression = Expression.Call(property, method, constantValue);
	}
	else
	{
		// Execute the passed operator method (e.g. Expression.GreaterThan)
		expression = (Expression) operatorMethod.Invoke(null, new object[] {property, constantValue});
	}

	if (isNegated)
		expression = Expression.Not(expression);

	return Expression.Lambda&lt;Func&lt;T, bool&gt;&gt;(expression, parameter);
}</pre>
<p>Which can be executed with a call like the following:</p>
<pre class="brush:csharp">foreach (var rule in rules)
{
	applicants = applicants.Where(
		GetExpression&lt;Applicant&gt;(
			rule.MemberName, // The Applicant property
			rule.Operator, // Equals, Contains, GreaterThan, etc
			rule.Value)
		);
}</pre>
<p>The rules are looped over, and Linq does its magic by combining all the separate rules with AND statements in the resulting query.</p>
<p>A few things to note:</p>
<ul>
<li>Operators are just the method names to be called, against the Expression type, or any other CLR or custom type.  If you put a ! in front of the operator, it negates the method result (!Contains would read 'Does Not Contain').</li>
<li>Reflection isn't necessary for building an expression, I just use it here to enable runtime operator implementation, against both the Expression class and potentially any other class.</li>
<li>If you wanted to combine your rules with OR statements, it could be done easily enough with logic similar to what PredicateBuilder uses.</li>
<li>There is possibly/probably better ways to do this - if you know one, speak up!</li>
</ul>
<p>Is this necessarily any better than using the Dynamic Linq library?  A bit - it doesn't really give me any compile-time type safety benefits, but I could potentially handle certain exceptions that I perhaps wouldn't be able to detect using Dynamic Linq, such as casting the value to the correct type.  On top of that, I like it more, it <em>feels</em> more robust, and doesn't require external libraries to work.  If nothing else, it gave me an excuse to get my head around some lower-level Expression Tree stuff :)</p>
		<br />
		<a href="http://www.dotnetkicks.com/kick/?title=Dynamic Linq with Expression Trees&url=http%3A%2F%2Fwww.marcuswhitworth.com%2F2009%2F12%2Fdynamic-linq-with-expression-trees%2F"> 
		<img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3A%2F%2Fwww.marcuswhitworth.com%2F2009%2F12%2Fdynamic-linq-with-expression-trees%2F" border="0" alt="Kick It on DotNetKicks.com" /> </a>
		<p align="left"><a target="_blank" class="tt" href="http://twitter.com/home/?status=Dynamic+Linq+with+Expression+Trees+www.bit.ly/4LSICB" title="Post to Twitter"><img class="nothumb" src="http://www.marcuswhitworth.com/wp-content/plugins/tweet-this/icons/tt-twitter-micro3.png" alt="Post to Twitter" /></a> <a target="_blank" class="tt" href="http://buzz.yahoo.com/submit?submitUrl=http://www.marcuswhitworth.com/2009/12/dynamic-linq-with-expression-trees/&amp;submitHeadline=Dynamic+Linq+with+Expression+Trees" title="Post to Yahoo Buzz"><img class="nothumb" src="http://www.marcuswhitworth.com/wp-content/plugins/tweet-this/icons/tt-buzz-micro3.png" alt="Post to Yahoo Buzz" /></a> <a target="_blank" class="tt" href="http://delicious.com/post?url=http://www.marcuswhitworth.com/2009/12/dynamic-linq-with-expression-trees/&amp;title=Dynamic+Linq+with+Expression+Trees" title="Post to Delicious"><img class="nothumb" src="http://www.marcuswhitworth.com/wp-content/plugins/tweet-this/icons/tt-delicious-micro3.png" alt="Post to Delicious" /></a> <a target="_blank" class="tt" href="http://digg.com/submit?url=http://www.marcuswhitworth.com/2009/12/dynamic-linq-with-expression-trees/&amp;title=Dynamic+Linq+with+Expression+Trees" title="Post to Digg"><img class="nothumb" src="http://www.marcuswhitworth.com/wp-content/plugins/tweet-this/icons/tt-digg-micro3.png" alt="Post to Digg" /></a> <a target="_blank" class="tt" href="http://reddit.com/submit?url=http://www.marcuswhitworth.com/2009/12/dynamic-linq-with-expression-trees/&amp;title=Dynamic+Linq+with+Expression+Trees" title="Post to Reddit"><img class="nothumb" src="http://www.marcuswhitworth.com/wp-content/plugins/tweet-this/icons/tt-reddit-micro3.png" alt="Post to Reddit" /></a> <a target="_blank" class="tt" href="http://stumbleupon.com/submit?url=http://www.marcuswhitworth.com/2009/12/dynamic-linq-with-expression-trees/&amp;title=Dynamic+Linq+with+Expression+Trees" title="Post to StumbleUpon"><img class="nothumb" src="http://www.marcuswhitworth.com/wp-content/plugins/tweet-this/icons/tt-su-micro3.png" alt="Post to StumbleUpon" /></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcusWhitworth?a=lFWZCYWP-Nk:cHl7r6kQO5E:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/MarcusWhitworth?i=lFWZCYWP-Nk:cHl7r6kQO5E:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcusWhitworth/~4/lFWZCYWP-Nk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.marcuswhitworth.com/2009/12/dynamic-linq-with-expression-trees/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.marcuswhitworth.com/2009/12/dynamic-linq-with-expression-trees/</feedburner:origLink></item>
		<item>
		<title>Is Silverlight overtaking both Flex and AIR?</title>
		<link>http://feedproxy.google.com/~r/MarcusWhitworth/~3/VQiKxGrDvQw/</link>
		<comments>http://www.marcuswhitworth.com/2009/11/is-silverlight-overtaking-both-flex-and-air/#comments</comments>
		<pubDate>Wed, 18 Nov 2009 19:53:05 +0000</pubDate>
		<dc:creator>Marcus</dc:creator>
				<category><![CDATA[Comparisons]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[silverlight]]></category>

		<guid isPermaLink="false">http://www.marcuswhitworth.com/?p=101</guid>
		<description><![CDATA[Reading the feature list of the upcoming Silverlight 4 release (now in beta), I am more than a bit impressed.  Up to now, there has been a few glaring features by which Silverlight was trailing behind Flex - camera/mic input; printing; clipboard access; and right-to-left text being ones that spring to mind.  Admittedly, all of [...]]]></description>
			<content:encoded><![CDATA[<p>Reading <a href="http://timheuer.com/blog/archive/2009/11/18/whats-new-in-silverlight-4-complete-guide-new-features.aspx" target="_blank">the feature list</a> of the upcoming Silverlight 4 release (now in beta), I am more than a bit impressed.  Up to now, there has been a few glaring features by which Silverlight was trailing behind Flex - camera/mic input; printing; clipboard access; and right-to-left text being ones that spring to mind.  Admittedly, all of these are fairly niche features which most applications wouldn't require.</p>
<p>Silverlight 4 not only brings in all these features, but also a pile of others.  Interestingly, they seem to be making a direct pitch against Adobe AIR with many of the features.  The new Elevated Trust Applications feature (for out-of-browser apps), enables a host of features typically reserved for desktop applications: <a href="http://timheuer.com/blog/archive/2009/11/18/whats-new-in-silverlight-4-complete-guide-new-features.aspx#localfiles" target="_blank">Local file access</a>; <a href="http://timheuer.com/blog/archive/2009/11/18/whats-new-in-silverlight-4-complete-guide-new-features.aspx#toast" target="_blank">Notifications API</a>; <a href="http://timheuer.com/blog/archive/2009/11/18/whats-new-in-silverlight-4-complete-guide-new-features.aspx#fullscreen" target="_blank">Full-screen full-keyboard access</a>; <a href="http://timheuer.com/blog/archive/2009/11/18/whats-new-in-silverlight-4-complete-guide-new-features.aspx#xdomain" target="_blank">Cross-domain policy-free networking</a>; and <a href="http://timheuer.com/blog/archive/2009/11/18/whats-new-in-silverlight-4-complete-guide-new-features.aspx#droptarget" target="_blank">Drop targets</a>.  Of course, features aside, the huge advantage of the Silverlight desktop approach over AIR is that there is only one runtime plugin required.</p>
<p>At the speed Microsoft is moving forward with Silverlight, Adobe is going to have to start seriously upping their commitment to the Flash platform if they want to stay at the top of the game.  Up to now, they could always give the argument of Flex being more feature-rich, and the ease of adaptation to the desktop with AIR - with both of these arguments now void, and Microsoft firmly remaining miles ahead in the developer tooling scene, Adobe's work is cut out.  They still have greater marketplace penetration with Flash player, but that lead is only going to narrow also.</p>
<p>You've got to love competition!</p>
		<br />
		<a href="http://www.dotnetkicks.com/kick/?title=Is Silverlight overtaking both Flex and AIR?&url=http%3A%2F%2Fwww.marcuswhitworth.com%2F2009%2F11%2Fis-silverlight-overtaking-both-flex-and-air%2F"> 
		<img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3A%2F%2Fwww.marcuswhitworth.com%2F2009%2F11%2Fis-silverlight-overtaking-both-flex-and-air%2F" border="0" alt="Kick It on DotNetKicks.com" /> </a>
		<p align="left"><a target="_blank" class="tt" href="http://twitter.com/home/?status=Is+Silverlight+overtaking+both+Flex+and+AIR%3F+www.bit.ly/1LS0o7" title="Post to Twitter"><img class="nothumb" src="http://www.marcuswhitworth.com/wp-content/plugins/tweet-this/icons/tt-twitter-micro3.png" alt="Post to Twitter" /></a> <a target="_blank" class="tt" href="http://buzz.yahoo.com/submit?submitUrl=http://www.marcuswhitworth.com/2009/11/is-silverlight-overtaking-both-flex-and-air/&amp;submitHeadline=Is+Silverlight+overtaking+both+Flex+and+AIR%3F" title="Post to Yahoo Buzz"><img class="nothumb" src="http://www.marcuswhitworth.com/wp-content/plugins/tweet-this/icons/tt-buzz-micro3.png" alt="Post to Yahoo Buzz" /></a> <a target="_blank" class="tt" href="http://delicious.com/post?url=http://www.marcuswhitworth.com/2009/11/is-silverlight-overtaking-both-flex-and-air/&amp;title=Is+Silverlight+overtaking+both+Flex+and+AIR%3F" title="Post to Delicious"><img class="nothumb" src="http://www.marcuswhitworth.com/wp-content/plugins/tweet-this/icons/tt-delicious-micro3.png" alt="Post to Delicious" /></a> <a target="_blank" class="tt" href="http://digg.com/submit?url=http://www.marcuswhitworth.com/2009/11/is-silverlight-overtaking-both-flex-and-air/&amp;title=Is+Silverlight+overtaking+both+Flex+and+AIR%3F" title="Post to Digg"><img class="nothumb" src="http://www.marcuswhitworth.com/wp-content/plugins/tweet-this/icons/tt-digg-micro3.png" alt="Post to Digg" /></a> <a target="_blank" class="tt" href="http://reddit.com/submit?url=http://www.marcuswhitworth.com/2009/11/is-silverlight-overtaking-both-flex-and-air/&amp;title=Is+Silverlight+overtaking+both+Flex+and+AIR%3F" title="Post to Reddit"><img class="nothumb" src="http://www.marcuswhitworth.com/wp-content/plugins/tweet-this/icons/tt-reddit-micro3.png" alt="Post to Reddit" /></a> <a target="_blank" class="tt" href="http://stumbleupon.com/submit?url=http://www.marcuswhitworth.com/2009/11/is-silverlight-overtaking-both-flex-and-air/&amp;title=Is+Silverlight+overtaking+both+Flex+and+AIR%3F" title="Post to StumbleUpon"><img class="nothumb" src="http://www.marcuswhitworth.com/wp-content/plugins/tweet-this/icons/tt-su-micro3.png" alt="Post to StumbleUpon" /></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcusWhitworth?a=VQiKxGrDvQw:AM38r91CRwc:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/MarcusWhitworth?i=VQiKxGrDvQw:AM38r91CRwc:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcusWhitworth/~4/VQiKxGrDvQw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.marcuswhitworth.com/2009/11/is-silverlight-overtaking-both-flex-and-air/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.marcuswhitworth.com/2009/11/is-silverlight-overtaking-both-flex-and-air/</feedburner:origLink></item>
		<item>
		<title>Silverlight tools for the Mac</title>
		<link>http://feedproxy.google.com/~r/MarcusWhitworth/~3/NTaHRTHKblM/</link>
		<comments>http://www.marcuswhitworth.com/2009/10/silverlight-tools-for-the-mac/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 14:48:00 +0000</pubDate>
		<dc:creator>Marcus</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[silverlight]]></category>

		<guid isPermaLink="false">http://www.marcuswhitworth.com/?p=99</guid>
		<description><![CDATA[Just reading about the efforts to produce an Eclipse-based Silverlight development platform for the Mac - quite cool. I have to think though, perhaps the effort would have been better spent creating a port of Blend for the Mac... it seems to me that only a tiny minority of developers would opt for Eclipse over [...]]]></description>
			<content:encoded><![CDATA[<p>Just reading about <a href="http://team.silverlight.net/announcement/eclipse-tools-for-silverlight-now-available/" target="_blank">the efforts to produce an Eclipse-based Silverlight development platform</a> for the Mac - quite cool.</p>
<p>I have to think though, perhaps the effort would have been better spent creating a port of Blend for the Mac... it seems to me that only a <em>tiny</em> minority of developers would opt for Eclipse over Visual Studio; whereas I'd guess nearly all designers <a href="http://forums.silverlight.net/forums/t/34817.aspx" target="_blank">would prefer to work natively</a> within MacOS.</p>
<p>I can kind of understand why they've done it, but I can only hope there's another project underway with that Blend port...</p>
		<br />
		<a href="http://www.dotnetkicks.com/kick/?title=Silverlight tools for the Mac&url=http%3A%2F%2Fwww.marcuswhitworth.com%2F2009%2F10%2Fsilverlight-tools-for-the-mac%2F"> 
		<img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3A%2F%2Fwww.marcuswhitworth.com%2F2009%2F10%2Fsilverlight-tools-for-the-mac%2F" border="0" alt="Kick It on DotNetKicks.com" /> </a>
		<p align="left"><a target="_blank" class="tt" href="http://twitter.com/home/?status=Silverlight+tools+for+the+Mac+www.bit.ly/5xJTau" title="Post to Twitter"><img class="nothumb" src="http://www.marcuswhitworth.com/wp-content/plugins/tweet-this/icons/tt-twitter-micro3.png" alt="Post to Twitter" /></a> <a target="_blank" class="tt" href="http://buzz.yahoo.com/submit?submitUrl=http://www.marcuswhitworth.com/2009/10/silverlight-tools-for-the-mac/&amp;submitHeadline=Silverlight+tools+for+the+Mac" title="Post to Yahoo Buzz"><img class="nothumb" src="http://www.marcuswhitworth.com/wp-content/plugins/tweet-this/icons/tt-buzz-micro3.png" alt="Post to Yahoo Buzz" /></a> <a target="_blank" class="tt" href="http://delicious.com/post?url=http://www.marcuswhitworth.com/2009/10/silverlight-tools-for-the-mac/&amp;title=Silverlight+tools+for+the+Mac" title="Post to Delicious"><img class="nothumb" src="http://www.marcuswhitworth.com/wp-content/plugins/tweet-this/icons/tt-delicious-micro3.png" alt="Post to Delicious" /></a> <a target="_blank" class="tt" href="http://digg.com/submit?url=http://www.marcuswhitworth.com/2009/10/silverlight-tools-for-the-mac/&amp;title=Silverlight+tools+for+the+Mac" title="Post to Digg"><img class="nothumb" src="http://www.marcuswhitworth.com/wp-content/plugins/tweet-this/icons/tt-digg-micro3.png" alt="Post to Digg" /></a> <a target="_blank" class="tt" href="http://reddit.com/submit?url=http://www.marcuswhitworth.com/2009/10/silverlight-tools-for-the-mac/&amp;title=Silverlight+tools+for+the+Mac" title="Post to Reddit"><img class="nothumb" src="http://www.marcuswhitworth.com/wp-content/plugins/tweet-this/icons/tt-reddit-micro3.png" alt="Post to Reddit" /></a> <a target="_blank" class="tt" href="http://stumbleupon.com/submit?url=http://www.marcuswhitworth.com/2009/10/silverlight-tools-for-the-mac/&amp;title=Silverlight+tools+for+the+Mac" title="Post to StumbleUpon"><img class="nothumb" src="http://www.marcuswhitworth.com/wp-content/plugins/tweet-this/icons/tt-su-micro3.png" alt="Post to StumbleUpon" /></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcusWhitworth?a=NTaHRTHKblM:lFv1W7AmnsY:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/MarcusWhitworth?i=NTaHRTHKblM:lFv1W7AmnsY:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcusWhitworth/~4/NTaHRTHKblM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.marcuswhitworth.com/2009/10/silverlight-tools-for-the-mac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.marcuswhitworth.com/2009/10/silverlight-tools-for-the-mac/</feedburner:origLink></item>
		<item>
		<title>ReSharper 5 – and I thought 4 was good</title>
		<link>http://feedproxy.google.com/~r/MarcusWhitworth/~3/qFiTRx4hvIs/</link>
		<comments>http://www.marcuswhitworth.com/2009/10/resharper-5-and-i-thought-4-was-good/#comments</comments>
		<pubDate>Tue, 13 Oct 2009 12:12:27 +0000</pubDate>
		<dc:creator>Marcus</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[visual studio]]></category>

		<guid isPermaLink="false">http://www.marcuswhitworth.com/?p=91</guid>
		<description><![CDATA[Reading this preliminary list of the upcoming features of ReSharper 5, it makes me wonder how any .NET developer could ever be without a tool like this.  Among the favorites would have to be Project Refactorings, and Call/Value Tracking.  Genius. Having used the refactoring-and-[insert feature here]-anaemic Flex Builder 3 at length on a few recent [...]]]></description>
			<content:encoded><![CDATA[<p>Reading <a href="http://blogs.jetbrains.com/dotnet/2009/10/resharper-50-overview/" target="_blank">this preliminary list of the upcoming features</a> of ReSharper 5, it makes me wonder how any .NET developer could ever be without a tool like this.  Among the favorites would have to be Project Refactorings, and Call/Value Tracking.  Genius.</p>
<p>Having used the refactoring-and-<em>[insert feature here]</em>-anaemic <a href="http://www.adobe.com/products/flex/features/flex_builder/" target="_blank">Flex Builder 3</a> at length on a few recent projects, life just seems to get better and better in Visual Studio land.</p>
		<br />
		<a href="http://www.dotnetkicks.com/kick/?title=ReSharper 5 &#8211; and I thought 4 was good&url=http%3A%2F%2Fwww.marcuswhitworth.com%2F2009%2F10%2Fresharper-5-and-i-thought-4-was-good%2F"> 
		<img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3A%2F%2Fwww.marcuswhitworth.com%2F2009%2F10%2Fresharper-5-and-i-thought-4-was-good%2F" border="0" alt="Kick It on DotNetKicks.com" /> </a>
		<p align="left"><a target="_blank" class="tt" href="http://twitter.com/home/?status=ReSharper+5+%E2%80%93+and+I+thought+4+was+good+www.bit.ly/8j6mmq" title="Post to Twitter"><img class="nothumb" src="http://www.marcuswhitworth.com/wp-content/plugins/tweet-this/icons/tt-twitter-micro3.png" alt="Post to Twitter" /></a> <a target="_blank" class="tt" href="http://buzz.yahoo.com/submit?submitUrl=http://www.marcuswhitworth.com/2009/10/resharper-5-and-i-thought-4-was-good/&amp;submitHeadline=ReSharper+5+%E2%80%93+and+I+thought+4+was+good" title="Post to Yahoo Buzz"><img class="nothumb" src="http://www.marcuswhitworth.com/wp-content/plugins/tweet-this/icons/tt-buzz-micro3.png" alt="Post to Yahoo Buzz" /></a> <a target="_blank" class="tt" href="http://delicious.com/post?url=http://www.marcuswhitworth.com/2009/10/resharper-5-and-i-thought-4-was-good/&amp;title=ReSharper+5+%E2%80%93+and+I+thought+4+was+good" title="Post to Delicious"><img class="nothumb" src="http://www.marcuswhitworth.com/wp-content/plugins/tweet-this/icons/tt-delicious-micro3.png" alt="Post to Delicious" /></a> <a target="_blank" class="tt" href="http://digg.com/submit?url=http://www.marcuswhitworth.com/2009/10/resharper-5-and-i-thought-4-was-good/&amp;title=ReSharper+5+%E2%80%93+and+I+thought+4+was+good" title="Post to Digg"><img class="nothumb" src="http://www.marcuswhitworth.com/wp-content/plugins/tweet-this/icons/tt-digg-micro3.png" alt="Post to Digg" /></a> <a target="_blank" class="tt" href="http://reddit.com/submit?url=http://www.marcuswhitworth.com/2009/10/resharper-5-and-i-thought-4-was-good/&amp;title=ReSharper+5+%E2%80%93+and+I+thought+4+was+good" title="Post to Reddit"><img class="nothumb" src="http://www.marcuswhitworth.com/wp-content/plugins/tweet-this/icons/tt-reddit-micro3.png" alt="Post to Reddit" /></a> <a target="_blank" class="tt" href="http://stumbleupon.com/submit?url=http://www.marcuswhitworth.com/2009/10/resharper-5-and-i-thought-4-was-good/&amp;title=ReSharper+5+%E2%80%93+and+I+thought+4+was+good" title="Post to StumbleUpon"><img class="nothumb" src="http://www.marcuswhitworth.com/wp-content/plugins/tweet-this/icons/tt-su-micro3.png" alt="Post to StumbleUpon" /></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcusWhitworth?a=qFiTRx4hvIs:XzKOp3SG4Ys:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/MarcusWhitworth?i=qFiTRx4hvIs:XzKOp3SG4Ys:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcusWhitworth/~4/qFiTRx4hvIs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.marcuswhitworth.com/2009/10/resharper-5-and-i-thought-4-was-good/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.marcuswhitworth.com/2009/10/resharper-5-and-i-thought-4-was-good/</feedburner:origLink></item>
		<item>
		<title>Creating a custom Silverlight 3 Smooth Streaming player</title>
		<link>http://feedproxy.google.com/~r/MarcusWhitworth/~3/N7hFxD0XvAc/</link>
		<comments>http://www.marcuswhitworth.com/2009/09/creating-a-custom-silverlight-3-smooth-streaming-player/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 18:36:39 +0000</pubDate>
		<dc:creator>Marcus</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[silverlight]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://www.marcuswhitworth.com/?p=64</guid>
		<description><![CDATA[When it comes to video delivery, I come from a Flash background.  I've worked on numerous streaming video projects over the years, all of which were created with Flash &#38; Actionscript on the client side. Having been through the process several times, I know all the hurdles I'm going to have to clear well in [...]]]></description>
			<content:encoded><![CDATA[<p>When it comes to video delivery, I come from a Flash background.  I've worked on numerous streaming video projects over the years, all of which were created with Flash &amp; Actionscript on the client side. Having been through the process several times, I know all the hurdles I'm going to have to clear well in advance.</p>
<p>Documentation for coding a Silverlight 3 player against IIS Smooth Streaming is a little sparse.  IIS.net has several articles on the server setup, but I couldn't find anywhere obvious regarding the client connection.</p>
<p>Unlike progressive video playback, you can't just point the MediaElement.source at the video path then call play().  After a bit of searching, <a href="http://chris.59north.com/post/Playing-Smooth-Streaming-videos-in-Silverlight.aspx" target="_blank">most people were talking about</a> some <em>AdaptiveStreamingSource</em> class, which isn't available in the base SL toolkit, but rather only found in <em>SmoothStreaming.dll</em> within the template players generated from Expression Encoder!</p>
<p>Per <a href="http://forums.silverlight.net/forums/t/121952.aspx" target="_blank">some handy forum posts</a>, the steps required are:</p>
<ol>
<li>With Expression Encoder installed, go to <em>C:\Program Files\Microsoft Expression\Encoder 3\Templates\en</em>, select any template, and copy the SmoothStreaming.xap file.</li>
<li>Rename your copied .xap file to .zip, unzip, and take out the <em>SmoothStreaming.dll</em> and <em>PlugInMssCtrl.dll</em> files.</li>
<li>Reference these assemblies in your project, and you can then start using <em>AdaptiveStreamingSource.</em></li>
</ol>
<p>So, once you can finally access the required assemblies, you can then invoke your IIS Smooth Streaming service with something along the lines of the following:</p>
<pre class="brush:csharp">var mediaPath = "testClip_h1080p.ism/manifest";
var source = new AdaptiveStreamingSource
{
   ManifestUrl = new Uri(mediaPath, UriKind.RelativeOrAbsolute),
   MediaElement = streamElement // the xaml MediaElement
};
source.StartPlayback();</pre>
<p>Make sure you put the trailing '/manifest' after your stream path.</p>
<p>Simple enough, once you've figured out the basics!  Not exactly sure what MS were thinking by not including the SmoothStreaming assemblies in the SL3 toolkit?  Surely they realise not everyone wants to use a templated player.  Or have I missed something here?</p>
		<br />
		<a href="http://www.dotnetkicks.com/kick/?title=Creating a custom Silverlight 3 Smooth Streaming player&url=http%3A%2F%2Fwww.marcuswhitworth.com%2F2009%2F09%2Fcreating-a-custom-silverlight-3-smooth-streaming-player%2F"> 
		<img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3A%2F%2Fwww.marcuswhitworth.com%2F2009%2F09%2Fcreating-a-custom-silverlight-3-smooth-streaming-player%2F" border="0" alt="Kick It on DotNetKicks.com" /> </a>
		<p align="left"><a target="_blank" class="tt" href="http://twitter.com/home/?status=Creating+a+custom+Silverlight+3+Smooth+Streaming+player+www.bit.ly/64Sj2a" title="Post to Twitter"><img class="nothumb" src="http://www.marcuswhitworth.com/wp-content/plugins/tweet-this/icons/tt-twitter-micro3.png" alt="Post to Twitter" /></a> <a target="_blank" class="tt" href="http://buzz.yahoo.com/submit?submitUrl=http://www.marcuswhitworth.com/2009/09/creating-a-custom-silverlight-3-smooth-streaming-player/&amp;submitHeadline=Creating+a+custom+Silverlight+3+Smooth+Streaming+player" title="Post to Yahoo Buzz"><img class="nothumb" src="http://www.marcuswhitworth.com/wp-content/plugins/tweet-this/icons/tt-buzz-micro3.png" alt="Post to Yahoo Buzz" /></a> <a target="_blank" class="tt" href="http://delicious.com/post?url=http://www.marcuswhitworth.com/2009/09/creating-a-custom-silverlight-3-smooth-streaming-player/&amp;title=Creating+a+custom+Silverlight+3+Smooth+Streaming+player" title="Post to Delicious"><img class="nothumb" src="http://www.marcuswhitworth.com/wp-content/plugins/tweet-this/icons/tt-delicious-micro3.png" alt="Post to Delicious" /></a> <a target="_blank" class="tt" href="http://digg.com/submit?url=http://www.marcuswhitworth.com/2009/09/creating-a-custom-silverlight-3-smooth-streaming-player/&amp;title=Creating+a+custom+Silverlight+3+Smooth+Streaming+player" title="Post to Digg"><img class="nothumb" src="http://www.marcuswhitworth.com/wp-content/plugins/tweet-this/icons/tt-digg-micro3.png" alt="Post to Digg" /></a> <a target="_blank" class="tt" href="http://reddit.com/submit?url=http://www.marcuswhitworth.com/2009/09/creating-a-custom-silverlight-3-smooth-streaming-player/&amp;title=Creating+a+custom+Silverlight+3+Smooth+Streaming+player" title="Post to Reddit"><img class="nothumb" src="http://www.marcuswhitworth.com/wp-content/plugins/tweet-this/icons/tt-reddit-micro3.png" alt="Post to Reddit" /></a> <a target="_blank" class="tt" href="http://stumbleupon.com/submit?url=http://www.marcuswhitworth.com/2009/09/creating-a-custom-silverlight-3-smooth-streaming-player/&amp;title=Creating+a+custom+Silverlight+3+Smooth+Streaming+player" title="Post to StumbleUpon"><img class="nothumb" src="http://www.marcuswhitworth.com/wp-content/plugins/tweet-this/icons/tt-su-micro3.png" alt="Post to StumbleUpon" /></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcusWhitworth?a=N7hFxD0XvAc:Y4yi0cXDYRg:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/MarcusWhitworth?i=N7hFxD0XvAc:Y4yi0cXDYRg:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcusWhitworth/~4/N7hFxD0XvAc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.marcuswhitworth.com/2009/09/creating-a-custom-silverlight-3-smooth-streaming-player/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.marcuswhitworth.com/2009/09/creating-a-custom-silverlight-3-smooth-streaming-player/</feedburner:origLink></item>
		<item>
		<title>Visual Studio Silverlight/xaml bug</title>
		<link>http://feedproxy.google.com/~r/MarcusWhitworth/~3/yNMDn-WP8Tc/</link>
		<comments>http://www.marcuswhitworth.com/2009/09/visual-studio-silverlight-xaml-bug/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 17:45:42 +0000</pubDate>
		<dc:creator>Marcus</dc:creator>
				<category><![CDATA[Bugs]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[silverlight]]></category>
		<category><![CDATA[visual studio]]></category>

		<guid isPermaLink="false">http://www.marcuswhitworth.com/?p=60</guid>
		<description><![CDATA[This one was driving me crazy for at least a few hours.  On a fresh install of VS2008 &#38; Silverlight 3 tools, there was no xaml code highlighting at all, no intellisense, nothing - just like any ordinary text file.  Checking the same project on another machine, it was all fine.  So I starting disabling/uninstalling [...]]]></description>
			<content:encoded><![CDATA[<p>This one was driving me crazy for at least a few hours.  On a fresh install of VS2008 &amp; Silverlight 3 tools, there was no xaml code highlighting at all, no intellisense, nothing - just like any ordinary text file.  Checking the same project on another machine, it was all fine.  So I starting disabling/uninstalling all VS plugins (ReSharper, AnkhSVN), but still no luck.  Was starting to think I'd have to reinstall VS...</p>
<p><a href="http://www.tipsdotnet.com/TechBlog.aspx?PageIndex=0&amp;BLID=12" target="_blank">The solution</a> was simple enough - run the VS Command Prompt, and enter:</p>
<pre>devenv /resetskippkgs</pre>
<p>Problem solved.  <a href="http://msdn.microsoft.com/en-us/library/ms241276%28VS.80%29.aspx" target="_blank">Apparently a good one to try</a> whenever you lose formatting or Intellisense features.</p>
		<br />
		<a href="http://www.dotnetkicks.com/kick/?title=Visual Studio Silverlight/xaml bug&url=http%3A%2F%2Fwww.marcuswhitworth.com%2F2009%2F09%2Fvisual-studio-silverlight-xaml-bug%2F"> 
		<img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3A%2F%2Fwww.marcuswhitworth.com%2F2009%2F09%2Fvisual-studio-silverlight-xaml-bug%2F" border="0" alt="Kick It on DotNetKicks.com" /> </a>
		<p align="left"><a target="_blank" class="tt" href="http://twitter.com/home/?status=Visual+Studio+Silverlight%2Fxaml+bug+www.bit.ly/81edZp" title="Post to Twitter"><img class="nothumb" src="http://www.marcuswhitworth.com/wp-content/plugins/tweet-this/icons/tt-twitter-micro3.png" alt="Post to Twitter" /></a> <a target="_blank" class="tt" href="http://buzz.yahoo.com/submit?submitUrl=http://www.marcuswhitworth.com/2009/09/visual-studio-silverlight-xaml-bug/&amp;submitHeadline=Visual+Studio+Silverlight%2Fxaml+bug" title="Post to Yahoo Buzz"><img class="nothumb" src="http://www.marcuswhitworth.com/wp-content/plugins/tweet-this/icons/tt-buzz-micro3.png" alt="Post to Yahoo Buzz" /></a> <a target="_blank" class="tt" href="http://delicious.com/post?url=http://www.marcuswhitworth.com/2009/09/visual-studio-silverlight-xaml-bug/&amp;title=Visual+Studio+Silverlight%2Fxaml+bug" title="Post to Delicious"><img class="nothumb" src="http://www.marcuswhitworth.com/wp-content/plugins/tweet-this/icons/tt-delicious-micro3.png" alt="Post to Delicious" /></a> <a target="_blank" class="tt" href="http://digg.com/submit?url=http://www.marcuswhitworth.com/2009/09/visual-studio-silverlight-xaml-bug/&amp;title=Visual+Studio+Silverlight%2Fxaml+bug" title="Post to Digg"><img class="nothumb" src="http://www.marcuswhitworth.com/wp-content/plugins/tweet-this/icons/tt-digg-micro3.png" alt="Post to Digg" /></a> <a target="_blank" class="tt" href="http://reddit.com/submit?url=http://www.marcuswhitworth.com/2009/09/visual-studio-silverlight-xaml-bug/&amp;title=Visual+Studio+Silverlight%2Fxaml+bug" title="Post to Reddit"><img class="nothumb" src="http://www.marcuswhitworth.com/wp-content/plugins/tweet-this/icons/tt-reddit-micro3.png" alt="Post to Reddit" /></a> <a target="_blank" class="tt" href="http://stumbleupon.com/submit?url=http://www.marcuswhitworth.com/2009/09/visual-studio-silverlight-xaml-bug/&amp;title=Visual+Studio+Silverlight%2Fxaml+bug" title="Post to StumbleUpon"><img class="nothumb" src="http://www.marcuswhitworth.com/wp-content/plugins/tweet-this/icons/tt-su-micro3.png" alt="Post to StumbleUpon" /></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcusWhitworth?a=yNMDn-WP8Tc:GbzqbBxjqpM:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/MarcusWhitworth?i=yNMDn-WP8Tc:GbzqbBxjqpM:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcusWhitworth/~4/yNMDn-WP8Tc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.marcuswhitworth.com/2009/09/visual-studio-silverlight-xaml-bug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.marcuswhitworth.com/2009/09/visual-studio-silverlight-xaml-bug/</feedburner:origLink></item>
		<item>
		<title>10 Enterprise Architecture Pitfalls</title>
		<link>http://feedproxy.google.com/~r/MarcusWhitworth/~3/D5qn6wu2T4A/</link>
		<comments>http://www.marcuswhitworth.com/2009/09/10-enterprise-architecture-pitfalls/#comments</comments>
		<pubDate>Wed, 23 Sep 2009 21:56:01 +0000</pubDate>
		<dc:creator>Marcus</dc:creator>
				<category><![CDATA[Interesting Reading]]></category>
		<category><![CDATA[architecture]]></category>

		<guid isPermaLink="false">http://www.marcuswhitworth.com/?p=52</guid>
		<description><![CDATA[An interesting article from Gartner Analysts.  I know I've been involved in many projects over the years which touch upon most of these issues at some point.  The benefit of hindsight :)]]></description>
			<content:encoded><![CDATA[<p>An interesting <a href="http://www.gartner.com/it/page.jsp?id=1159617" target="_blank">article from Gartner Analysts</a>.  I know I've been involved in many projects over the years which touch upon most of these issues at some point.  The benefit of hindsight :)</p>
		<br />
		<a href="http://www.dotnetkicks.com/kick/?title=10 Enterprise Architecture Pitfalls&url=http%3A%2F%2Fwww.marcuswhitworth.com%2F2009%2F09%2F10-enterprise-architecture-pitfalls%2F"> 
		<img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3A%2F%2Fwww.marcuswhitworth.com%2F2009%2F09%2F10-enterprise-architecture-pitfalls%2F" border="0" alt="Kick It on DotNetKicks.com" /> </a>
		<p align="left"><a target="_blank" class="tt" href="http://twitter.com/home/?status=10+Enterprise+Architecture+Pitfalls+www.bit.ly/6rPjqm" title="Post to Twitter"><img class="nothumb" src="http://www.marcuswhitworth.com/wp-content/plugins/tweet-this/icons/tt-twitter-micro3.png" alt="Post to Twitter" /></a> <a target="_blank" class="tt" href="http://buzz.yahoo.com/submit?submitUrl=http://www.marcuswhitworth.com/2009/09/10-enterprise-architecture-pitfalls/&amp;submitHeadline=10+Enterprise+Architecture+Pitfalls" title="Post to Yahoo Buzz"><img class="nothumb" src="http://www.marcuswhitworth.com/wp-content/plugins/tweet-this/icons/tt-buzz-micro3.png" alt="Post to Yahoo Buzz" /></a> <a target="_blank" class="tt" href="http://delicious.com/post?url=http://www.marcuswhitworth.com/2009/09/10-enterprise-architecture-pitfalls/&amp;title=10+Enterprise+Architecture+Pitfalls" title="Post to Delicious"><img class="nothumb" src="http://www.marcuswhitworth.com/wp-content/plugins/tweet-this/icons/tt-delicious-micro3.png" alt="Post to Delicious" /></a> <a target="_blank" class="tt" href="http://digg.com/submit?url=http://www.marcuswhitworth.com/2009/09/10-enterprise-architecture-pitfalls/&amp;title=10+Enterprise+Architecture+Pitfalls" title="Post to Digg"><img class="nothumb" src="http://www.marcuswhitworth.com/wp-content/plugins/tweet-this/icons/tt-digg-micro3.png" alt="Post to Digg" /></a> <a target="_blank" class="tt" href="http://reddit.com/submit?url=http://www.marcuswhitworth.com/2009/09/10-enterprise-architecture-pitfalls/&amp;title=10+Enterprise+Architecture+Pitfalls" title="Post to Reddit"><img class="nothumb" src="http://www.marcuswhitworth.com/wp-content/plugins/tweet-this/icons/tt-reddit-micro3.png" alt="Post to Reddit" /></a> <a target="_blank" class="tt" href="http://stumbleupon.com/submit?url=http://www.marcuswhitworth.com/2009/09/10-enterprise-architecture-pitfalls/&amp;title=10+Enterprise+Architecture+Pitfalls" title="Post to StumbleUpon"><img class="nothumb" src="http://www.marcuswhitworth.com/wp-content/plugins/tweet-this/icons/tt-su-micro3.png" alt="Post to StumbleUpon" /></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcusWhitworth?a=D5qn6wu2T4A:F-IiDj6aqjo:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/MarcusWhitworth?i=D5qn6wu2T4A:F-IiDj6aqjo:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcusWhitworth/~4/D5qn6wu2T4A" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.marcuswhitworth.com/2009/09/10-enterprise-architecture-pitfalls/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.marcuswhitworth.com/2009/09/10-enterprise-architecture-pitfalls/</feedburner:origLink></item>
		<item>
		<title>.NET Development on a Mac – Fusion or Parallels?</title>
		<link>http://feedproxy.google.com/~r/MarcusWhitworth/~3/HB7I5nDDntk/</link>
		<comments>http://www.marcuswhitworth.com/2009/09/dotnet-development-on-a-mac-fusion-or-parallels/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 22:00:40 +0000</pubDate>
		<dc:creator>Marcus</dc:creator>
				<category><![CDATA[Comparisons]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[virtualization]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.marcuswhitworth.com/?p=34</guid>
		<description><![CDATA[I've been recently issued with my first Mac for work, and have been in the process of setting it up as my dev machine.  I'm familiar with using Mac's in several roles over the years, but resisted using one day-to-day until now.  I've got the base level Macbook Pro (2.26mhz, upgraded to 4gb ram). Among [...]]]></description>
			<content:encoded><![CDATA[<p>I've been recently issued with my first Mac for work, and have been in the process of setting it up as my dev machine.  I'm familiar with using Mac's in several roles over the years, but resisted using one day-to-day until now.  I've got the <a href="http://www.apple.com/uk/macbookpro/specs-13inch.html" target="_blank">base level Macbook Pro</a> (2.26mhz, upgraded to 4gb ram).</p>
<p>Among other apps, I need to run Visual Studio 2008 and SQL Server 2008.  Using <a href="http://www.apple.com/support/bootcamp/" target="_blank">Bootcamp</a> crossed my mind, but I didn't like the the idea of rebooting into Windows every time I wanted to look at something dev-related.</p>
<p>So, I downloaded the trial of <a href="http://www.vmware.com/products/fusion/" target="_blank">VMWare Fusion 2.05</a>, installed a shiny new copy of Windows 7 Pro, installed VS2008 Pro, SQL2008, ReSharper, etc, and prepared to be amazed by my new efficient setup.</p>
<p>In short, it was pretty painful - everything just seemed to lag.  I was expecting it to be a bit slower than running natively, but after 20 minutes I realised it just wasn't going to work.  I googled to see if this was a common experience, and came across this fairly comprehensive <a href="http://www.mactech.com/articles/mactech/Vol.25/25.04/VMBenchmarks/index.html" target="_blank">comparison between Fusion and Parallels</a> which concludes "Parallels Desktop is the clear winner running 14-20% faster than VMware Fusion".  That's an impressive difference on any benchmark!</p>
<p>One very nice feature of both Fusion and Parallels is that you can import the competitor's virtual image into the other.  So after reading this comparison, I figured I had nothing to lose - the next option was to just set up in Bootcamp which still wasn't appealing.  I downloaded and installed <a href="http://www.parallels.com/products/desktop/" target="_blank">Parallels 4</a>, imported my Fusion virtual image, and 20 mins later I booted up the new Parallels image.</p>
<p>This was exactly what I was hoping for - the experience was <span style="text-decoration: underline;">vastly</span> superior.  No obvious lag when opening/closing programs, responsive, didn't slow down my other Mac programs at all, and just slicker.  Build times of existing VS projects may be a bit slower than running natively (understandable given only one cpu core is allocated to the virtual OS - I think), but overall it feels pretty snappy, and definitely not slow to the point I'd bother rebooting into Bootcamp.  It's worth pointing out that I allocated 2gb memory (of 4gb total) to running each Fusion and Parallels - so they were on a fairly level playing field.</p>
<p>Parallels: 1 - Fusion: 0</p>
		<br />
		<a href="http://www.dotnetkicks.com/kick/?title=.NET Development on a Mac &#8211; Fusion or Parallels?&url=http%3A%2F%2Fwww.marcuswhitworth.com%2F2009%2F09%2Fdotnet-development-on-a-mac-fusion-or-parallels%2F"> 
		<img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3A%2F%2Fwww.marcuswhitworth.com%2F2009%2F09%2Fdotnet-development-on-a-mac-fusion-or-parallels%2F" border="0" alt="Kick It on DotNetKicks.com" /> </a>
		<p align="left"><a target="_blank" class="tt" href="http://twitter.com/home/?status=.NET+Development+on+a+Mac+%E2%80%93+Fusion+or+Parallels%3F+www.bit.ly/15xAm6" title="Post to Twitter"><img class="nothumb" src="http://www.marcuswhitworth.com/wp-content/plugins/tweet-this/icons/tt-twitter-micro3.png" alt="Post to Twitter" /></a> <a target="_blank" class="tt" href="http://buzz.yahoo.com/submit?submitUrl=http://www.marcuswhitworth.com/2009/09/dotnet-development-on-a-mac-fusion-or-parallels/&amp;submitHeadline=.NET+Development+on+a+Mac+%E2%80%93+Fusion+or+Parallels%3F" title="Post to Yahoo Buzz"><img class="nothumb" src="http://www.marcuswhitworth.com/wp-content/plugins/tweet-this/icons/tt-buzz-micro3.png" alt="Post to Yahoo Buzz" /></a> <a target="_blank" class="tt" href="http://delicious.com/post?url=http://www.marcuswhitworth.com/2009/09/dotnet-development-on-a-mac-fusion-or-parallels/&amp;title=.NET+Development+on+a+Mac+%E2%80%93+Fusion+or+Parallels%3F" title="Post to Delicious"><img class="nothumb" src="http://www.marcuswhitworth.com/wp-content/plugins/tweet-this/icons/tt-delicious-micro3.png" alt="Post to Delicious" /></a> <a target="_blank" class="tt" href="http://digg.com/submit?url=http://www.marcuswhitworth.com/2009/09/dotnet-development-on-a-mac-fusion-or-parallels/&amp;title=.NET+Development+on+a+Mac+%E2%80%93+Fusion+or+Parallels%3F" title="Post to Digg"><img class="nothumb" src="http://www.marcuswhitworth.com/wp-content/plugins/tweet-this/icons/tt-digg-micro3.png" alt="Post to Digg" /></a> <a target="_blank" class="tt" href="http://reddit.com/submit?url=http://www.marcuswhitworth.com/2009/09/dotnet-development-on-a-mac-fusion-or-parallels/&amp;title=.NET+Development+on+a+Mac+%E2%80%93+Fusion+or+Parallels%3F" title="Post to Reddit"><img class="nothumb" src="http://www.marcuswhitworth.com/wp-content/plugins/tweet-this/icons/tt-reddit-micro3.png" alt="Post to Reddit" /></a> <a target="_blank" class="tt" href="http://stumbleupon.com/submit?url=http://www.marcuswhitworth.com/2009/09/dotnet-development-on-a-mac-fusion-or-parallels/&amp;title=.NET+Development+on+a+Mac+%E2%80%93+Fusion+or+Parallels%3F" title="Post to StumbleUpon"><img class="nothumb" src="http://www.marcuswhitworth.com/wp-content/plugins/tweet-this/icons/tt-su-micro3.png" alt="Post to StumbleUpon" /></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcusWhitworth?a=HB7I5nDDntk:CrO4CP4n8KQ:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/MarcusWhitworth?i=HB7I5nDDntk:CrO4CP4n8KQ:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcusWhitworth/~4/HB7I5nDDntk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.marcuswhitworth.com/2009/09/dotnet-development-on-a-mac-fusion-or-parallels/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.marcuswhitworth.com/2009/09/dotnet-development-on-a-mac-fusion-or-parallels/</feedburner:origLink></item>
		<item>
		<title>Where to begin?</title>
		<link>http://feedproxy.google.com/~r/MarcusWhitworth/~3/2eHClHmyTb4/</link>
		<comments>http://www.marcuswhitworth.com/2009/08/where-to-begin/#comments</comments>
		<pubDate>Sat, 01 Aug 2009 09:14:40 +0000</pubDate>
		<dc:creator>Marcus</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[silverlight]]></category>

		<guid isPermaLink="false">http://www.marcuswhitworth.com/?p=4</guid>
		<description><![CDATA[So I've been thinking about what I could kick start this blog with - stuff in which I've developed a bit of a niche and have something to share with a wider audience.  My background has been primarily in web-based application development, with the tools focused largely within the .NET and the RIA spaces. I [...]]]></description>
			<content:encoded><![CDATA[<p>So I've been thinking about what I could kick start this blog with - stuff in which I've developed a bit of a niche and have something to share with a wider audience.  My background has been primarily in web-based application development, with the tools focused largely within the .NET and the RIA spaces.</p>
<p>I recently helped <a href="http://codertron.blogspot.com/" target="_blank">a colleague</a> out with an article on <a href="http://codertron.blogspot.com/2009/05/flex-3-versus-silverlight-3-in.html" target="_blank">Flex vs. Silverlight in the Enterprise</a>.  Both of us have a strong .NET background, and have more recently been heavily involved on a massive enterprise-scale Flex application.  Although  I still stand by the original article, I realise it's impossible to accurately and fairly detail each platforms' strengths and weaknesses in one post.</p>
<p>So, I plan to start a bit of a series - comparing different user experiences as created with Silverlight and Flex, and hopefully reaching a conclusion on the benefits of each platform, based upon developer experience/efficiency, and of course how the end result meets the original client requirements.</p>
<p>Each post will focus on a technical area that you may find within any enterprise RIA.  Example areas could be video streaming, datagrid customisation, push messaging, theming/skinning, just to name a few.</p>
<p>It's as much for my own benefit as anyone else's - in order to deliver the best client experience, you HAVE to know what the best tools or platform are for any given situation!</p>
		<br />
		<a href="http://www.dotnetkicks.com/kick/?title=Where to begin?&url=http%3A%2F%2Fwww.marcuswhitworth.com%2F2009%2F08%2Fwhere-to-begin%2F"> 
		<img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3A%2F%2Fwww.marcuswhitworth.com%2F2009%2F08%2Fwhere-to-begin%2F" border="0" alt="Kick It on DotNetKicks.com" /> </a>
		<p align="left"><a target="_blank" class="tt" href="http://twitter.com/home/?status=Where+to+begin%3F+www.bit.ly/5zDqVP" title="Post to Twitter"><img class="nothumb" src="http://www.marcuswhitworth.com/wp-content/plugins/tweet-this/icons/tt-twitter-micro3.png" alt="Post to Twitter" /></a> <a target="_blank" class="tt" href="http://buzz.yahoo.com/submit?submitUrl=http://www.marcuswhitworth.com/2009/08/where-to-begin/&amp;submitHeadline=Where+to+begin%3F" title="Post to Yahoo Buzz"><img class="nothumb" src="http://www.marcuswhitworth.com/wp-content/plugins/tweet-this/icons/tt-buzz-micro3.png" alt="Post to Yahoo Buzz" /></a> <a target="_blank" class="tt" href="http://delicious.com/post?url=http://www.marcuswhitworth.com/2009/08/where-to-begin/&amp;title=Where+to+begin%3F" title="Post to Delicious"><img class="nothumb" src="http://www.marcuswhitworth.com/wp-content/plugins/tweet-this/icons/tt-delicious-micro3.png" alt="Post to Delicious" /></a> <a target="_blank" class="tt" href="http://digg.com/submit?url=http://www.marcuswhitworth.com/2009/08/where-to-begin/&amp;title=Where+to+begin%3F" title="Post to Digg"><img class="nothumb" src="http://www.marcuswhitworth.com/wp-content/plugins/tweet-this/icons/tt-digg-micro3.png" alt="Post to Digg" /></a> <a target="_blank" class="tt" href="http://reddit.com/submit?url=http://www.marcuswhitworth.com/2009/08/where-to-begin/&amp;title=Where+to+begin%3F" title="Post to Reddit"><img class="nothumb" src="http://www.marcuswhitworth.com/wp-content/plugins/tweet-this/icons/tt-reddit-micro3.png" alt="Post to Reddit" /></a> <a target="_blank" class="tt" href="http://stumbleupon.com/submit?url=http://www.marcuswhitworth.com/2009/08/where-to-begin/&amp;title=Where+to+begin%3F" title="Post to StumbleUpon"><img class="nothumb" src="http://www.marcuswhitworth.com/wp-content/plugins/tweet-this/icons/tt-su-micro3.png" alt="Post to StumbleUpon" /></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcusWhitworth?a=2eHClHmyTb4:NqpQHl-S9Gg:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/MarcusWhitworth?i=2eHClHmyTb4:NqpQHl-S9Gg:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcusWhitworth/~4/2eHClHmyTb4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.marcuswhitworth.com/2009/08/where-to-begin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.marcuswhitworth.com/2009/08/where-to-begin/</feedburner:origLink></item>
	</channel>
</rss>
