<?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:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Brownie Points</title><link>http://azurecoding.net/blogs/brownie/default.aspx</link><description>A constant flow of news, thoughts, and opinions on Cloud Computing and (pseudo) related topics.</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 (Build: 30929.2835)</generator><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/azurecoding" type="application/rss+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item><title>I Want to Be a Duct Tape Programmer</title><link>http://feedproxy.google.com/~r/azurecoding/~3/L7d8VKC88k0/i-want-to-be-a-duct-tape-programmer.aspx</link><pubDate>Wed, 30 Sep 2009 21:42:35 GMT</pubDate><guid isPermaLink="false">6e97e1e3-dc93-4c0d-b73f-e698f7d56013:3013</guid><dc:creator>Mike Brown</dc:creator><slash:comments>0</slash:comments><wfw:commentRss>http://azurecoding.net/blogs/brownie/rsscomments.aspx?PostID=3013</wfw:commentRss><comments>http://azurecoding.net/blogs/brownie/archive/2009/09/30/i-want-to-be-a-duct-tape-programmer.aspx#comments</comments><description>&lt;p&gt;I think &lt;a href="http://ayende.com/Blog/archive/2009/09/30/duct-tape-programmers.aspx" target="_blank"&gt;people misinterpreted&lt;/a&gt; Joel Spolsky&amp;#39;s post &amp;quot;&lt;a href="http://www.joelonsoftware.com/items/2009/09/23.html" target="_blank"&gt;The Duct Tape Programmer&lt;/a&gt;&amp;quot; (not the best choice of words because of the connotations of using duct tape as a &amp;quot;temporary quick fix&amp;quot; in the developer&amp;#39;s mind) but there is one key gem to take away from it. &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&amp;quot;Shipping is a feature. A really important feature. Your product must have it&amp;quot; &lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;His point is the same that most of his posts say (and even &lt;a href="https://gettingreal.37signals.com/" target="_blank"&gt;what the 37Signals guys tout&lt;/a&gt;). No one gives a flying fig about how your application uses the latest programming language (or &lt;a href="http://windowsclient.net/learn/videos_wpf.aspx" target="_blank"&gt;UI engine&lt;/a&gt;). What they care about is whether your product solves their problem? &lt;/p&gt;  &lt;p&gt;You can spend all day spit shining your API to make it more SOLID, or you can say &amp;quot;the feature works, let&amp;#39;s move on to the next one&amp;quot;. In the mean time, the company down the road who knows how to get things done has shipped v1 and are getting feedback from customers for V2. &lt;/p&gt;  &lt;p&gt;He also makes the distinction between the guy who can pull this off and everyone else. This is the guy who uses techniques at which he is an expert (in the &lt;a href="http://en.wikipedia.org/wiki/Dreyfus_model_of_skill_acquisition" target="_blank"&gt;Dreyfus Model&lt;/a&gt; sense of the word)&amp;#160; to tackle the task at hand rather than saying &amp;quot;here’s this new wrench (language/Framework) let&amp;#39;s see how I can use it on this go cart (enterprise app/web browser) I&amp;#39;m working on.&amp;quot; Or to bring it home better would you prefer a surgeon performing an experimental technique on you that he watched some guy perform at a seminar last week when the one he has performed 100 times over will work just as well? That&amp;#39;s what Joel means when he says duct tape programming. It might not be made of the shiny new state of the art experimental components. But it sure as hell works like a charm.&lt;/p&gt;  &lt;p&gt;No where in the talk did he mention throwing out best practices (okay he does mention not needing unit tests but he also mentions that those were extreme circumstances). In fact he suggests what should be a new best practice: don’t use something you’re not familiar with when your ass is on the line. &lt;/p&gt;  &lt;p&gt;I know a few people I would apply the Duct Tape Programmer label to but they would be too modest to accept it. And that’s what I aspire to be.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://azurecoding.net/aggbug.aspx?PostID=3013" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/azurecoding/~4/L7d8VKC88k0" height="1" width="1"/&gt;</description><category domain="http://azurecoding.net/blogs/brownie/archive/tags/Software+Engineering/default.aspx">Software Engineering</category><feedburner:origLink>http://azurecoding.net/blogs/brownie/archive/2009/09/30/i-want-to-be-a-duct-tape-programmer.aspx</feedburner:origLink></item><item><title>Service Locator Revisited</title><link>http://feedproxy.google.com/~r/azurecoding/~3/vui1Vj2izDo/service-locator-revisited.aspx</link><pubDate>Thu, 13 Aug 2009 04:18:50 GMT</pubDate><guid isPermaLink="false">6e97e1e3-dc93-4c0d-b73f-e698f7d56013:2049</guid><dc:creator>Mike Brown</dc:creator><slash:comments>0</slash:comments><wfw:commentRss>http://azurecoding.net/blogs/brownie/rsscomments.aspx?PostID=2049</wfw:commentRss><comments>http://azurecoding.net/blogs/brownie/archive/2009/08/13/service-locator-revisited.aspx#comments</comments><description>&lt;p&gt;I guess I have awakened a slumbering giant by writing the &lt;a href="http://azurecoding.net/blogs/brownie/archive/2009/08/10/service-locator-versus-di-a-clarification.aspx" target="_blank"&gt;post the other day&lt;/a&gt;. I went back to add more functionality to the Service Locator (to enable per transaction and per thread services). Before I started breaking stuff by adding new functionality, I decided to make unit tests for the existing stuff. My first test was simple enough, register and retrieve a service from the ServiceContainer (which might need to be renamed because of a collision with System.ComponentModel.Design.ServiceContainer).&lt;/p&gt;  &lt;p&gt;[TestMethod]    &lt;br /&gt;public void CanRegisterService()     &lt;br /&gt;{     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; var dummyService = new DummyService();     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; ServiceContainer.RegisterService&amp;lt;IDummyService&amp;gt;(dummyService);     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; var retrievedService = ServiceContainer.GetService&amp;lt;IDummyService&amp;gt;();     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Assert.IsInstanceOfType(retrievedService, typeof(IDummyService),&amp;quot;The returned service is not of the correct type&amp;quot;);     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Assert.AreEqual(dummyService,retrievedService,&amp;quot;The returned service is a different instance.&amp;quot;);     &lt;br /&gt;}&lt;/p&gt;  &lt;p&gt;Simple enough right? Let’s run it and make sure it’s green and move on…to…hey why is it failing? What happened? After a quick bit of investigation, I found that the problem lay in RegisterService overload that takes the Func:&lt;/p&gt;  &lt;p&gt;public static void RegisterService&amp;lt;TService&amp;gt;(Func&amp;lt;TService&amp;gt; creator)    &lt;br /&gt;{     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; _Container.AddService(creator);     &lt;br /&gt;}&lt;/p&gt;  &lt;p&gt;Do you see it? Maybe the implementation of AddService might make it more obvious&lt;/p&gt;  &lt;pre&gt;private void AddService&amp;lt;TService&amp;gt;(TService instance)
{
    _ServicesLock.EnterUpgradeableReadLock();
    try
    { 
        if (!_Services.ContainsKey(typeof(TService))) 
        { 
            _ServicesLock.EnterWriteLock(); 
            try 
            { 
                _Services[typeof(TService)] = instance; 
            } 
            finally 
            { 
                _ServicesLock.ExitWriteLock(); 
            } 
        } 
    } 
    finally 
    {
        _ServicesLock.ExitUpgradeableReadLock(); 
    } 
}&lt;/pre&gt;

&lt;p&gt;Because of type inference, &amp;lt;TService&amp;gt; is Func&amp;lt;TService&amp;gt; when we try to retrieve it we’re looking for TService as the key, and of course we won’t find it. So there’s a lesson to be learned here. Actually there are two. &lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;It’s the simplest of changes that open the door for the most insidious bugs (not that this bug is very insidious)&lt;/li&gt;

  &lt;li&gt;If it’s worth writing it’s worth testing. No matter how small the functionality is, you should write a test for it because when it breaks you want to know.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Anyway, now that I’ve got the tests in place for the existing functionality, I’m going to go ahead and see about implementing per transaction life management. But not tonight.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://azurecoding.net/aggbug.aspx?PostID=2049" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/azurecoding/~4/vui1Vj2izDo" height="1" width="1"/&gt;</description><feedburner:origLink>http://azurecoding.net/blogs/brownie/archive/2009/08/13/service-locator-revisited.aspx</feedburner:origLink></item><item><title>Service Locator Versus DI – A Clarification</title><link>http://feedproxy.google.com/~r/azurecoding/~3/smMnZ4CrbpY/service-locator-versus-di-a-clarification.aspx</link><pubDate>Mon, 10 Aug 2009 17:11:00 GMT</pubDate><guid isPermaLink="false">6e97e1e3-dc93-4c0d-b73f-e698f7d56013:2004</guid><dc:creator>Mike Brown</dc:creator><slash:comments>1</slash:comments><wfw:commentRss>http://azurecoding.net/blogs/brownie/rsscomments.aspx?PostID=2004</wfw:commentRss><comments>http://azurecoding.net/blogs/brownie/archive/2009/08/10/service-locator-versus-di-a-clarification.aspx#comments</comments><description>&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;For some reason Community Server decided that it doesn&amp;#39;t want to display the style for the code snippet nor the IFrame for the skydrive link. &lt;a href="http://cid-2221dc39e0c749a4.skydrive.live.com/self.aspx/WPF%20Samples/ServiceContainer.cs"&gt;Here is the final file&lt;/a&gt;. Read on for explanation of what it is and what it does.&lt;/p&gt;
&lt;p&gt;Browsing though the blog of my friend and co-work, Jon Fuller, I noticed &lt;a href="http://jonfuller.codingtomusic.com/2009/03/12/dependency-injection-and-service-location/"&gt;this post on Dependency Injection and Service Location&lt;/a&gt;. Especially interesting was this quote:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;I was having a discussion with a colleague the other day about &lt;/em&gt;&lt;a href="http://jonfuller.codingtomusic.com/2009/02/11/dealing-with-dependencies-a-presentation-on-di-and-ioc/"&gt;&lt;em&gt;DI&lt;/em&gt;&lt;/a&gt;&lt;em&gt; and &lt;/em&gt;&lt;a href="http://java.sun.com/blueprints/patterns/ServiceLocator.html"&gt;&lt;em&gt;Service Location&lt;/em&gt;&lt;/a&gt;&lt;em&gt; in the context of the question (posed by a third person):&lt;/em&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Which DI container/framework should I choose?&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;em&gt;His answer:&lt;/em&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;None; just roll your own and use simple Service Location&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;It definitely sounded like I&amp;rsquo;m the colleague in question here. He then goes on to argue against my love of the &lt;a href="http://martinfowler.com/articles/injection.html#UsingAServiceLocator"&gt;Service Locator pattern&lt;/a&gt;. I think I should clarify what I meant with my statement. For reference, &lt;a target="_blank" href="http://azurecoding.net/content/ServiceContainercs.aspx"&gt;here is my code for a simple service locator&lt;/a&gt;. The usage is simple, first I register a service with the Container:&lt;/p&gt;
&lt;pre class="csharpcode"&gt;ServiceContainer.RegisterService&amp;lt;ICalculatorService&amp;gt;(&lt;span class="kwrd"&gt;new&lt;/span&gt; ConcreteCalculatorService());&lt;/pre&gt;
&lt;p&gt;

&lt;/p&gt;
&lt;p&gt;Then anyone who wants an instance of the ICalculatorService can simply ask for it:&lt;/p&gt;
&lt;pre class="csharpcode"&gt;var calc = ServiceLocator.GetService&amp;lt;ICalculatorService&amp;gt;();&lt;/pre&gt;
&lt;p&gt;This method works for a vast majority of the simple cases where you want to provide a Separation of Concerns. In most cases you don&amp;rsquo;t need advanced lifetime management (e.g. a single instance of a service will do just fine). The reason I suggested rolling their own was that I assumed from the question the person had no experience with an IOC container prior. It takes time to grok an IOC container, there are a lot of moving parts, and for a simple case, this solution works just fine. &lt;/p&gt;
&lt;p&gt;So what happens when I want to allow for more intricate cases. Like different lifecycles for service (per request, per transaction, singleton, etc). Well the choice boils down to extending/enhancing your service locator implementation, or using the Common Service Locator library in conjunction with a container of your choice. You have to decide when the cost of maintaining your own outweighs the benefits. Adding support for a per request lifecycle is simple enough as well however. Here are the changes to the Service Container that supports both a single instance and per request lifecycle:&lt;/p&gt;
&lt;pre class="csharpcode"&gt;        &lt;span class="kwrd"&gt;private&lt;/span&gt; TService RetrieveService&amp;lt;TService&amp;gt;()
        {
            Func&amp;lt;TService&amp;gt; retVal;
            _ServicesLock.EnterReadLock();
            &lt;span class="kwrd"&gt;try&lt;/span&gt;
            {
                retVal = (Func&amp;lt;TService&amp;gt;)_Services[&lt;span class="kwrd"&gt;typeof&lt;/span&gt;(TService)];
            }
            &lt;span class="kwrd"&gt;catch&lt;/span&gt; (Exception)
            {
                &lt;span class="kwrd"&gt;throw&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; Exception(
                   String.Format(
                      &lt;span class="str"&gt;&amp;quot;Service Type {0} not registered with container.&amp;quot;&lt;/span&gt;, &lt;span class="kwrd"&gt;typeof&lt;/span&gt;(TService).Name));
            }
            &lt;span class="kwrd"&gt;finally&lt;/span&gt;
            {
                _ServicesLock.ExitReadLock();
            }
            &lt;span class="kwrd"&gt;return&lt;/span&gt; retVal();
        }

        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; RegisterService&amp;lt;TService&amp;gt;(Func&amp;lt;TService&amp;gt; creator)
        {
            _Container.AddService(creator);
        }

        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; RegisterService&amp;lt;TService&amp;gt;(TService instance)
        {
            RegisterService(()=&amp;gt;instance);
        }&lt;/pre&gt;
&lt;p&gt;I just added an overload to the static RegisterService method that takes a Func that returns an instance of the service, I then change the original method to call the new overload and change the private RetrieveService function to do things properly. To register per request, you now make this simple call&lt;/p&gt;
&lt;pre class="csharpcode"&gt;ServiceContainer.RegisterService&amp;lt;ICalculatorService&amp;gt;(()=&amp;gt;&lt;span class="kwrd"&gt;new&lt;/span&gt; ConcreteCalculatorService());&lt;/pre&gt;
&lt;p&gt;Using the service is the same as before Now let&amp;rsquo;s address some of Jon&amp;rsquo;s concerns regarding the alleged shortcomings of the Service Locator pattern.&lt;/p&gt;
&lt;p&gt;Some of his concern stems from the API for the service locator. (Why pass in a separate key when you already have a ready made key in the form of the service type. Also, I&amp;rsquo;m assuming the &amp;ldquo;movies.txt&amp;rdquo; is the parameter for creating an instance of the concrete IMovieFinder. Again, this is not an issue because the instance is created at registration (or using the modified version, through the creator delegate).&lt;/p&gt;
&lt;p&gt;With regards to testability, when writing a unit test it&amp;rsquo;s easy enough to configure a Service Locator to return mocks. Just register the mocks in your setup and call clear on your teardown.&lt;/p&gt;
&lt;p&gt;That leaves us with discoverability for consumers of your code. Documentation is a good place to start.&amp;nbsp; Also, to me putting the dependencies in the constructor opens the door for things like this:&lt;/p&gt;
&lt;pre class="csharpcode"&gt;var lister = 
  &lt;span class="kwrd"&gt;new&lt;/span&gt; MovieLister(
    &lt;span class="kwrd"&gt;new&lt;/span&gt; CsvMovieFinder(
      &lt;span class="kwrd"&gt;new&lt;/span&gt; AzureBlobFileRetrieval(
        &lt;span class="kwrd"&gt;new&lt;/span&gt; AzureKey(&lt;span class="str"&gt;&amp;quot;account&amp;quot;&lt;/span&gt;,&lt;span class="str"&gt;&amp;quot;secretKey&amp;quot;&lt;/span&gt;));&lt;/pre&gt;
&lt;p&gt;True this could be caught in a code review. But it can also be outright prevented by using this great thing called encapsulation. When someone creates the MovieLister that uses the ServiceLocator and debugs, they will get a nice friendly message informing them that they need to register an IMovieFinder with the service container (hopefully they know to do so in the Main() function or wherever your project does it&amp;rsquo;s container configuration).&lt;/p&gt;
&lt;p&gt;To me, there is no major detriment to using either style. Rolling your own involves dealing with maintenance of that solution, but it&amp;rsquo;s easy enough to swap it out with a third-party container once you have the need for it. &lt;a target="_blank" href="http://cid-2221dc39e0c749a4.skydrive.live.com/self.aspx/WPF%20Samples/ServiceContainer.cs"&gt;Here&amp;rsquo;s the code&lt;/a&gt; for my basic service container. A lot of other scenarios are trivial to implement here as well. And I&amp;rsquo;ll share them with you in a later post.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://azurecoding.net/aggbug.aspx?PostID=2004" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/azurecoding/~4/smMnZ4CrbpY" height="1" width="1"/&gt;</description><category domain="http://azurecoding.net/blogs/brownie/archive/tags/Patterns/default.aspx">Patterns</category><feedburner:origLink>http://azurecoding.net/blogs/brownie/archive/2009/08/10/service-locator-versus-di-a-clarification.aspx</feedburner:origLink></item><item><title>An Elevator Pitch for View Model</title><link>http://feedproxy.google.com/~r/azurecoding/~3/ot15eLo39Z8/an-elevator-pitch-for-view-model.aspx</link><pubDate>Sun, 14 Jun 2009 15:57:00 GMT</pubDate><guid isPermaLink="false">6e97e1e3-dc93-4c0d-b73f-e698f7d56013:3028</guid><dc:creator>Mike Brown</dc:creator><slash:comments>0</slash:comments><wfw:commentRss>http://azurecoding.net/blogs/brownie/rsscomments.aspx?PostID=3028</wfw:commentRss><comments>http://azurecoding.net/blogs/brownie/archive/2009/06/14/an-elevator-pitch-for-view-model.aspx#comments</comments><description>&lt;p&gt;I recently gave a presentation on WPF and Silverlight at this year’s Indy Code Camp. During the talk, I gave a brief overview of View Model. After explaining how data binding works within WPF, I had set myself up for the ultimate punch line:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Since we have this rich data binding model within WPF, why not bind our UI to an object that represents exactly what we want our UI to do.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;To demonstrate the power of WPF Data Binding and the View Model pattern I walked through a simple RSS Reader that displayed a list of feeds allowing the user to select one and see a list of feed items and selecting one of those select display the page associated with the feed item in a Frame, all using data binding against a View Model object and zero code behind. While one can argue there are easier ways to create a simple feed reader in WPF…the code was tailored to demonstrate the power of the ViewModel pattern. I saw a number of light bulbs turn on in the audience as a result.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://azurecoding.net/aggbug.aspx?PostID=3028" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/azurecoding/~4/ot15eLo39Z8" height="1" width="1"/&gt;</description><feedburner:origLink>http://azurecoding.net/blogs/brownie/archive/2009/06/14/an-elevator-pitch-for-view-model.aspx</feedburner:origLink></item><item><title>Announcing Alexandria RTW</title><link>http://feedproxy.google.com/~r/azurecoding/~3/n4VsFw03GJU/announcing-alexandria-rtw.aspx</link><pubDate>Thu, 09 Apr 2009 21:20:40 GMT</pubDate><guid isPermaLink="false">6e97e1e3-dc93-4c0d-b73f-e698f7d56013:957</guid><dc:creator>Mike Brown</dc:creator><slash:comments>0</slash:comments><wfw:commentRss>http://azurecoding.net/blogs/brownie/rsscomments.aspx?PostID=957</wfw:commentRss><comments>http://azurecoding.net/blogs/brownie/archive/2009/04/09/announcing-alexandria-rtw.aspx#comments</comments><description>&lt;p&gt;Release to the World that is. Today at 4:33 PM my wife delivered our newest family member, Khara Alexandria Brown. She weighs in at a healthy 6 pounds 3 ounces and has a modelesque height of 19 and 1/4 inches. Happy Birthday my little princess and many more!&lt;/p&gt;  &lt;p&gt;&lt;a href="http://azurecoding.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/brownie/KharasBirthday013_5F00_4990589F.jpg"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="Khara&amp;#39;s Birthday 013" border="0" alt="Khara&amp;#39;s Birthday 013" src="http://azurecoding.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/brownie/KharasBirthday013_5F00_thumb_5F00_4F6AFC38.jpg" width="364" height="484" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://azurecoding.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/brownie/Kharasbirthday020_5F00_4E266359.jpg"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="Khara&amp;#39;s birthday 020" border="0" alt="Khara&amp;#39;s birthday 020" src="http://azurecoding.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/brownie/Kharasbirthday020_5F00_thumb_5F00_3F0F847F.jpg" width="644" height="484" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://azurecoding.net/aggbug.aspx?PostID=957" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/azurecoding/~4/n4VsFw03GJU" height="1" width="1"/&gt;</description><feedburner:origLink>http://azurecoding.net/blogs/brownie/archive/2009/04/09/announcing-alexandria-rtw.aspx</feedburner:origLink></item><item><title>Blend Behaviors FTW</title><link>http://feedproxy.google.com/~r/azurecoding/~3/nlN5l6E66Dw/blend-behaviors-ftw.aspx</link><pubDate>Mon, 06 Apr 2009 19:12:00 GMT</pubDate><guid isPermaLink="false">6e97e1e3-dc93-4c0d-b73f-e698f7d56013:928</guid><dc:creator>Mike Brown</dc:creator><slash:comments>5</slash:comments><wfw:commentRss>http://azurecoding.net/blogs/brownie/rsscomments.aspx?PostID=928</wfw:commentRss><comments>http://azurecoding.net/blogs/brownie/archive/2009/04/06/blend-behaviors-ftw.aspx#comments</comments><description>&lt;p&gt;&lt;strong&gt;Update: &lt;/strong&gt;As promised, here&amp;rsquo;s the code read below for usage. &lt;br /&gt;(Please visit the site to view this media)&lt;/p&gt;
&lt;p&gt;Beyond SketchFlow (THE official coolest thing since sliced bread), Blend 3 has some other great features for improving the designer-developer workflow. Something I like a lot&amp;nbsp; (and most of &lt;a target="_blank" href="http://blog.galasoft.ch/archive/2009/04/05/using-a-behavior-to-magnify-your-wpf-applications.aspx"&gt;my fellow WPF Disciples&lt;/a&gt;) are Behaviors. &lt;/p&gt;
&lt;p&gt;If you recall, I spent a couple of posts a few years back talking about &lt;a target="_blank" href="http://mbrownchicago.spaces.live.com/Blog/cns!2221DC39E0C749A4!325.entry"&gt;using attached properties&lt;/a&gt; to enable adding &lt;a target="_blank" href="http://mbrownchicago.spaces.live.com/Blog/cns!2221DC39E0C749A4!331.entry"&gt;functionality to controls&lt;/a&gt; without code. Blend Behaviors take the pattern and wrap it in a simple API making it much easier to get down to the business of hacking WPF. &lt;/p&gt;
&lt;p&gt;Even more interesting than the standard attached behaviors is the new Trigger system implemented using the pattern. Including the capability of creating custom Trigger Actions. In the initial release of WPF, Trigger Actions were effectively sealed because they are abstract and the function that inheritors need to override is marked internal. This effectively stood in the way of providing a solution to this &lt;a target="_blank" href="http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/a078bab6-7068-427d-90fb-b08ee723928f/"&gt;problem in the MSDN forums&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The new Behavior-based trigger system (which works in Silverlight and WPF) opens the door for custom Trigger Actions. Now that we have custom Trigger Actions, I&amp;rsquo;m able to create an ExecuteCommandAction that allows you to invoke a Command from any trigger. The code is simple as is its usage.&lt;/p&gt;
&lt;p&gt;First we define the trigger action&lt;/p&gt;
&lt;div class="csharpcode"&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Windows;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Windows.Input;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.Expression.Interactivity;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System.ComponentModel;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;&lt;span class="kwrd"&gt;namespace&lt;/span&gt; AzureCoding.Agility.Core.Behaviors&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;{&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; ExecuteCommandAction : TriggerAction&amp;lt;FrameworkElement&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;    {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  10:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  11:  &lt;/span&gt;        [Category(&lt;span class="str"&gt;&amp;quot;ExecuteCommandAction Properties&amp;quot;&lt;/span&gt;),&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  12:  &lt;/span&gt;        Description(&lt;span class="str"&gt;&amp;quot;The name of the Command that will be executed by this Trigger Action&amp;quot;&lt;/span&gt;)]&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  13:  &lt;/span&gt;        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; TargetCommand&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  14:  &lt;/span&gt;        {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  15:  &lt;/span&gt;            get { &lt;span class="kwrd"&gt;return&lt;/span&gt; (&lt;span class="kwrd"&gt;string&lt;/span&gt;)GetValue(TargetCommandProperty); }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  16:  &lt;/span&gt;            set { SetValue(TargetCommandProperty, &lt;span class="kwrd"&gt;value&lt;/span&gt;); }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  17:  &lt;/span&gt;        }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  18:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  19:  &lt;/span&gt;        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;readonly&lt;/span&gt; DependencyProperty TargetCommandProperty =&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  20:  &lt;/span&gt;            DependencyProperty.Register(&lt;span class="str"&gt;&amp;quot;Target Command&amp;quot;&lt;/span&gt;,&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  21:  &lt;/span&gt;                                        &lt;span class="kwrd"&gt;typeof&lt;/span&gt;(&lt;span class="kwrd"&gt;string&lt;/span&gt;),&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  22:  &lt;/span&gt;                                        &lt;span class="kwrd"&gt;typeof&lt;/span&gt;(ExecuteCommandAction),&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  23:  &lt;/span&gt;                                        &lt;span class="kwrd"&gt;new&lt;/span&gt; PropertyMetadata&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  24:  &lt;/span&gt;                                            (TargetCommandChanged));&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  25:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  26:  &lt;/span&gt;        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; TargetCommandChanged(DependencyObject d,&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  27:  &lt;/span&gt;            DependencyPropertyChangedEventArgs e)&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  28:  &lt;/span&gt;        {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  29:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  30:  &lt;/span&gt;        }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  31:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  32:  &lt;/span&gt;        &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Invoke(&lt;span class="kwrd"&gt;object&lt;/span&gt; parameter)&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  33:  &lt;/span&gt;        {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  34:  &lt;/span&gt;            var path = TargetCommand;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  35:  &lt;/span&gt;            var dc = AssociatedObject.DataContext;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  36:  &lt;/span&gt;            var targetCommand = &lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  37:  &lt;/span&gt;                dc.GetType().GetProperty(path).GetValue(dc, &lt;span class="kwrd"&gt;null&lt;/span&gt;) &lt;span class="kwrd"&gt;as&lt;/span&gt; ICommand;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  38:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  39:  &lt;/span&gt;            &lt;span class="kwrd"&gt;if&lt;/span&gt; (targetCommand != &lt;span class="kwrd"&gt;null&lt;/span&gt; &amp;amp;&amp;amp; targetCommand.CanExecute(parameter))&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  40:  &lt;/span&gt;            {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  41:  &lt;/span&gt;                targetCommand.Execute(parameter);&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  42:  &lt;/span&gt;            }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  43:  &lt;/span&gt;        }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  44:  &lt;/span&gt;    }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  45:  &lt;/span&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;

&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The new Behaviors framework is defined in the Microsoft.Expression.Interactivity namespace (in the assembly by the same name). We inherit from TriggerAction, a descendant of the base behavior class and declare a dependency property for the name of the command we want invoked (lines 11 &amp;ndash; 30). Finally, we override the Invoke method from the TriggerAction class. Unfortunately, it appears that Binding does not work for TriggerActions and I haven&amp;rsquo;t heard if this will be addressed in the final version of the behaviors framework. At least for now we have to get a handle to the target command manually. Once that&amp;rsquo;s done, we just check that it can execute and then ask it to do so. The code uses the convention that the command resides on the Data Context of the object to which your trigger is attached. I also didn&amp;rsquo;t bother putting in robust error checking (so if the property doesn&amp;rsquo;t exist, you&amp;rsquo;ll get an exception).&lt;/p&gt;
&lt;p&gt;&lt;a href="http://azurecoding.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/brownie/image_5F00_21BBB0CC.png"&gt;&lt;img height="317" width="644" src="http://azurecoding.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/brownie/image_5F00_thumb_5F00_131104E7.png" alt="image" border="0" title="image" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt;&amp;nbsp; &lt;br /&gt;Once we&amp;rsquo;ve built the library and referenced it in a Blend 3 project, we can see our new behavior in the asset library&lt;/p&gt;
&lt;p&gt;&lt;a href="http://azurecoding.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/brownie/custombehaviors_5F00_4DF837B0.gif"&gt;&lt;img height="300" width="250" src="http://azurecoding.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/brownie/custombehaviors_5F00_thumb_5F00_7E3F0C66.gif" alt="custombehaviors" title="custombehaviors" style="display:inline;" /&gt;&lt;/a&gt; &lt;br /&gt;Adding it to a target is as simple as dragging it to the objects and timeline panel. From there we&amp;rsquo;re able to edit the properties using the property editor.&lt;/p&gt;
&lt;p&gt;So how do we use it? Well The convention of looking for the Command on the attached control&amp;rsquo;s data context works very well with the MVVM pattern. So let&amp;rsquo;s make a simple login control and matching View Model to drive it. Here&amp;rsquo;s the XAML for the Control&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;UserControl&lt;/span&gt;
&lt;span class="rem"&gt;&amp;lt;!-- A bunch of xmlns definitions&amp;mdash;&amp;gt;&lt;/span&gt; &lt;br /&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;UserControl.DataContext&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;AgVM:LoginViewModel&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;UserControl.DataContext&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Grid&lt;/span&gt; &lt;span class="attr"&gt;x:Name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;LayoutRoot&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Background&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;White&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="rem"&gt;&amp;lt;!-- A bunch of layout definitions--&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Button&lt;/span&gt; &lt;span class="attr"&gt;Margin&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;0,0,5,0&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;VerticalAlignment&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Bottom&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Grid&lt;/span&gt;.&lt;span class="attr"&gt;Column&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;1&amp;quot;&lt;/span&gt; 
                &lt;span class="attr"&gt;Grid&lt;/span&gt;.&lt;span class="attr"&gt;ColumnSpan&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;2&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Grid&lt;/span&gt;.&lt;span class="attr"&gt;Row&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;2&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Content&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Login&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;i:Interaction.Triggers&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;i:EventTrigger&lt;/span&gt; &lt;span class="attr"&gt;EventName&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Click&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Ag:ExecuteCommandAction&lt;/span&gt; &lt;span class="attr"&gt;TargetCommand&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;LoginCommand&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
                &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;i:EventTrigger&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;i:Interaction.Triggers&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Button&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;br /&gt;&lt;span class="rem"&gt;&amp;lt;!&amp;mdash;More UI code--&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Grid&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;UserControl&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;

&lt;/p&gt;
&lt;p&gt;There is no custom code-behind for the control. The ViewModel is instantiated in the XAML and all the elements are bound to properties on the ViewModel using data binding. Here is our ViewModel (or the significant parts thereof):&lt;/p&gt;
&lt;pre class="csharpcode"&gt;    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; LoginViewModel : INotifyPropertyChanged
    {
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;event&lt;/span&gt; PropertyChangedEventHandler PropertyChanged;
        &lt;span class="kwrd"&gt;public&lt;/span&gt; LoginViewModel()
        {
            PropertyChanged += (blank, blank1) =&amp;gt; { };
            LoginCommand = &lt;span class="kwrd"&gt;new&lt;/span&gt; DelegatingCommand
                               {
                                   CanExecuteRequested = param =&amp;gt; &lt;span class="kwrd"&gt;true&lt;/span&gt;,
                                   ExecuteRequested = param =&amp;gt; ShowLogin()
                               };
        }

        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; ShowLogin()
        {
            MessageBox.Show(String.Format(&lt;span class="str"&gt;&amp;quot;Login by {0} successful&amp;quot;&lt;/span&gt;, _UserName));
        }&lt;/pre&gt;
&lt;p&gt;

&lt;/p&gt;
&lt;p&gt;Here I&amp;rsquo;m using the &lt;a target="_blank" href="http://mbrownchicago.spaces.live.com/Blog/cns!2221DC39E0C749A4!596.entry"&gt;DelegatingCommand&lt;/a&gt; to expose an ICommand as a property on my ViewModel. I&amp;rsquo;ve also exposed a UserName and Password field. Running the application gives us this.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://azurecoding.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/brownie/runningthecode_5F00_6E4FC7A2.gif"&gt;&lt;img height="436" width="552" src="http://azurecoding.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/brownie/runningthecode_5F00_thumb_5F00_2CD51549.gif" alt="runningthecode" title="runningthecode" style="display:inline;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;So now we have trigger driven command execution with zero code behind. I&amp;rsquo;ll upload the code later.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://azurecoding.net/aggbug.aspx?PostID=928" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/azurecoding/~4/nlN5l6E66Dw" height="1" width="1"/&gt;</description><feedburner:origLink>http://azurecoding.net/blogs/brownie/archive/2009/04/06/blend-behaviors-ftw.aspx</feedburner:origLink></item><item><title>Mozilla Lab Concept Series, Aurora, and Flow</title><link>http://feedproxy.google.com/~r/azurecoding/~3/_1nVJrmotYo/mozilla-lab-concept-series-aurora-and-flow.aspx</link><pubDate>Sat, 28 Feb 2009 06:45:00 GMT</pubDate><guid isPermaLink="false">6e97e1e3-dc93-4c0d-b73f-e698f7d56013:981</guid><dc:creator>Mike Brown</dc:creator><slash:comments>0</slash:comments><wfw:commentRss>http://azurecoding.net/blogs/brownie/rsscomments.aspx?PostID=981</wfw:commentRss><comments>http://azurecoding.net/blogs/brownie/archive/2009/02/28/mozilla-lab-concept-series-aurora-and-flow.aspx#comments</comments><description>&lt;p&gt;Shortly after I started playing around with Flow and put my ideas on paper (or at least digitally), someone pointed me to Adaptive Path&amp;rsquo;s Aurora Project. The brainstorm that lead to me writing about Flow preceded the publishing of the first Aurora video. I believe that I had created the first prototype before the video was published as well. It was really inspiring to me because I envisioned in Flow many of the concepts demonstrated in that video. What&amp;rsquo;s very interesting to me is this quote from their site: This is not a demonstration of a real product. What you see in the video is a visualization of our ideas created by animators. Technologically, much of Aurora would be difficult or impossible to implement today. However, we expect everything you see to be possible in some form in the future. Their desktop browser concept is definitely feasible, I think the Flow prototype shows this. It wouldn&amp;rsquo;t be difficult to replace the graphs with The concept of synchronization across devices is enabled through Live Fx. WPF has a very rich visualization story and almost any data that can be pulled from a web page (for example a table of precipitation data) can be bound and transformed through different visualizations. I don&amp;rsquo;t think that &amp;ldquo;Flow&amp;rdquo; would ever serve as a primary browser. Or I should say it&amp;rsquo;s not one of my goals to make Flow a new web browser but rather an Information Browser. In order to make a good browser, Flow would need the capacity of rendering HTML to WPF natively. Hopefully, Microsoft will one day release a native WPF browser control. Or I will attract the attention of an HTML rendering wizard. Until then, web browsing in Flow will be limited by the capabilities of the BrowserControl.&lt;/p&gt;...(&lt;a href="http://azurecoding.net/blogs/brownie/archive/2009/02/28/mozilla-lab-concept-series-aurora-and-flow.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://azurecoding.net/aggbug.aspx?PostID=981" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/azurecoding/~4/_1nVJrmotYo" height="1" width="1"/&gt;</description><category domain="http://azurecoding.net/blogs/brownie/archive/tags/Flow/default.aspx">Flow</category><feedburner:origLink>http://azurecoding.net/blogs/brownie/archive/2009/02/28/mozilla-lab-concept-series-aurora-and-flow.aspx</feedburner:origLink></item><item><title>Static Reflection: Say What?</title><link>http://feedproxy.google.com/~r/azurecoding/~3/LmXFgTVB5aQ/static-reflection-say-what.aspx</link><pubDate>Mon, 23 Feb 2009 18:19:38 GMT</pubDate><guid isPermaLink="false">6e97e1e3-dc93-4c0d-b73f-e698f7d56013:539</guid><dc:creator>Mike Brown</dc:creator><slash:comments>3</slash:comments><wfw:commentRss>http://azurecoding.net/blogs/brownie/rsscomments.aspx?PostID=539</wfw:commentRss><comments>http://azurecoding.net/blogs/brownie/archive/2009/02/23/static-reflection-say-what.aspx#comments</comments><description>&lt;p&gt;There’s a new oxymoron going around call Static Reflection. The basic gist is that by using expression trees you can do things that appear to be dynamic but in reality are checked at compile time. Like for instance, &lt;a href="http://jonfuller.codingtomusic.com/2008/12/08/static-reflection-inotifypropertychanged/" target="_blank"&gt;getting the name of a property for firing an INotifyPropertyChanged.PropertyChanged event&lt;/a&gt;. My colleague, Jon Fuller, showed me &lt;a href="http://jonfuller.codingtomusic.com/2008/12/11/static-reflection-method-guards/" target="_blank"&gt;his code for Method Guards&lt;/a&gt; and my first comment was that this would be a great tool for implementing INotifyPropertyChanged. He informed me that he already went there and showed me that code as well.&lt;/p&gt;  &lt;p&gt;I wasn’t too happy with the idea of wasting your sole base class on NotifyPropertyChanged so I suggested that we use extension methods instead. After a bit of finagling with the framework (Events don’t like to be fired from outside their declaring class), here is the result:&lt;/p&gt;  &lt;pre&gt;        public static void SetProperty&amp;lt;T&amp;gt;(
		this INotifyPropertyChanged source, 
		Expression&amp;lt;Func&amp;lt;T&amp;gt;&amp;gt; propExpr,
		Expression&amp;lt;Func&amp;lt;T&amp;gt;&amp;gt; fieldExpr,
		T value)
        {
            source.SetProperty(
		propExpr, 
		fieldExpr, 
		value, 
		() =&amp;gt; { });
        }

        public static void SetProperty&amp;lt;T&amp;gt;(
		this INotifyPropertyChanged source,
		Expression&amp;lt;Func&amp;lt;T&amp;gt;&amp;gt; propExpr,
		Expression&amp;lt;Func&amp;lt;T&amp;gt;&amp;gt; fieldExpr,
		T value,
		Action doIfChanged)
        {
            var prop = 
		(PropertyInfo)
		((MemberExpression)propExpr.Body).Member;
            var field =
		(FieldInfo)
		((MemberExpression)fieldExpr.Body).Member;
            var currVal = (T)prop.GetValue(source, null);
            if (currVal==null &amp;amp;&amp;amp; value==null)
                return;
            if (currVal==null || !currVal.Equals(value))
            {
                field.SetValue(source, value);
                var eventDelegate =
			(MulticastDelegate) 
			source.GetType().GetField(
				&amp;quot;PropertyChanged&amp;quot;,
				BindingFlags.Instance | 
				BindingFlags.NonPublic).
				GetValue(source);
                Delegate[] delegates = 
			eventDelegate.GetInvocationList();
                var args = new PropertyChangedEventArgs(prop.Name);
                foreach (Delegate dlg in delegates)
                {
                    dlg.Method.Invoke(
			dlg.Target, 
			new object[] 
			{ 
			  source,
			  args 
			});
                }
                doIfChanged();
            }
        }&lt;/pre&gt;

&lt;p&gt;Now you can use a strongly typed NotifyPropertyChanged declaration without using your base class&lt;/p&gt;

&lt;pre&gt;    public class PersonStaticReflection : INotifyPropertyChanged
    {
        private string _firstName;
        private string _lastName;
        public string FirstName
        {
            get { return _firstName; }
            set { this.SetProperty(
			() =&amp;gt; FirstName, 
			() =&amp;gt; _firstName, 
			value); 
		}
        }
        public string LastName
        {
            get { return _lastName; }
            set
            {
                this.SetProperty(() =&amp;gt; LastName,
                                 () =&amp;gt; _lastName,
                                 value,
                                 () =&amp;gt;
                                     {
		// do something useful here
                                     });
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;
    }&lt;/pre&gt;

&lt;p&gt;For those concerned, you can statically cache the PropertyChanged field in a dictionary mapped to the object type so that you only have to reflect on it one time.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://azurecoding.net/aggbug.aspx?PostID=539" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/azurecoding/~4/LmXFgTVB5aQ" height="1" width="1"/&gt;</description><feedburner:origLink>http://azurecoding.net/blogs/brownie/archive/2009/02/23/static-reflection-say-what.aspx</feedburner:origLink></item><item><title>Get Your Hands on Flow</title><link>http://feedproxy.google.com/~r/azurecoding/~3/q-Oz7WEnUno/get-your-hands-on-flow.aspx</link><pubDate>Thu, 19 Feb 2009 05:04:07 GMT</pubDate><guid isPermaLink="false">6e97e1e3-dc93-4c0d-b73f-e698f7d56013:523</guid><dc:creator>Mike Brown</dc:creator><slash:comments>0</slash:comments><wfw:commentRss>http://azurecoding.net/blogs/brownie/rsscomments.aspx?PostID=523</wfw:commentRss><comments>http://azurecoding.net/blogs/brownie/archive/2009/02/19/get-your-hands-on-flow.aspx#comments</comments><description>&lt;p&gt;Quite a while ago, I first started hinting about “Flow”. I’ve given friends and colleagues information about the project, and have been teasing everyone with screenshots and videos. Monday, I started a series that I call “Refactoring to Patterns: WPF Edition” in which I started the task of building Flow from the ground up. A few moments ago &lt;a href="http://mbrownchicago.spaces.live.com/blog/cns!2221DC39E0C749A4!1278.entry" target="_blank"&gt;I wrote a post discussing the background of Flow&lt;/a&gt; and finally made the prototype available for download. There is going to be some crossover between my other blog and this one here. But I’m getting ahead of myself.&lt;/p&gt;  &lt;p&gt;I’d love to get your feedback. I will be publishing a Codeplex project where you can submit bugs, join the discussion, and even download the code. Until then, you can leave a message for me at either of my blogs. Happy coding!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://azurecoding.net/aggbug.aspx?PostID=523" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/azurecoding/~4/q-Oz7WEnUno" height="1" width="1"/&gt;</description><feedburner:origLink>http://azurecoding.net/blogs/brownie/archive/2009/02/19/get-your-hands-on-flow.aspx</feedburner:origLink></item><item><title>Entity Framework Has Layers Like an Onion</title><link>http://feedproxy.google.com/~r/azurecoding/~3/8fzrlAoEDBs/entity-framework-has-layers-like-an-onion.aspx</link><pubDate>Wed, 18 Feb 2009 16:23:36 GMT</pubDate><guid isPermaLink="false">6e97e1e3-dc93-4c0d-b73f-e698f7d56013:519</guid><dc:creator>Mike Brown</dc:creator><slash:comments>1</slash:comments><wfw:commentRss>http://azurecoding.net/blogs/brownie/rsscomments.aspx?PostID=519</wfw:commentRss><comments>http://azurecoding.net/blogs/brownie/archive/2009/02/18/entity-framework-has-layers-like-an-onion.aspx#comments</comments><description>&lt;p&gt;If you’ve been &lt;a href="http://twitter.com/browniepoints" target="_blank"&gt;following my tweets&lt;/a&gt;, you’ll know that I’ve been experimenting with Entity Framework lately. I’ve been digging around, looking at the generated code for EF and realized something very interesting.&lt;/p&gt;  &lt;pre class="csharpcode"&gt;    [EdmEntityType(NamespaceName=&lt;span class="str"&gt;&amp;quot;DBO&amp;quot;&lt;/span&gt;, Name=&lt;span class="str"&gt;&amp;quot;Project&amp;quot;&lt;/span&gt;)]
    [Attribute(IsReference=&lt;span class="kwrd"&gt;true&lt;/span&gt;)]
    [Serializable()]
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;partial&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; Project : EntityObject
    {&lt;/pre&gt;

&lt;p&gt;You see that? My entity has Attributes on it…very similar to NHibernate attributes. Here’s another interesting tidbit from a property that exposes a relationship between two entities (a so-called Navigation Property)&lt;/p&gt;

&lt;pre class="csharpcode"&gt;[EdmRelationshipNavigationProperty(
  &lt;span class="str"&gt;&amp;quot;DBO&amp;quot;&lt;/span&gt;, &lt;span class="str"&gt;&amp;quot;FK_tblTasks_tblProjects&amp;quot;&lt;/span&gt;, &lt;span class="str"&gt;&amp;quot;tblTasks&amp;quot;&lt;/span&gt;)]
&lt;span class="kwrd"&gt;public&lt;/span&gt; EntityCollection&amp;lt;Task&amp;gt; Tasks{
   get{
     &lt;span class="kwrd"&gt;return&lt;/span&gt; RelationshipManager.GetRelatedCollection&amp;lt;Task&amp;gt;(
                 &lt;span class="str"&gt;&amp;quot;DBO.FK_tblTasks_tblProjects&amp;quot;&lt;/span&gt;, &lt;span class="str"&gt;&amp;quot;tblTasks&amp;quot;&lt;/span&gt;);
   }
   set{
     &lt;span class="kwrd"&gt;if&lt;/span&gt; ((&lt;span class="kwrd"&gt;value&lt;/span&gt; != &lt;span class="kwrd"&gt;null&lt;/span&gt;)){
       RelationshipManager.InitializeRelatedCollection&amp;lt;Task&amp;gt;(
         &lt;span class="str"&gt;&amp;quot;DBO.FK_tblTasks_tblProjects&amp;quot;&lt;/span&gt;, &lt;span class="str"&gt;&amp;quot;tblTasks&amp;quot;&lt;/span&gt;, &lt;span class="kwrd"&gt;value&lt;/span&gt;);
   }
}&lt;/pre&gt;

&lt;p&gt;Notice that the navigation property has an attribute giving the name of the relationship (here the same name as the foreign key) and the related entity name (again given the same name as the foreign table). Behind the scenes it uses a relationship manager (property of EntityObject) to get/set the values.&lt;/p&gt;

&lt;h2&gt;&lt;/h2&gt;

&lt;h3&gt;So What’s Your Point?&lt;/h3&gt;

&lt;p&gt;The point is that the generated code is nothing more than a strongly typed convenience layer over the EF API. The point is that it is possible to provide your own engine that lays over this API and removes the coupling to EntityObject from your Domain Objects. The core of Entity Framework…the database abstraction layer…is very solid. It’s begging to have a proper O/RM engine placed on top of it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://azurecoding.net/aggbug.aspx?PostID=519" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/azurecoding/~4/8fzrlAoEDBs" height="1" width="1"/&gt;</description><feedburner:origLink>http://azurecoding.net/blogs/brownie/archive/2009/02/18/entity-framework-has-layers-like-an-onion.aspx</feedburner:origLink></item><item><title>Starting the New Year With a Bang!</title><link>http://feedproxy.google.com/~r/azurecoding/~3/0klV-_ZX9l8/starting-the-new-year-with-a-bang.aspx</link><pubDate>Fri, 06 Feb 2009 17:52:07 GMT</pubDate><guid isPermaLink="false">6e97e1e3-dc93-4c0d-b73f-e698f7d56013:295</guid><dc:creator>Mike Brown</dc:creator><slash:comments>1</slash:comments><wfw:commentRss>http://azurecoding.net/blogs/brownie/rsscomments.aspx?PostID=295</wfw:commentRss><comments>http://azurecoding.net/blogs/brownie/archive/2009/02/06/starting-the-new-year-with-a-bang.aspx#comments</comments><description>&lt;p&gt;Yes I know it’s February already, but this should show even more how big the start of this year has been for me. First and foremost is the big announcement that the new year brought.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://azurecoding.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/brownie/MVP_5F00_FullColor_5F00_ForScreen_5F00_1405520D.png"&gt;&lt;img style="border-right-width:0px;margin:0px 10px 0px 0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="MVP_FullColor_ForScreen" border="0" alt="MVP_FullColor_ForScreen" align="left" src="http://azurecoding.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/brownie/MVP_5F00_FullColor_5F00_ForScreen_5F00_thumb_5F00_3D991D40.png" width="84" height="129" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;First and foremost, I’ve been named &lt;a href="https://mvp.support.microsoft.com/profile/mike.brown" target="_blank"&gt;an MVP in Client App Development&lt;/a&gt; (for my community contributions with WPF). This is an incredible honor for me. In addition to the title, being an MVP provides me an opportunity to have better interaction and feedback with Microsoft especially with regards to my specialization. According to the program guidelines, the award is for my past activities and I am not required to do anything else.&lt;/p&gt;  &lt;p&gt;However, I want to leverage this opportunity to the fullest and will continue my community contributions going forward, both with regard to WPF and Silverlight as well as with Windows Azure.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://azurecoding.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/brownie/USAltNET_5F00_7C8A9DDB.png"&gt;&lt;img style="border-right-width:0px;margin:0px 10px 0px 0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="USAltNET" border="0" alt="USAltNET" align="left" src="http://azurecoding.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/brownie/USAltNET_5F00_thumb_5F00_083FE50E.png" width="84" height="124" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Second, as an organizer for our local Alt.NET User Group, &lt;a href="http://indyalt.net" target="_blank"&gt;Indy Alt.NET&lt;/a&gt;, I’m excited about a few recent developments with the group. Chief among those being named an &lt;a href="http://www.ineta.org/default.aspx" target="_blank"&gt;official INETA group&lt;/a&gt; – something that surprised me seeing that there was already an &lt;a href="http://indynda.org" target="_blank"&gt;INETA group in the Indianapolis area&lt;/a&gt;. We are coming on our first anniversary and have seen our attendance stabilize at around 25 per meeting. With almost a year under our belt we have sat down and started a few initiatives. &lt;/p&gt;  &lt;p&gt;One major decision will be to incorporate as a non-profit organization (an idea we had thrown about for a while but were too busy with day to day operations to act upon). This action will allow us to apply for grants and begin some community outreach initiatives that we are all excited about. It will also make us more attractive to potential sponsors as certain donations to us will be tax deductible.&lt;/p&gt;  &lt;p&gt;Another initiative has been a marketing and sponsorship drive. We are trying to grow organically, but we have noticed that we have a chicken or egg scenario. Therefore, we are pushing our growth on multiple fronts. So far we are getting good feedback from our efforts.&lt;/p&gt;  &lt;p&gt;Our biggest initiative about which we are all very excited is planning for a local conference. More on that later ;)&lt;/p&gt;  &lt;p&gt;&lt;a href="http://azurecoding.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/brownie/SEPlogo_5F00_52C722E8.gif"&gt;&lt;img style="border-right-width:0px;margin:0px 10px 0px 0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="SEP-logo" border="0" alt="SEP-logo" align="left" src="http://azurecoding.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/brownie/SEPlogo_5F00_thumb_5F00_004842AC.gif" width="120" height="33" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;But wait there’s more! I just finished my first year with my current employer, Software Engineering Professionals. Management announced a number of initiatives here that are pretty exciting for me. I can’t necessarily talk about them right now, but it reaffirmed my decision to come here. I can honestly say that I have grown dramatically since I’ve been here. It is an amazing place to work, and I’m excited to see what the future has in store.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width:0px;margin:0px 10px 0px 0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="SEP-logo" border="0" alt="SEP-logo" src="http://tickers.tickerfactory.com/ezt/d/1;21;30/st/20090413/k/9a92/preg.png" /&gt;&lt;/p&gt;  &lt;p&gt;Finally, my family is counting the days until our latest addition is expected to arrive.&lt;/p&gt;  &lt;p&gt;Like I said, this year is starting off with a bang…and there’s more to come. I’ll keep you posted with new developments.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://azurecoding.net/aggbug.aspx?PostID=295" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/azurecoding/~4/0klV-_ZX9l8" height="1" width="1"/&gt;</description><category domain="http://azurecoding.net/blogs/brownie/archive/tags/General/default.aspx">General</category><feedburner:origLink>http://azurecoding.net/blogs/brownie/archive/2009/02/06/starting-the-new-year-with-a-bang.aspx</feedburner:origLink></item><item><title>Buzz In the Cloud December 4, 2008</title><link>http://feedproxy.google.com/~r/azurecoding/~3/9cfkZ9TEJ-0/buzz-in-the-cloud-december-4-2008.aspx</link><pubDate>Thu, 04 Dec 2008 14:36:07 GMT</pubDate><guid isPermaLink="false">6e97e1e3-dc93-4c0d-b73f-e698f7d56013:74</guid><dc:creator>Mike Brown</dc:creator><slash:comments>0</slash:comments><wfw:commentRss>http://azurecoding.net/blogs/brownie/rsscomments.aspx?PostID=74</wfw:commentRss><comments>http://azurecoding.net/blogs/brownie/archive/2008/12/04/buzz-in-the-cloud-december-4-2008.aspx#comments</comments><description>&lt;p&gt;Sorry for the extended absence. I&amp;#39;ve been working on a crossover article series on refactoring between my WPF half and my Azure half. It&amp;#39;s shaping up pretty nicely. But in the meanwhile, I&amp;#39;ve neglected my buzz duties. So without further ado, here are your buzz-worthy items for today.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Getting Webby With It&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Next week (December 8th to be precise), the Live Framework team will be &lt;a target="_blank" href="http://blogs.msdn.com/angus_logan/archive/2008/12/02/join-us-for-a-live-framework-webcast.aspx"&gt;hosting a webcast&lt;/a&gt;. I think the topic will be about the future of the MacOS or something like that. I&amp;#39;m pretty stoked about the 1 and 15 minutes scheduled for Q&amp;amp;A on the agenda!&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Steve Marx Says&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a target="_blank" href="http://blog.smarx.com/posts/pdc-attendees-should-have-windows-azure-tokens"&gt;&amp;quot;PDC Attendees Should Have Windows Azure Tokens&amp;quot;&lt;/a&gt; (that is if you registered for them). Also if you follow his blog, he has more Azure code samples (including the blog itself) than you can shake a stick at.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;The Gift That Keeps on Giving&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;The PDC ended a month ago and I am still finding &lt;a target="_blank" href="http://www.architectingwith.net/2008/11/01/BuildingMultiEnterpriseBusinessApplicationsOnTheAzureServicesPlatform.aspx"&gt;great sessions like this one&lt;/a&gt; that gives an in depth view of how the B2B sample Azure application shown during the opening keynote was built. It&amp;#39;s funny, I went into PDC without a shred of interest in Microsoft&amp;#39;s cloud platform (outside of Mesh/Live Framework). And now I&amp;#39;m so enthralled by it, I haven&amp;#39;t spent more than 3 hours with VS 2010 (and that&amp;#39;s just for the &amp;quot;Oslo&amp;quot; stuff). Anyway, I&amp;#39;m told there are good sessions on WPF 4.0, WF 4.0, TFS 2010, and other new stuff, and I&amp;#39;m going to get to them...eventually.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;The Real Reason to Get Excited About Live Mesh&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;I&amp;#39;ve seen a lot of chatter about how cool Live Mesh is because you can synchronize your files. What if I told you that the file synchronization is really just a proof-of-concept. The Live Mesh client that you see today, is little more than an example of what the Live Framework enables. Don&amp;#39;t believe me? Look at this &lt;a target="_blank" href="http://blogs.conchango.com/jamiethomson/archive/2008/11/25/an-audio-visual-tour-of-the-mesh-developer-experience.aspx"&gt;video by Jamie Thomson&lt;/a&gt; where he shows the masses what the lucky few with Live Framework CTP tokens get to play with. BTW, I managed to win a few invite cards from the Live Framework team in an arm wrestling match. Leave a comment on this post for a chance to win one.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Today&amp;#39;s Episode Guest Stars David Burela&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Long Zheng decided to let someone else take the reins for a day over at &lt;a target="_blank" href="http://istartedsomething.com"&gt;his blog&lt;/a&gt;. David Burela took the opportunity &lt;a target="_blank" href="http://www.istartedsomething.com/20081203/guest-post-windows-azure-review-from-a-developer/"&gt;to post a review of Azure&lt;/a&gt;. Don&amp;#39;t go looking at the sidebar or anything. There&amp;#39;s nothing to see there. Nope, nothing at all about a HP Magic Giveaway including a Touchsmart that is Windows 7 multi-touch capable.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Farewell &amp;quot;Blue Badge&amp;quot; Hack But We Don&amp;#39;t Need You Anymore&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Well soon we won&amp;#39;t that is. Windows 7 Beta 1 (feature complete) will be &lt;a target="_blank" href="http://windows7center.com/windows-7-news/windows-7-beta-1-to-be-released-on-january-13/"&gt;given to attendees of the MSDN Developer Conferences&lt;/a&gt;. Basically, it&amp;#39;s the PDC distilled and distributed at a more reasonable price point. I will be attending the Chicago event and promptly installing my Beta 1 copy on site!&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Windows 7 Gives You Wings&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Over at Redmond Developer News, you can read the &lt;a target="_blank" href="http://reddevnews.com/features/article.aspx?editorialsid=2591"&gt;new issue&amp;#39;s cover story online&lt;/a&gt;. It is a review of Windows 7 Build 6801 that pretty much reaffirms my experience with 7.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;The Signs Were Always There&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Way back on October 1st Computer World posted a &lt;a target="_blank" href="http://www.computerworld.com/action/article.do?command=viewArticleBasic&amp;amp;articleId=9115978"&gt;teaser article for &amp;quot;Windows Cloud&amp;quot;&lt;/a&gt;. &lt;/p&gt; &lt;p&gt;&lt;strong&gt;You&amp;#39;ve Got to Love Fanboys&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Windows 7 hasn&amp;#39;t even released yet and the self proclaimed &amp;quot;Cyber Cynic&amp;quot; has written &lt;a target="_blank" href="http://www.computerworld.com/action/article.do?command=viewArticleBasic&amp;amp;articleId=329368"&gt;three&lt;/a&gt; &lt;a target="_blank" href="http://blogs.computerworld.com/microsoft_bribes_again"&gt;different&lt;/a&gt; &lt;a target="_blank" href="http://blogs.computerworld.com/the_big_windows_7_lie"&gt;posts&lt;/a&gt; proclaiming that Windows 7 sucks and that Microsoft had to resort to bribery to get a good review. Like I said in my review, the only &amp;quot;bribe&amp;quot; I received from Microsoft was a copy of Windows 7 on a WD Passport drive. And my employer paid 2400 for me to get that. &lt;/p&gt; &lt;p&gt;&lt;strong&gt;The Live Framework Afternoon Special&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;In a new white paper by Nishant Gupta and Dharma Shukla, the two answer the question we&amp;#39;ve all been dying to know &lt;a target="_blank" href="http://dev.live.com/liveframework/livefxwhatwhy.pdf"&gt;&amp;quot;What is it and Why Should I Care?&amp;quot;&lt;/a&gt;. Next week it will be &amp;quot;Coping with Peer Pressure: Should I Use Live Framework?&amp;quot;.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Well that&amp;#39;s it for today fellow cloud dwellers. There&amp;#39;s more news to tell, but not enough time to type it all out.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://azurecoding.net/aggbug.aspx?PostID=74" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/azurecoding/~4/9cfkZ9TEJ-0" height="1" width="1"/&gt;</description><category domain="http://azurecoding.net/blogs/brownie/archive/tags/Windows+7/default.aspx">Windows 7</category><category domain="http://azurecoding.net/blogs/brownie/archive/tags/PDC/default.aspx">PDC</category><category domain="http://azurecoding.net/blogs/brownie/archive/tags/Buzz/default.aspx">Buzz</category><category domain="http://azurecoding.net/blogs/brownie/archive/tags/Windows+Azure/default.aspx">Windows Azure</category><category domain="http://azurecoding.net/blogs/brownie/archive/tags/Cloud/default.aspx">Cloud</category><category domain="http://azurecoding.net/blogs/brownie/archive/tags/Mesh/default.aspx">Mesh</category><category domain="http://azurecoding.net/blogs/brownie/archive/tags/Live+Framework/default.aspx">Live Framework</category><feedburner:origLink>http://azurecoding.net/blogs/brownie/archive/2008/12/04/buzz-in-the-cloud-december-4-2008.aspx</feedburner:origLink></item><item><title>Getting Started With Azure Development</title><link>http://feedproxy.google.com/~r/azurecoding/~3/D_cxP4NXGbI/getting-started-with-azure-development.aspx</link><pubDate>Wed, 26 Nov 2008 07:02:00 GMT</pubDate><guid isPermaLink="false">6e97e1e3-dc93-4c0d-b73f-e698f7d56013:70</guid><dc:creator>Mike Brown</dc:creator><slash:comments>0</slash:comments><wfw:commentRss>http://azurecoding.net/blogs/brownie/rsscomments.aspx?PostID=70</wfw:commentRss><comments>http://azurecoding.net/blogs/brownie/archive/2008/11/26/getting-started-with-azure-development.aspx#comments</comments><description>&lt;p&gt;I have posted an overview of &lt;a href="http://azurecoding.net/content/AzureDev1.aspx" target="_self"&gt;getting started with Windows Azure development&lt;/a&gt;,&amp;nbsp;our first article in the Azure Development Series.&amp;nbsp;I will update the series weekly with walkthroughs and tutorials on Azure Development.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://azurecoding.net/aggbug.aspx?PostID=70" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/azurecoding/~4/D_cxP4NXGbI" height="1" width="1"/&gt;</description><category domain="http://azurecoding.net/blogs/brownie/archive/tags/Azurecoding/default.aspx">Azurecoding</category><category domain="http://azurecoding.net/blogs/brownie/archive/tags/Azure+Development/default.aspx">Azure Development</category><category domain="http://azurecoding.net/blogs/brownie/archive/tags/Articles/default.aspx">Articles</category><feedburner:origLink>http://azurecoding.net/blogs/brownie/archive/2008/11/26/getting-started-with-azure-development.aspx</feedburner:origLink></item><item><title>Buzz In the Cloud November 25, 2008</title><link>http://feedproxy.google.com/~r/azurecoding/~3/4io02BHi1XM/buzz-in-the-cloud-november-25-2008.aspx</link><pubDate>Tue, 25 Nov 2008 12:29:20 GMT</pubDate><guid isPermaLink="false">6e97e1e3-dc93-4c0d-b73f-e698f7d56013:68</guid><dc:creator>Mike Brown</dc:creator><slash:comments>0</slash:comments><wfw:commentRss>http://azurecoding.net/blogs/brownie/rsscomments.aspx?PostID=68</wfw:commentRss><comments>http://azurecoding.net/blogs/brownie/archive/2008/11/25/buzz-in-the-cloud-november-25-2008.aspx#comments</comments><description>&lt;p&gt;Whoa...today is a doozy for buzzing, so let&amp;#39;s get right to it.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;I For One Welcome Our New Cloud Overlords&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;The &lt;a target="_blank" href="http://deepfriedbytes.com/podcast/episode-20-windows-azure-the-overlord-in-the-cloud/"&gt;latest Deep Fried Bytes episode&lt;/a&gt; (entitled &amp;quot;Windows Azure: the Overlord in the Cloud&amp;quot;) includes an interview with Steve Marx, Program Manager for Windows Azure.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;7&amp;#39;s a Lucky Number&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Oak Leaf Blog rounds out their Azure Storage Services Test Harness with a post on &lt;a target="_blank" href="http://oakleafblog.blogspot.com/2008/11/azure-storage-services-test-harness_22.html"&gt;paging the LINQ query result sets&lt;/a&gt; and another on &lt;a target="_blank" href="http://oakleafblog.blogspot.com/2008/11/azure-storage-services-test-harness_231.html"&gt;testing for table existence&lt;/a&gt;...hmm, maybe a management utility is in order to get rid of that pesky requirement. By the way, they also placed the harness up &lt;a target="_blank" href="http://oakleafblog.blogspot.com/2008/11/windows-azure-test-harness-is-live.html"&gt;for your viewing pleasure&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;If CTP Isn&amp;#39;t Cutting Edge Enough&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;What&amp;#39;s that you say? Living on the edge isn&amp;#39;t enough for you? You want to jump off the edge with your bedroom sheets as your parachute? Okay, daredevil, I&amp;#39;ve got the fix for your thrill-seeking craving! Check out the &lt;a target="_blank" href="http://www.microsoft.com/azure/sqllabs.mspx"&gt;SQL Services Labs&lt;/a&gt; where you&amp;#39;ll find 7 projects in &amp;quot;incubation&amp;quot; status. Included in these projects are:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;a target="_blank" href="http://www.microsoft.com/azure/mining.mspx"&gt;Data Mining in the Cloud&lt;/a&gt;: Just what it sounds like, it&amp;#39;s SQL Analysis Services over SDS. I hope this becomes a final product.  &lt;li&gt;&lt;a target="_blank" href="http://www.microsoft.com/azure/URank.mspx"&gt;URank&lt;/a&gt;: A search engine that lets &amp;quot;U Rank&amp;quot; the hits.  &lt;li&gt;&lt;a title="Project Codename Anchorage" href="http://www.microsoft.com/azure/anchorage.mspx"&gt;Project Codename Anchorage&lt;/a&gt;: Or as I like to call it &lt;a target="_blank" href="http://azurecoding.net/blogs/brownie/archive/2008/11/24/the-synchronization-morass.aspx"&gt;YASPFM&lt;/a&gt;  &lt;li&gt;&lt;a title="Project Codename &amp;ldquo;Huron&amp;rdquo;" href="http://www.microsoft.com/azure/huron.mspx"&gt;Project Codename “Huron”&lt;/a&gt;: Sync Services for SQL Server...intriguing...  &lt;li&gt;&lt;a title="Reporting against SQL Data Services" href="http://www.microsoft.com/azure/reporting.mspx"&gt;Reporting against SQL Data Services&lt;/a&gt;: Again, not a very creative name but it definitely gets the point across. This one lets you point your internal SQL Server Reporting Server at an Azure SDS database.  &lt;li&gt;&lt;a title="Codename &amp;ldquo;Astoria&amp;rdquo; Offline" href="http://www.microsoft.com/azure/AstoriaOffline.mspx"&gt;Codename “Astoria” Offline&lt;/a&gt;: Sync Services for SDS (not to be mistaken with Sync for SQL Server).  &lt;li&gt;&lt;a title="Accessing SDS using ADO.NET Data Services" href="http://www.microsoft.com/azure/SDSAstoria.mspx"&gt;Accessing SDS using ADO.NET Data Services&lt;/a&gt;: I believe one of the SDK samples does this, but this incubation looks like it&amp;#39;s aiming to make it a standard part of the Azure SDK instead of just a sample&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Overall, I see the utility of all these projects (outside of &amp;quot;Anchorage&amp;quot; it really has me confused). I think it would be good to have them all graduate from incubation. But if I had to pick one, it would be the ADO.NET data services over SDS.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Saving Lives One Cloud at a Time&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Over at the Joy of Code, Josh Twist &lt;a target="_blank" href="http://www.thejoyofcode.com/Windows_Azure_PoC_for_the_RNLI.aspx"&gt;tells us about his adventures in the clouds&lt;/a&gt; while coding a proof of concept for the RNLI (Royal National Lifeboat Institute). Basically, the software receives beacon data from fishing boats (relayed from satellites to the RNLI data center to the Cloud App). Should a fisherman go overboard, an alert signal is raised and the Coast Guard will have tracking data in order to send the proper assets to the right place. That is incredible if I must say so myself. &lt;/p&gt; &lt;p&gt;&lt;strong&gt;Two Pages We Have More Content in a Single Post&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;DevX finally decided that Windows Azure was worth space on their gargantuan site. So they wrote a two page &lt;a target="_blank" href="http://www.devx.com/MS_DeveloperCentre/Article/40022?trk=DXRSS_LATEST"&gt;introduction to Windows Azure&lt;/a&gt;. Oh wait, the introduction is on the entire Azure Services platform. Honestly, you&amp;#39;d be better served reading David Chappell&amp;#39;s white paper. Heck the AzureWiki has more content than that introduction (with more on the way).&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Chappell Show&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;I wonder how many people have hacked the pronunciation of poor David Chappell&amp;#39;s name. To be honest, until I &lt;a target="_blank" href="http://www.davidchappell.com/blog/2008/11/interview-on-cloud-computing-and-azure.html"&gt;saw this interview&lt;/a&gt;, I was one of them. Now I know it&amp;#39;s CHAPpell (like the Church) not ChapPELL (like the show). And knowing is half the battle.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Googling Azure&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Dion Almaer, Googler and founder of Ajaxian, &lt;a target="_blank" href="http://almaer.com/blog/microsoft-say-game-on-thoughts-on-pdc"&gt;gives us a refreshingly honest view of PDC&lt;/a&gt; from a competitor&amp;#39;s perspective. Our overlord in the cloud is pleased.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Must Have a Long Digestive Track&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Kirk Evans writes a pretty insightful post on the PDC announcements in &lt;a target="_blank" href="http://blogs.msdn.com/kaevans/archive/2008/11/18/the-pdc-that-took-weeks-to-digest.aspx"&gt;&amp;quot;The PDC That Took Weeks to Digest&amp;quot;&lt;/a&gt; He talks about letting it stew, simmer, and brew, but never eating. Maybe it would digest quicker if he hurry up and cook it.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Yet Another Blog Post About Silverlight and Azure&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Although to give the author credit, it does &lt;a target="_blank" href="http://silverlightuk.blogspot.com/2008/11/silverlight-and-windows-azure.html"&gt;discuss the limitations of Silverlight&lt;/a&gt; on the current release of Azure. Hey guys, can we get to working on that whole SSL certificate thing?&lt;/p&gt; &lt;p&gt;Okay that&amp;#39;s enough for today&amp;#39;s buzz. There&amp;#39;s still a lot more that I could throw at you, but I&amp;#39;m getting fatigued. I&amp;#39;ll be back tomorrow with more buzz.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://azurecoding.net/aggbug.aspx?PostID=68" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/azurecoding/~4/4io02BHi1XM" height="1" width="1"/&gt;</description><category domain="http://azurecoding.net/blogs/brownie/archive/tags/Azure/default.aspx">Azure</category><category domain="http://azurecoding.net/blogs/brownie/archive/tags/PDC/default.aspx">PDC</category><category domain="http://azurecoding.net/blogs/brownie/archive/tags/Buzz/default.aspx">Buzz</category><category domain="http://azurecoding.net/blogs/brownie/archive/tags/Windows+Azure/default.aspx">Windows Azure</category><category domain="http://azurecoding.net/blogs/brownie/archive/tags/Cloud/default.aspx">Cloud</category><category domain="http://azurecoding.net/blogs/brownie/archive/tags/Silverlight/default.aspx">Silverlight</category><category domain="http://azurecoding.net/blogs/brownie/archive/tags/Table+Services/default.aspx">Table Services</category><category domain="http://azurecoding.net/blogs/brownie/archive/tags/SQL+Services/default.aspx">SQL Services</category><feedburner:origLink>http://azurecoding.net/blogs/brownie/archive/2008/11/25/buzz-in-the-cloud-november-25-2008.aspx</feedburner:origLink></item><item><title>The Synchronization Morass</title><link>http://feedproxy.google.com/~r/azurecoding/~3/_c8u__D7_rY/the-synchronization-morass.aspx</link><pubDate>Tue, 25 Nov 2008 04:45:30 GMT</pubDate><guid isPermaLink="false">6e97e1e3-dc93-4c0d-b73f-e698f7d56013:65</guid><dc:creator>Mike Brown</dc:creator><slash:comments>1</slash:comments><wfw:commentRss>http://azurecoding.net/blogs/brownie/rsscomments.aspx?PostID=65</wfw:commentRss><comments>http://azurecoding.net/blogs/brownie/archive/2008/11/24/the-synchronization-morass.aspx#comments</comments><description>&lt;p&gt;Microsoft loves them some synchronization like a fat kid loves cake.&lt;/p&gt; &lt;p&gt;Yet another synchronization platform from Microsoft has emerged. This one appears to be an evolution of &lt;a target="_blank" href="http://www.microsoft.com/downloads/details.aspx?familyid=C26EFA36-98E0-4EE9-A7C5-98D0592D8C52&amp;amp;displaylang=en"&gt;the Synctoy&lt;/a&gt; which was a desktop application that seemed oddly similar to Live Mesh. &lt;a target="_blank" href="http://sqlserviceslabs.net/Anchorage.html"&gt;Codename &amp;quot;Anchorage&amp;quot;&lt;/a&gt;, or as Redmond Pie calls it, &lt;a target="_blank" href="http://www.redmondpie.com/a-synctoy-for-the-cloud/"&gt;&amp;quot;A SyncToy for the Cloud&amp;quot;&lt;/a&gt; If you&amp;#39;re totally lost at this point, it&amp;#39;s with good reason:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;Codename &amp;quot;Anchorage&amp;quot; represents our current thinking of where to take SyncToy in the future that not only provides value as a generic sync hub but also - an easy to use application capable of keeping content synchronized across PCs, services, and devices through a rich plug-in mechanism based on the Microsoft Sync Framework. &lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Come again? Isn&amp;#39;t that what Live Mesh does?  &lt;blockquote&gt; &lt;p&gt;With Live Mesh, you can synchronize files with all of your devices, so you always have the latest versions handy. Access your files from any device or from the web, easily share them with others, and get notified whenever someone changes a file. &lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Here&amp;#39;s where it gets really loopy:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;With this project, providers will be able to register and be discovered in a variety of sync groups including contacts, files, favorites, videos, as well as synchronization across services such as the Live Mesh, PhotoBucket.com, Smugmug.com, and more. Powered by the Microsoft Sync Framework - this E2E and hub for sync providers has value for both consumers AND developers.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;So wait a minute...&amp;quot;Anchorage&amp;quot; is an extensible synchronization platform that integrates with Live Mesh which itself is an extensible synchronization platform. (And from all indicators is ALSO built on top of the Sync Framework). Well at least Live Sync is a purely end user synchronization platform...at least we hope.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://azurecoding.net/aggbug.aspx?PostID=65" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/azurecoding/~4/_c8u__D7_rY" height="1" width="1"/&gt;</description><category domain="http://azurecoding.net/blogs/brownie/archive/tags/Mesh/default.aspx">Mesh</category><category domain="http://azurecoding.net/blogs/brownie/archive/tags/Live+Sync/default.aspx">Live Sync</category><category domain="http://azurecoding.net/blogs/brownie/archive/tags/Anchorage/default.aspx">Anchorage</category><category domain="http://azurecoding.net/blogs/brownie/archive/tags/Live+Framework/default.aspx">Live Framework</category><feedburner:origLink>http://azurecoding.net/blogs/brownie/archive/2008/11/24/the-synchronization-morass.aspx</feedburner:origLink></item></channel></rss>
