<?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/" version="2.0"><channel><title>Mike Nichols - Son Of Nun Technology</title><link>http://devlicio.us/blogs/mike_nichols/default.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP1 (Build: 31106.3070)</generator><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/MikeNichols" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="mikenichols" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item><title>Help Wanted</title><link>http://devlicio.us/blogs/mike_nichols/archive/2011/10/25/help-wanted.aspx</link><pubDate>Tue, 25 Oct 2011 19:45:00 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:68329</guid><dc:creator>Michael Nichols</dc:creator><slash:comments>1</slash:comments><comments>http://devlicio.us/blogs/mike_nichols/archive/2011/10/25/help-wanted.aspx#comments</comments><description>&lt;p&gt;&lt;span&gt;We have need for a .net dev familiar with the stack belowto help us wrap up a fairly lite project. &amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;This is a CQRS project but ev&lt;/span&gt;en if you haven&amp;#39;t worked on a CQRS project but are somewhat familiar with its tenets you should pick it up quickly.&lt;/p&gt;
&lt;p&gt;Mostly the work&amp;nbsp;will be done simply formatting the reads on the web client and some basic UX stuff.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;
&lt;p&gt;Stack:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Castle Windsor&amp;nbsp;&lt;br /&gt;NHibernate/FluentNH&amp;nbsp;&lt;br /&gt;ASP.NET MVC&amp;nbsp;&lt;br /&gt;joliver EventStore (shouldn&amp;#39;t need to touch this though).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you have some hours open and are available immediately please&amp;nbsp;&lt;br /&gt;contact me directly to discuss.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks!&amp;nbsp;&lt;/p&gt;
&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=68329" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/MikeNichols/~4/aLLdGGtltkk" height="1" width="1"/&gt;</description><category domain="http://devlicio.us/blogs/mike_nichols/archive/tags/help+wanted/default.aspx">help wanted</category></item><item><title>Backbone Events and Aggregator Update</title><link>http://devlicio.us/blogs/mike_nichols/archive/2011/10/20/backbone-events-and-aggregator-update.aspx</link><pubDate>Thu, 20 Oct 2011 22:02:00 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:68308</guid><dc:creator>Michael Nichols</dc:creator><slash:comments>3</slash:comments><comments>http://devlicio.us/blogs/mike_nichols/archive/2011/10/20/backbone-events-and-aggregator-update.aspx#comments</comments><description>&lt;h1&gt;Dispatcher / EventAggregator update&lt;/h1&gt;
&lt;p&gt;&lt;a target="_blank" href="http://devlicio.us/blogs/mike_nichols/archive/2011/08/14/backbone-event-aggregator-extended.aspx"&gt;Earlier I posted an implementation of EventAggregator for Backbone.js. Please read that first.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Tracking down bugs in an EDA setup can be tough. This one had me going crazy. &lt;/p&gt;
&lt;p&gt;I had forgotten to take into consideration Backbone.js&amp;#39;s behavior regarding events being triggered inside a Model which is:&lt;/p&gt;
&lt;p&gt;If a model is a member of a collection, all events triggered in that model will also be triggered on the collection. &lt;/p&gt;
&lt;p&gt;This is handy - and dangerous. To keep this behavior and prevent my Event Aggregator implementation from double-firing the same event,
a small fix needed to be inserted. Note the check below for &lt;code&gt;isEligibleForDispatcher&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;BackboneExt {...

    dispatcher : _.extend({}, Backbone.Events, { cid : &amp;#39;dispatcher&amp;#39;}),
    wrappedEvents : function (localEvents) {
        var local = localEvents || _.extend({}, Backbone.Events);
        var isEligibleForDispatcher = function (source) {
            return !((source instanceof Backbone.Model) &amp;amp;&amp;amp; (source.collection instanceof Backbone.Collection));

        }
        //note that &amp;#39;this&amp;#39; is the Backbone implementation
        return {
            dispatcher : BackboneExt.dispatcher,
            trigger : function () {
                BackboneExt.trigger(&amp;#39;wrappedEvents:triggered&amp;#39;, this);

                // this._callbacks is an internal collection 
                // currently backbone could 
                if (this._callbacks) {
                    local.trigger.apply(this, arguments);
                }
                if (isEligibleForDispatcher(this)) {
                    //we must call dispatchers trigger with the dispatcher as &amp;#39;this&amp;#39;&amp;#39;
                    //otherwise, the wrong collection will be queried for _.callbacks                        
                    BackboneExt.dispatcher.trigger.apply(BackboneExt.dispatcher, arguments);
                    BackboneExt.trigger(&amp;#39;dispatcher:triggered&amp;#39;, this);
                }    
                return this;
            }

        };

    },
    extendBackbone : function () {
        var self = this;
        if (self.isExtended) {
            return;
        }
        _.each(backbonePrototypes, function (proto) {
            _.extend(proto,  self.wrappedEvents());
        });
    }
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;Backbone events : being careful&lt;/h1&gt;
&lt;p&gt;In general, I avoid triggering events from my &lt;code&gt;initialize&lt;/code&gt; methods on my models. I have found that when I do so, the event is not fired on the collection. So if there are other objects that &lt;code&gt;bind&lt;/code&gt; to my &lt;code&gt;dispatcher&lt;/code&gt; they will not receive these events if they are fired inside a &lt;code&gt;Model.initialize&lt;/code&gt; method.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=68308" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/MikeNichols/~4/dxRdaWKAHjQ" height="1" width="1"/&gt;</description></item><item><title>Backbone Event Aggregator extended</title><link>http://devlicio.us/blogs/mike_nichols/archive/2011/08/14/backbone-event-aggregator-extended.aspx</link><pubDate>Mon, 15 Aug 2011 03:21:00 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:68104</guid><dc:creator>Michael Nichols</dc:creator><slash:comments>2</slash:comments><comments>http://devlicio.us/blogs/mike_nichols/archive/2011/08/14/backbone-event-aggregator-extended.aspx#comments</comments><description>&lt;p&gt;&lt;b&gt;UPDATE : &lt;a target="_blank" href="http://devlicio.us/blogs/mike_nichols/archive/2011/10/20/backbone-events-and-aggregator-update.aspx"&gt;Please use the code found in my follow-up.&lt;/a&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://lostechies.com/derickbailey/2011/07/19/references-routing-and-the-event-aggregator-coordinating-views-in-backbone-js/"&gt;Derick Bailey wrote a great post&lt;/a&gt; decoupling Backbone Views from one another through the use of an Event Aggregator. 
I wanted to use this without passing in the dispatcher into all these Views, Models, etc. To accomplish this I came 
up with the following:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;//namespace our extensions

var BackboneExt = BackboneExt || function() {
    var backbonePrototypes = [
        Backbone.Collection.prototype, 
        Backbone.Model.prototype, 
        Backbone.View.prototype,
        Backbone.Router.prototype
    ];

    var extensions = {

        dispatcher : _.extend({}, Backbone.Events,{cid : &amp;#39;dispatcher&amp;#39;}),
        wrappedEvents : function(localEvents) {
            var local = localEvents || _.extend({},Backbone.Events);
            //note that &amp;#39;this&amp;#39; is the Backbone implementation
            return {            
                dispatcher : BackboneExt.dispatcher,            
                trigger : function() {                                      
                    var args = _.toArray(arguments);                
                    // this._callbacks is an internal collection 
                    // currently backbone could 
                    if( this._callbacks ) {                             
                        local.trigger.apply(this,args);
                    }               
                    BackboneExt.dispatcher.trigger.apply(BackboneExt.dispatcher,args);
                    return this;            
                }

            };

        },
        extendBackbone : function() {
            var self = this;
            if( self.isExtended ) {
                return;
            }
            _.each(backbonePrototypes,function(proto) {
                _.extend(proto, self.autoBinder, self.wrappedEvents());
            });
        }
    };
    return extensions;
}();

BackboneExt.extendBackbone();
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Note that &lt;code&gt;dispatcher&lt;/code&gt; is now exposed in any of the Backbone components. We just overwrite the default &lt;code&gt;Backbone.Events.trigger&lt;/code&gt;
with our own that composes the local &lt;code&gt;trigger&lt;/code&gt; with the global (dispatcher) &lt;code&gt;trigger&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;&lt;code&gt;trigger&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;This keeps my Backbone components blissfully ignorant of its subscriber(s):&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;// some simple jquery notification component
BackboneExt.dispatcher.bind(&amp;#39;mynamespaced:event&amp;#39;, function(args) {
    $(&amp;#39;#messages&amp;#39;).append(args.message);
});

// some Backbone.Model
var model = new SomeModel({
    // ...
    someMethod : function() {
        this.trigger(&amp;#39;mynamespaced:event&amp;#39;,{ message : &amp;#39;something happened&amp;#39; });
    }
});
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;&lt;code&gt;bind&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;This can work the other way, too, but the Backbone components need to explicitly bind to the exposed dispatcher:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;//inside Backbone.Model initializer
var model = new SomeModel( {
    initialize : function() {
        dispatcher.bind(&amp;#39;someglobalevent:happened&amp;#39;, this.someMethod);
    }
    someMethod : function() { ... }
});

BackboneExt.dispatcher.trigger(&amp;#39;someglobalevent:happened&amp;#39;, &amp;#39;something happened&amp;#39;); //calls &amp;#39;someMethod&amp;#39; in model
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=68104" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/MikeNichols/~4/gxMkBfGBUo8" height="1" width="1"/&gt;</description><category domain="http://devlicio.us/blogs/mike_nichols/archive/tags/Backbone/default.aspx">Backbone</category></item><item><title>Running vmdk (vmware) images on Virtual Box</title><link>http://devlicio.us/blogs/mike_nichols/archive/2011/07/25/running-vmdk-vmware-images-on-virtual-box.aspx</link><pubDate>Tue, 26 Jul 2011 05:58:00 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:68031</guid><dc:creator>Michael Nichols</dc:creator><slash:comments>4</slash:comments><comments>http://devlicio.us/blogs/mike_nichols/archive/2011/07/25/running-vmdk-vmware-images-on-virtual-box.aspx#comments</comments><description>&lt;p&gt;I had one final vmdk image I use for Windows dev that I wanted to use in VirtualBox instead of VMWare.&lt;/p&gt;
&lt;p&gt;VirtualBox makes this dead simple but a few things to look out for, since you might get a BSOD that is hard to figure out:&lt;/p&gt;
&lt;p&gt;1. Uninstall VMWare tools&lt;/p&gt;
&lt;p&gt;2. Mount your image as an IDE, not SATA (the default when using the VirtualBox wizard)&lt;/p&gt;
&lt;p&gt;3. Check your root .vmdk file and be sure your disk names don&amp;#39;t have extraneous &amp;#39;.&amp;#39; suffices. I discussed this &lt;a target="_blank" href="http://devlicio.us/blogs/mike_nichols/archive/2011/03/29/ubuntu-10-10-maverick-vmware-solution.aspx"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Once I did these I was able to get VirtualBox running my image just fine.&lt;/p&gt;
&lt;p&gt;Hope this helps&lt;/p&gt;
&lt;p&gt;mike&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=68031" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/MikeNichols/~4/9uPnPy6yaMY" height="1" width="1"/&gt;</description><category domain="http://devlicio.us/blogs/mike_nichols/archive/tags/VMWare/default.aspx">VMWare</category><category domain="http://devlicio.us/blogs/mike_nichols/archive/tags/VirtualBox/default.aspx">VirtualBox</category></item><item><title>heroku on linux</title><link>http://devlicio.us/blogs/mike_nichols/archive/2011/07/13/heroku-on-linux.aspx</link><pubDate>Wed, 13 Jul 2011 12:54:00 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:67990</guid><dc:creator>Michael Nichols</dc:creator><slash:comments>0</slash:comments><comments>http://devlicio.us/blogs/mike_nichols/archive/2011/07/13/heroku-on-linux.aspx#comments</comments><description>&lt;p&gt;I ran into a little snag setting up my heroku on my Ubuntu Linux 10 box when I ran &lt;/p&gt;
&lt;p&gt;&lt;code&gt;heroku create --stack cedar&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;What I got in return was &lt;/p&gt;
&lt;p&gt;&lt;code&gt;no such file to load -- readline (LoadError)&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;To resolve this I &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;apt-get install libncurses5-dev&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cd&lt;/code&gt; to ruby source; ie &lt;code&gt;~/.rvm/src/ruby-1.9.2-p136&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cd ext readline&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ruby extconf.rb&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;make&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;make install&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;voila!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=67990" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/MikeNichols/~4/MF885nE2Ync" height="1" width="1"/&gt;</description><category domain="http://devlicio.us/blogs/mike_nichols/archive/tags/heroku+ubuntu+ruby/default.aspx">heroku ubuntu ruby</category></item><item><title>Vim handy : pathogen</title><link>http://devlicio.us/blogs/mike_nichols/archive/2011/05/05/vim-handy-pathogen.aspx</link><pubDate>Thu, 05 May 2011 21:35:00 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:67222</guid><dc:creator>Michael Nichols</dc:creator><slash:comments>0</slash:comments><comments>http://devlicio.us/blogs/mike_nichols/archive/2011/05/05/vim-handy-pathogen.aspx#comments</comments><description>&lt;p&gt;I have been trying to be disciplined in using vim for any editor needs outside of my c# development. One thing I have been happy to find early on has been a good way to manage the various plugins I will no doubt use along the way.&lt;/p&gt;
&lt;p&gt; It&amp;#39;s called &amp;#39;pathogen&amp;#39; and I found a good way to get started with it &lt;a href="http://tammersaleh.com/posts/the-modern-vim-config-with-pathogen"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=67222" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/MikeNichols/~4/pvJaO_X7qnQ" height="1" width="1"/&gt;</description><category domain="http://devlicio.us/blogs/mike_nichols/archive/tags/vim/default.aspx">vim</category></item><item><title>Vote For An Up And Comer!</title><link>http://devlicio.us/blogs/mike_nichols/archive/2011/04/20/vote-for-an-up-and-comer.aspx</link><pubDate>Wed, 20 Apr 2011 23:12:00 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:66983</guid><dc:creator>Michael Nichols</dc:creator><slash:comments>0</slash:comments><comments>http://devlicio.us/blogs/mike_nichols/archive/2011/04/20/vote-for-an-up-and-comer.aspx#comments</comments><description>&lt;p&gt;A buddy of mine has a very talented son who has entered a German-speaking contest. The video he produced is amazing for such a young fella. If he wins he goes to Germany!&lt;/p&gt;
&lt;p&gt;If you have a few moments , why not go and support him? You&amp;#39;ll get a kick out of the video even if you don&amp;#39;t speak a word of German.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://cms.goethe.de/ins/us/saf/prj/sig/soc/cot/cli/en7477337.htm"&gt;http://cms.goethe.de/ins/us/saf/prj/sig/soc/cot/cli/en7477337.htm&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Enjoy!&lt;/p&gt;
&lt;p&gt;mike&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=66983" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/MikeNichols/~4/kLD6mMO9EtA" height="1" width="1"/&gt;</description><category domain="http://devlicio.us/blogs/mike_nichols/archive/tags/max+German/default.aspx">max German</category></item><item><title>ditto : with regard to AutoMapper</title><link>http://devlicio.us/blogs/mike_nichols/archive/2011/04/10/ditto-with-regard-to-automapper.aspx</link><pubDate>Sun, 10 Apr 2011 23:08:00 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:66862</guid><dc:creator>Michael Nichols</dc:creator><slash:comments>2</slash:comments><comments>http://devlicio.us/blogs/mike_nichols/archive/2011/04/10/ditto-with-regard-to-automapper.aspx#comments</comments><description>&lt;p&gt;A comparison of &lt;a href="http://github.com/mnichols/ditto"&gt;&lt;em&gt;ditto&lt;/em&gt;&lt;/a&gt; to &lt;a href="http://automapper.codeplex.com/"&gt;AutoMapper&lt;/a&gt; was suggested so I will try to be more specific for some problems &lt;em&gt;ditto&lt;/em&gt; has solved for me. Hopefully this help you decide if it is the right tool for your project.&lt;/p&gt;
&lt;h3&gt;hat tip&lt;/h3&gt;
&lt;p&gt;Before I &amp;#39;compare&amp;#39; AutoMapper, let me clearly state that I am not criticizing anyone&amp;#39;s work. I suspect AutoMapper has been a big helper to many projects and the community surrounding it seems pretty helpful. It just didn&amp;#39;t fit my needs. I tried to use AutoMapper correctly so if I state something in error here please let me know. &lt;/p&gt;
&lt;p&gt;I&amp;#39;d also like to highlight that &lt;em&gt;ditto&lt;/em&gt;&amp;#39;s best friend is &lt;a href="http://fasterflect.codeplex.com"&gt;Fasterflect&lt;/a&gt;. Alot of the reflection magic is handled by this excellent library. &lt;/p&gt;
&lt;h3&gt;&lt;em&gt;ditto&lt;/em&gt; doesn&amp;#39;t&lt;/h3&gt;
&lt;p&gt;First, let me point out a few limitations that &lt;em&gt;currently&lt;/em&gt; exist in &lt;em&gt;ditto&lt;/em&gt; when compared to AutoMapper. &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Dictionaries are not supported ( I believe they are in AutoMapper ). I don&amp;#39;t really need this, but it would just be an implementation of &lt;code&gt;IBinder&lt;/code&gt; registered on your container.&lt;/li&gt;
&lt;li style="text-decoration:line-through;"&gt;It is slower than AutoMapper. The benchmarking project I have in my project shows about a -2 sec difference in mapping 10,000 messages. To be honest I haven&amp;#39;t spent a ton of time optimizing &lt;em&gt;ditto&lt;/em&gt;. It&amp;#39;s fast enough for me right now though. &lt;/li&gt;
&lt;li&gt;UPDATE : I just pushed a small change that makes my benchmarks 1 second faster than AutoMapper now...My benchmarking tests are simple, so objections are welcome!&lt;/li&gt;
&lt;li&gt;Flattening / Unflattening assumptions. This could probably be easily extended into &lt;em&gt;ditto&lt;/em&gt; but I actually haven&amp;#39;t a need for it since the objects I am focused on are not behavioral.&lt;/li&gt;
&lt;li&gt;Conditional mapping . Actually, this &lt;em&gt;is&lt;/em&gt; supported but not in an explicit method call.&lt;/li&gt;
&lt;li&gt;I am sure there are others. Please comment and I will update this limitations list.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;&lt;em&gt;ditto&lt;/em&gt; gots-ta-have&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;The primary attraction of AutoMapper for me was the little call to &lt;code&gt;.AssertConfigurationIsValid();&lt;/code&gt;. I knew if I was going to create a similar tool it &lt;em&gt;had&lt;/em&gt; to provide this kind of validation. &lt;/li&gt;
&lt;li&gt;Provide a &lt;code&gt;fluenty&lt;/code&gt; interface but don&amp;#39;t tie my hands with generic parameters when a simple &lt;code&gt;Type&lt;/code&gt; will do. &lt;/li&gt;
&lt;li&gt;No requirement to specify the superfluous generic parameter for the source object when calling &lt;code&gt;.Map()&lt;/code&gt;. &lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;&lt;em&gt;ditto&lt;/em&gt; intent&lt;/h3&gt;
&lt;p&gt;My  focus for &lt;em&gt;ditto&lt;/em&gt; is lightweight objects; that is, Data Transfer Objects that are commonly used at application boundaries. That&amp;#39;s not to say things like nested objects or collections are not supported (they are).&lt;/p&gt;
&lt;h3&gt;&lt;em&gt;ditto&lt;/em&gt; does&lt;/h3&gt;
&lt;p&gt;Okay, with that out of the way let&amp;#39;s see what &lt;em&gt;ditto&lt;/em&gt; DOES do. The hassle in any tool that meets this problem will be found in the configuration bits. Like you&amp;#39;d expect, &lt;em&gt;ditto&lt;/em&gt; assumes property names are the same between objects so gives you some help with setting up the mappings based on property name. That&amp;#39;s the easy stuff. &lt;em&gt;ditto&lt;/em&gt; is greedy so just does this automatically. &lt;/p&gt;
&lt;p&gt;The real work comes from &lt;em&gt;exceptions to the rule&lt;/em&gt;. Rather than treating the &lt;em&gt;association&lt;/em&gt; between two objects as the subject for mapping, I decided to simply treat the &lt;em&gt;destination types&lt;/em&gt; as subject and provide a facility for binding together all mappings together to create a validatable, executable whole. This is what I mean on the project when I state  the initial goal of &lt;em&gt;ditto&lt;/em&gt; was to aggregate data from multiple sources. This gives me the coding/typing freedom from having to specify &lt;em&gt;every&lt;/em&gt; property for &lt;em&gt;every&lt;/em&gt; source, but also gives me the freakin&amp;#39; cool ability to confirm that all my destination object properties have &lt;em&gt;some&lt;/em&gt; mapping configured. &lt;/p&gt;
&lt;p&gt;Let&amp;#39;s illustrate a lightweight example for what I mean by that. I have a service that receives messages (events) that each contribute bits to a single view model. Each view model has a Denormalizer class that implements an IDenormalize:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;public class ProjectViewModelDenormalizer : Denormalize&amp;lt;ProjectViewModel&amp;gt;, 
    IDenormalize&amp;lt;ProjectCreatedEvent&amp;gt;,
    IDenormalize&amp;lt;ProjectSamplesAddedEvent&amp;gt;,
    IDenormalize&amp;lt;ProjectMixCodeDefinedEvent&amp;gt;

    /* implementations of these interfaces */
}

public class ProjectViewModel {
    public Guid ProjectId {get;set;}
    public string Name {get;set;}       
    public List&amp;lt;Guid&amp;gt; SampleIds {get;set;}      
    public string MixCode {get;set;}
    /* about 20 more properties, each coming from 10 different events */
}

public class ProjectCreatedEvent {
    public Guid Id {get;set;}
    public string Name {get;set;}
}

public class ProjectSamplesAddedEvent {
    public List&amp;lt;Guid&amp;gt; SampleIds {get;set;} 
}

public class ProjectMixCodeDefinedEvent {
    public string MixCode {get;set;}
}

/* 10 more events contributing to this view model*/
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In order to achieve this in the current drop of AutoMapper and get validation checking I would have to map each property on &lt;code&gt;Project&lt;/code&gt; with an &lt;code&gt;.Ignore()&lt;/code&gt; call to the properties that each event does not cover. This is due to the AutoMapper signature that requires a &lt;code&gt;&amp;lt;TSource,TDestination&amp;gt;&lt;/code&gt; mapping. In order to avoid validation assertion failures, I&amp;#39;d have to zip up this configuration into a custom converter just for the &lt;code&gt;ProjectViewModel&lt;/code&gt; but then I lose validation checking which was the strongest feature in AutoMapper for me. Now, this is still workable, but since I have hundreds of these ViewModels it just became too much &lt;code&gt;.Ignore()&lt;/code&gt; ing for me. Without a Custom Converter, mapping AutoMapper would look something like this for just these :&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;public class ProjectViewModelProfile : Profile
{
    protected override void Configure() {
        CreateMap&amp;lt;ProjectCreatedEvent,ProjectViewModel&amp;gt;()
            .ForMember(m =&amp;gt; m.SampleIds, opt =&amp;gt; opt.Ignore() )
            .ForMember(m =&amp;gt; m.ProjectId, opt =&amp;gt; opt.MapFrom(its =&amp;gt; its.Id) )
            .ForMember(m =&amp;gt; m.MixCode, opt =&amp;gt; opt.Ignore() );

        CreateMap&amp;lt;ProjectSamplesAddedEvent, ProjectViewModel&amp;gt;()
            .ForMember(m =&amp;gt; m.Name, opt =&amp;gt; opt.Ignore() )
            .ForMember(m =&amp;gt; m.ProjectId, opt =&amp;gt; opt.Ignore() )
            .ForMember(m =&amp;gt; m.MixCode, opt =&amp;gt; opt.Ignore() );

        CreateMap&amp;lt;ProjectMixCodeDefinedEvent, ProjectViewModel&amp;gt;()
            .ForMember(m =&amp;gt; m.ProjectId, opt =&amp;gt; opt.Ignore() )
            .ForMember(m =&amp;gt; m.Name, opt =&amp;gt; opt.Ignore() )
            .ForMember(m =&amp;gt; m.SampleIds, opt =&amp;gt; opt.Ignore() );

        /* 10 more blocks like these repeating .Ignore() */
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;View Models are always changing out so adding properties or tweaking them slightly suddenly becomes very cumbersome due to the repetition of their definitions for each event type.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;ditto&lt;/em&gt; takes a different approach and executes validation on its mappings after &lt;em&gt;everything&lt;/em&gt; has been configured and bound up.  It treats the &amp;#39;Destination&amp;#39; object as the one you are interested in and hollers if the sum of all your sources don&amp;#39;t affect one of its properties in some way. So the above model config would be written like this in &lt;em&gt;ditto&lt;/em&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;public class ProjectViewModelConfig : AbstractMappingConfiguration {
    public override void Configure() [
        //Cfg is injected by your container...see the docs
        Cfg.Map&amp;lt;ProjectViewModel&amp;gt;().From(typeof(ProjectCreatedEvent),typeof(ProjectSamplesAddedEvent),typeof(ProjectMixCodeDefinedEvent),/*more events?*/)
            .Redirecting&amp;lt;ProjectCreatedEvent&amp;gt;(from =&amp;gt; from.Id, to =&amp;gt; to.ProjectId );
    }       
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I typically simplify this with a wee extension method for discovering the source types. &lt;/p&gt;
&lt;h3&gt;Concepts&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;ditto&lt;/em&gt; basically applies three concepts to execute mapping:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;IPropertyCriterion : This is the selector for the destination property to match on a object; ie Naming Convention matching&lt;/li&gt;
&lt;li&gt;IResolveValue : This is the behavior of the resolution, given the source and destination (similar to what you see in AutoMapper). &lt;/li&gt;
&lt;li&gt;IConvertValue : This is the convention for certain types; ie, DateTime UTC standards&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Manually configured mappings take precedence of global conventions. So this means if you apply a convention to ignore all properties with names starting with  &amp;quot;System&amp;quot;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Conventions.AddResolver(new PrefixPropertyCriterion(&amp;quot;System&amp;quot;),new IgnoreResolver());
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;But you find later you have a model you &lt;em&gt;do&lt;/em&gt; want to participate in mapping execution. You can do this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Cfg.Map&amp;lt;MyViewModel&amp;gt;().From&amp;lt;MyEventWithSystemDetails&amp;gt;().Redirecting&amp;lt;MyEventWithSystemDetails&amp;gt;( from =&amp;gt; from.SystemOS, to =&amp;gt; to.OperatingSystem );
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This will use your special mapping in this one instance.    &lt;/p&gt;
&lt;p&gt;More info on setting up global conventions is at the project site README.&lt;/p&gt;
&lt;h3&gt;Container&lt;/h3&gt;
&lt;p&gt;Since &lt;em&gt;ditto&lt;/em&gt; relies heavily on IoC container to do its thing, it is dead simple to provide your own resolver implementations,organize your mapping files, or override its behavior it a pretty granular level. This means it&amp;#39;d be easy to provide custom ways for creating destination objects, etc.&lt;/p&gt;
&lt;h3&gt;Execution API&lt;/h3&gt;
&lt;p&gt;There isn&amp;#39;t a need to specify the source object in generic parameters to map your object. Just tell &lt;em&gt;ditto&lt;/em&gt; what destination type to map to and your done. Specifying the source type when I am already passing in the source object was more a pet peeve and made my code noisier than I prefer. Probably this could be relieved with a utility extension method AutoMapper though.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;var viewModel = ditto.Map&amp;lt;MyViewModel&amp;gt;(message);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This is getting pretty long now. I hope this sheds some light on &lt;em&gt;ditto&lt;/em&gt;&amp;#39;s purpose for being. If you have more questions either on the API or whether it&amp;#39;d be a good fit for you feel free to comment below or email me.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=66862" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/MikeNichols/~4/1FKnml32Fko" height="1" width="1"/&gt;</description><category domain="http://devlicio.us/blogs/mike_nichols/archive/tags/ditto/default.aspx">ditto</category><category domain="http://devlicio.us/blogs/mike_nichols/archive/tags/mapper/default.aspx">mapper</category><category domain="http://devlicio.us/blogs/mike_nichols/archive/tags/AutoMapper/default.aspx">AutoMapper</category></item><item><title>Enter ditto</title><link>http://devlicio.us/blogs/mike_nichols/archive/2011/04/07/enter-ditto.aspx</link><pubDate>Thu, 07 Apr 2011 22:01:00 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:66838</guid><dc:creator>Michael Nichols</dc:creator><slash:comments>4</slash:comments><comments>http://devlicio.us/blogs/mike_nichols/archive/2011/04/07/enter-ditto.aspx#comments</comments><description>&lt;p&gt;I just spun off a little framework that performs Object-Object mapping. I was reluctant to throw another tool like this out there since others already exist, but I had difficulty bending existing solutions to my will without reflection tricks or lots of typing.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The main motivation for this mapping implementation was the pattern found in CQRS solutions where a single denormalizer is responsible for updating a view model from multiple events.
Also, I wanted to leverage my IoC container for conventions while mapping my Form model in MVC controller code. 
&lt;/p&gt;
&lt;p&gt;If you have any comments or suggestions, I&amp;#39;d love to hear them! &lt;/p&gt;
&lt;p&gt;The project is hosted on github at &lt;a href="http://github.com/mnichols/ditto" title="http://github.com/mnichols/ditto"&gt;http://github.com/mnichols/ditto&lt;/a&gt;. Here are the docs from the project site.&lt;/p&gt;
&lt;h2&gt;ditto {&amp;#39;&amp;#39;} - a small framework for mapping objects to objects in .NET.&lt;/h2&gt;
&lt;h3&gt;Why?&lt;/h3&gt;
&lt;p&gt;There are good mapping tools out there already, but &lt;em&gt;ditto&lt;/em&gt; was conceived to address a specific need for aggregating multiple source objects into a single instance. This is common for event handlers which all contribute their data to a single view model (ie, an event Denormalizer). From this simple model, it became real easy to extend its usage in other scenarios like mapping from a Form model in a web app to Commands in MVC controller code. Also, because it wires everything up using a IoC container, it is dead simple write resolvers, converters, or replace its behavior just by registering your implementations on your container.&lt;/p&gt;
&lt;h3&gt;Goals (in no particular order):&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Convention-based assumptions to minimize configuration as much as possible&lt;/li&gt;
&lt;li&gt;Aggregation of source objects into single destination&lt;/li&gt;
&lt;li&gt;Deep validation checking&lt;/li&gt;
&lt;li&gt;Garrulous&lt;/li&gt;
&lt;li&gt;Fluent configuration without typedsturbating generic parameters&lt;/li&gt;
&lt;li&gt;Fast &lt;em&gt;enough&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;IoC, container-based&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Limitations&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Only properties are evaluated by convention right now&lt;/li&gt;
&lt;li&gt;Flattening/Unflattening isn&amp;#39;t a concern for me, but it&amp;#39;d be easy to create components to do this without changing Ditto&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Assumptions&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;ditto&lt;/em&gt; assumes the objects you are mapping have the same property names. This simple configuration assumes the two objects have the same names:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cfg.Map&amp;lt;MyViewModel&amp;gt;().From&amp;lt;MyEvent&amp;gt;();
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Containers&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;ditto&lt;/em&gt; leans heavily on an IoC container to do its work. This lets us easily register resolvers and other bits for easy configuration. Castle Windsor integration is the only container integration provided right now, but &lt;em&gt;ditto&lt;/em&gt; doesn&amp;#39;t really care how services are getting resolved. If you decide to use the Castle Windsor integration you can just add the provided Facility (&lt;code&gt;DittoFacility&lt;/code&gt;). Here&amp;#39;s the code installing all mapping services for my view model denormalization daemon:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;container.AddFacility(&amp;quot;mapping.facility&amp;quot;, new DittoFacility());
container.RegisterAllConfigurationsIn(new[] { GetType().Assembly });
container.RegisterAllGlobalConventionsIn(new[]{GetType().Assembly});
container.Register(AllTypes.FromThisAssembly()
                       .BasedOn&amp;lt;IResolveValue&amp;gt;()
                       .WithService.AllInterfaces()
                       .Configure(c =&amp;gt; c.LifeStyle.Transient));
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Logging&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;ditto&lt;/em&gt; likes to talk alot for Debug builds, so be sure you use a Release build (the default if you use the provided psake script). log4net is the only logging implementation provider right now (baked into Castle Windsor Integration), but it&amp;#39;d be easy to swap that out since &lt;em&gt;ditto&lt;/em&gt; doesn&amp;#39;t care who is listening.&lt;/p&gt;
&lt;h3&gt;Configuration&lt;/h3&gt;
&lt;p&gt;To let &lt;em&gt;ditto&lt;/em&gt; know what objects you need to map and their respective sources for data, you need to get the singleton implementation of IContainerDestinationConfiguration. The &lt;code&gt;AbstractMappingConfiguration&lt;/code&gt; base class can be inherited from to save a few keystrokes. This assumes you can let your hair down about required services being provided without constructor injection.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;public class MyViewModelConfiguration : AbstractMappingConfiguration 
{
    public override void Configure()
    {
        //&amp;#39;Cfg&amp;#39; is injected by your container
        Cfg.Map&amp;lt;MyViewModel&amp;gt;().From&amp;lt;MyEvent&amp;gt;();
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Conventions&lt;/h3&gt;
&lt;p&gt;Conventions may be applied globally. Conventions may impact your destination objects in one of two ways:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The resolution of a value based on the context or metadata of associated objects&lt;/li&gt;
&lt;li&gt;The conversion of a value for across-the-board metamorphosis; ie, conversion of all DateTime&amp;#39;s into UTC&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Global conventions are applied to every mapping &lt;em&gt;ditto&lt;/em&gt; knows about.
To configure Global conventions, you need to add them to IContainGlobalConventions. For this, you may inherit from &lt;code&gt;AbstractGlobalConventionConfiguration&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;public class WebAppGlobalMappingConventions : AbstractGlobalConventionConfiguration
{
    private readonly MyCustomResolver myCustomResolver;

    public WebAppGlobalMappingConventions(MyCustomResolver myCustomResolver)
    {
        this.myCustomResolver = myCustomResolver;
    }

    public override void Configure()
    {
        Conventions.AddConverter(new EntityIdentifierConverter()); 
        Conventions.AddConverter(new DateTimeUtcConverter());
        Conventions.AddResolver(new PropertyNameCriterion(&amp;quot;ConversationId&amp;quot;),new IgnoreResolver());
        Conventions.AddResolver(new PropertyNameCriterion(&amp;quot;Id&amp;quot;),myCustomResolver);
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Validation&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;ditto&lt;/em&gt; is uptight, so if there are properties on &lt;em&gt;destination&lt;/em&gt; objects that are not mapped after everything is bound together, it can let you know. This is done by default if you are using the provided &lt;code&gt;WindsorMappingInitializer&lt;/code&gt;. This will throw an exception if there are any properties for which &lt;em&gt;ditto&lt;/em&gt; has not been configured, either via global conventions or local mappings. &lt;/p&gt;
&lt;h3&gt;Intialization&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;ditto&lt;/em&gt; can be initialized in your bootstrapping code by simply getting your instance of &lt;code&gt;IInitializeDitto&lt;/code&gt; and calling its Initialize method. Again, there is a &lt;code&gt;WindsorMappingInitializer&lt;/code&gt; that demonstrates the things that &lt;em&gt;ditto&lt;/em&gt; needs to do for starting up. These are done, in order:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Configure all global conventions&lt;/li&gt;
&lt;li&gt;Configure all destination objects from their sources&lt;/li&gt;
&lt;li&gt;Bind all these configurations together&lt;/li&gt;
&lt;li&gt;Cache configuration metadata (optional, but madness to do without)&lt;/li&gt;
&lt;li&gt;Validate/Assert all configuration&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;Mapping&lt;/h3&gt;
&lt;p&gt;Once you have initialized &lt;em&gt;ditto&lt;/em&gt; you may now just grab your instance of &lt;code&gt;IMap&lt;/code&gt; and call it by either having &lt;em&gt;ditto&lt;/em&gt; create the destination object for you, or passing in your own instance:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;var myViewModel = mapper.Map&amp;lt;MyViewModel&amp;gt;(mySourceEvent); // =&amp;gt; this creates an instance of MyViewModel and maps from your instance of the source
mapper.Map(mySourceEvent,myViewModel); // =&amp;gt; this simply maps from the source to your own instance of MyViewModel
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Please note that &lt;em&gt;ditto&lt;/em&gt; currently assumes a default constructor for its own activation of objects. This would be dead simple to improve upon though since it is container-driven. Just replace &lt;code&gt;IActivator&lt;/code&gt; and provide your own strategy(s).&lt;/p&gt;
&lt;h3&gt;Acknowledgements&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://fasterflect.codeplex.com/"&gt;Fasterflect&lt;/a&gt; - &lt;em&gt;ditto&lt;/em&gt; developer is lazy so relies on  for reflection optimization stuff. It&amp;#39;s a great little tool for the toolbox.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/castleproject/Castle.Windsor"&gt;Castle Windsor&lt;/a&gt; - Makes it easy to keep concerns split up. &lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=66838" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/MikeNichols/~4/hmHmNwKhvGc" height="1" width="1"/&gt;</description><category domain="http://devlicio.us/blogs/mike_nichols/archive/tags/ditto/default.aspx">ditto</category><category domain="http://devlicio.us/blogs/mike_nichols/archive/tags/mapper/default.aspx">mapper</category></item><item><title>Ubuntu 10.10 (Maverick) VMWare Solution</title><link>http://devlicio.us/blogs/mike_nichols/archive/2011/03/29/ubuntu-10-10-maverick-vmware-solution.aspx</link><pubDate>Tue, 29 Mar 2011 20:48:00 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:66747</guid><dc:creator>Michael Nichols</dc:creator><slash:comments>0</slash:comments><comments>http://devlicio.us/blogs/mike_nichols/archive/2011/03/29/ubuntu-10-10-maverick-vmware-solution.aspx#comments</comments><description>&lt;p&gt;&lt;span style="font-size:11pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;" id="internal-source-marker_0.9580165850784015"&gt;I
 recently committed to using Ubuntu for everything, so I thought I could
 just run my current development vm&amp;#39;s (vmdk files) from my external hard
 drive as if nothing had really changed.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:11pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;"&gt;Problem:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:11pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;"&gt;I kept getting a &amp;#39;File not found&amp;#39; error when I would try to run my virtual machine.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:11pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;"&gt;At
 first, I assumed I had some kind of write permissions missing, or 
perhaps some NTFS compatibility problem. Since I am pretty new to Linux I
 first made sure my external HDD was mounted correctly. When I confirmed
 that, I peeked in the &lt;/span&gt;&lt;span style="font-size:11pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:normal;font-style:italic;text-decoration:none;vertical-align:baseline;"&gt;.vmdk&lt;/span&gt;&lt;span style="font-size:11pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;"&gt; file that is referenced by the .vmx file used to configure the machine.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:11pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:11pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;"&gt;Here&amp;rsquo;s what I saw...this is a 40gb hard drive split into 2gb files:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:11pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:8pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;"&gt;# Extent description&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:8pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;"&gt;RW 4193792 FLAT &amp;quot;win2k8Dev1.vmdk-f001.&amp;quot; 0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:8pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;"&gt;RW 4193792 FLAT &amp;quot;win2k8Dev1.vmdk-f002.&amp;quot; 0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:8pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;"&gt;RW 4193792 FLAT &amp;quot;win2k8Dev1.vmdk-f003.&amp;quot; 0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:8pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;"&gt;RW 4193792 FLAT &amp;quot;win2k8Dev1.vmdk-f004.&amp;quot; 0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:8pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;"&gt;RW 4193792 FLAT &amp;quot;win2k8Dev1.vmdk-f005.&amp;quot; 0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:8pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;"&gt;RW 4193792 FLAT &amp;quot;win2k8Dev1.vmdk-f006.&amp;quot; 0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:8pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;"&gt;RW 4193792 FLAT &amp;quot;win2k8Dev1.vmdk-f007.&amp;quot; 0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:8pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;"&gt;RW 4193792 FLAT &amp;quot;win2k8Dev1.vmdk-f008.&amp;quot; 0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:8pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;"&gt;RW 4193792 FLAT &amp;quot;win2k8Dev1.vmdk-f009.&amp;quot; 0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:8pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;"&gt;RW 4193792 FLAT &amp;quot;win2k8Dev1.vmdk-f010.&amp;quot; 0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:8pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;"&gt;RW 4193792 FLAT &amp;quot;win2k8Dev1.vmdk-f011.&amp;quot; 0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:8pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;"&gt;RW 4193792 FLAT &amp;quot;win2k8Dev1.vmdk-f012.&amp;quot; 0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:8pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;"&gt;RW 4193792 FLAT &amp;quot;win2k8Dev1.vmdk-f013.&amp;quot; 0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:8pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;"&gt;RW 4193792 FLAT &amp;quot;win2k8Dev1.vmdk-f014.&amp;quot; 0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:8pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;"&gt;RW 4193792 FLAT &amp;quot;win2k8Dev1.vmdk-f015.&amp;quot; 0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:8pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;"&gt;RW 4193792 FLAT &amp;quot;win2k8Dev1.vmdk-f016.&amp;quot; 0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:8pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;"&gt;RW 4193792 FLAT &amp;quot;win2k8Dev1.vmdk-f017.&amp;quot; 0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:8pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;"&gt;RW 4193792 FLAT &amp;quot;win2k8Dev1.vmdk-f018.&amp;quot; 0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:8pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;"&gt;RW 4193792 FLAT &amp;quot;win2k8Dev1.vmdk-f019.&amp;quot; 0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:8pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;"&gt;RW 4193792 FLAT &amp;quot;win2k8Dev1.vmdk-f020.&amp;quot; 0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:8pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;"&gt;RW 10240 FLAT &amp;quot;win2k8Dev1.vmdk-f021.&amp;quot; 0&lt;/span&gt;&lt;span style="font-size:11pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:11pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:11pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;"&gt;Do
 you see the &amp;ldquo;.&amp;rdquo; at the end of the file name? The file names are not 
suffixed with a period as the file names in the listing would seem to 
indicate. After removing the character from the file names I was able to
 run my machine again.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:11pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:11pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;"&gt;I
 am not quite sure what the intent is here for this naming 
convention...I presume this is some kind delimiter in VMWare&amp;rsquo;s app. I 
have gone back and forth between Linux and Windows hosts since removing 
the offending character and it seems to work swimmingly.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:11pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:11pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;"&gt;I hope this helps someone.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=66747" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/MikeNichols/~4/KYrEwuCbyOY" height="1" width="1"/&gt;</description><category domain="http://devlicio.us/blogs/mike_nichols/archive/tags/VMWare/default.aspx">VMWare</category><category domain="http://devlicio.us/blogs/mike_nichols/archive/tags/Linux/default.aspx">Linux</category><category domain="http://devlicio.us/blogs/mike_nichols/archive/tags/Ubuntu/default.aspx">Ubuntu</category></item><item><title>Notes From A Project Applying Domain-Driven Design, Event Sourcing and CQRS : Part 3 – Messaging In Web Applications</title><link>http://devlicio.us/blogs/mike_nichols/archive/2010/06/24/notes-from-a-project-applying-domain-driven-design-event-sourcing-and-cqrs-part-3-messaging-in-web-applications.aspx</link><pubDate>Thu, 24 Jun 2010 23:00:08 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:60728</guid><dc:creator>Michael Nichols</dc:creator><slash:comments>8</slash:comments><comments>http://devlicio.us/blogs/mike_nichols/archive/2010/06/24/notes-from-a-project-applying-domain-driven-design-event-sourcing-and-cqrs-part-3-messaging-in-web-applications.aspx#comments</comments><description>&lt;p&gt;Today I am not strictly mouthing off strictly about the three things in the title, but more about the side-effects of their joy in a web application.&lt;/p&gt;  &lt;p&gt;Two things have made me feel dirty while implementing a messaging solution in a web application while adhering strictly to Command-Query Separation. &lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Why do I have a single controller SENDING messages (commands), and READING (reporting) data? &lt;/li&gt;    &lt;li&gt;What patterns exist beyond just a correlation id for notifying the user when their commands’ processing are completed? &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;The first one is the one on my mind today as I am testing the bits that send the messages to my Win service hosting my domain. The second one I will deal with in the next post.&lt;/p&gt;  &lt;p&gt;My controllers look pretty typical:&lt;/p&gt;  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:d7e983ca-15a7-40e4-a04c-4494ff631f49" class="wlWriterEditableSmartContent"&gt;&lt;pre style="background-color:White;overflow:auto;"&gt;&lt;span style="color:#0000FF;"&gt;public&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;class&lt;/span&gt;&lt;span style="color:#000000;"&gt; ProjectController : Controller
{
    IExecuteCommands bus;
    &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;public&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;void&lt;/span&gt;&lt;span style="color:#000000;"&gt; ProjectController(IExecuteCommands bus)
    {
        &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;this&lt;/span&gt;&lt;span style="color:#000000;"&gt;.bus&lt;/span&gt;&lt;span style="color:#000000;"&gt;=&lt;/span&gt;&lt;span style="color:#000000;"&gt;bus;
    }
    &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;public&lt;/span&gt;&lt;span style="color:#000000;"&gt; ActionResult New()
    {
        &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;return&lt;/span&gt;&lt;span style="color:#000000;"&gt; View(&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;new&lt;/span&gt;&lt;span style="color:#000000;"&gt; NewProjectViewModel() };
    }
    &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;public&lt;/span&gt;&lt;span style="color:#000000;"&gt; ActionResult Create(CreateProjectCommand project)
    {
        bus.Send(project);
        &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;return&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;this&lt;/span&gt;&lt;span style="color:#000000;"&gt;.RedirectToAction&lt;/span&gt;&lt;span style="color:#000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;MessagingController&lt;/span&gt;&lt;span style="color:#000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;(c&lt;/span&gt;&lt;span style="color:#000000;"&gt;=&amp;gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;c.Wait(&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;this&lt;/span&gt;&lt;span style="color:#000000;"&gt;.ConversationId));
    }
}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;My controllers are either reading or writing…why do I have the same controller doing both? The semi-optional service dependencies are a smell that I am putting too many responsibilities here. I already adhere to POST-REDIRECT-GET convention, so it seems unnecessary.&lt;/p&gt;

&lt;p&gt;Why not split this into :&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;ProjectController = Only GET requests &lt;/li&gt;

  &lt;li&gt;ProjectCommandController = Only POST requests &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Since the majority of actions are reads and we want take of advantage of conventions in frameworks like MVC for urls, we can just pull our state-changing actions into a separate controller and append the name with ‘Command’.&lt;/p&gt;

&lt;p&gt;Commands abiding by some kind of naming convention, perhaps ‘Execute’ prefix, would simply be routed to the [ControllerName] + ‘Command’ Controller. &lt;/p&gt;

&lt;p&gt;This would make testing simpler since I don’t have to satisfy unneeded dependencies for action testing. &lt;/p&gt;

&lt;p&gt;What pitfalls do you see in making this a standard practice? Have you tried this and found problems? I’d like to hear any criticisms and comments you might have.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=60728" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/MikeNichols/~4/M_WaRKBetMo" height="1" width="1"/&gt;</description><category domain="http://devlicio.us/blogs/mike_nichols/archive/tags/CQRS/default.aspx">CQRS</category><category domain="http://devlicio.us/blogs/mike_nichols/archive/tags/Messaging/default.aspx">Messaging</category></item><item><title>ASP.NET Path With Virtual Directory</title><link>http://devlicio.us/blogs/mike_nichols/archive/2010/06/18/asp-net-path-with-virtual-directory.aspx</link><pubDate>Fri, 18 Jun 2010 15:36:11 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:60637</guid><dc:creator>Michael Nichols</dc:creator><slash:comments>0</slash:comments><comments>http://devlicio.us/blogs/mike_nichols/archive/2010/06/18/asp-net-path-with-virtual-directory.aspx#comments</comments><description>&lt;p&gt;I needed to include a url in a confirmation email from my asp.net app. I am not sure whether it will be deployed to a virtual directory or its own site. Just getting the Authority from the Request will yield no virtual directory, so here’s what i came up with:&lt;/p&gt;  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:797a985d-6eb9-4fb8-9ac6-612bcb2e7572" class="wlWriterEditableSmartContent"&gt;&lt;pre style="background-color:White;overflow:auto;"&gt;&lt;span style="color:#0000FF;"&gt;const&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;string&lt;/span&gt;&lt;span style="color:#000000;"&gt; action &lt;/span&gt;&lt;span style="color:#000000;"&gt;=&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:#800000;"&gt;Login/Confirm&lt;/span&gt;&lt;span style="color:#800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:#000000;"&gt;;
var uri &lt;/span&gt;&lt;span style="color:#000000;"&gt;=&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#0000FF;"&gt;new&lt;/span&gt;&lt;span style="color:#000000;"&gt; UriBuilder(HttpContext.Current.Request.Url);
uri.Path &lt;/span&gt;&lt;span style="color:#000000;"&gt;=&lt;/span&gt;&lt;span style="color:#000000;"&gt; VirtualPathUtility.ToAbsolute(&lt;/span&gt;&lt;span style="color:#800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:#800000;"&gt;~/&lt;/span&gt;&lt;span style="color:#800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:#000000;"&gt;+&lt;/span&gt;&lt;span style="color:#000000;"&gt;action);
uri.Port &lt;/span&gt;&lt;span style="color:#000000;"&gt;=&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#000000;"&gt;-&lt;/span&gt;&lt;span style="color:#800080;"&gt;1&lt;/span&gt;&lt;span style="color:#000000;"&gt;;&lt;/span&gt;&lt;span style="color:#008000;"&gt;//&lt;/span&gt;&lt;span style="color:#008000;"&gt;remove :80 (use default)&lt;/span&gt;&lt;span style="color:#008000;"&gt;
&lt;/span&gt;&lt;span style="color:#000000;"&gt;
var url &lt;/span&gt;&lt;span style="color:#000000;"&gt;=&lt;/span&gt;&lt;span style="color:#000000;"&gt; uri.ToString() &lt;/span&gt;&lt;span style="color:#008000;"&gt;//&lt;/span&gt;&lt;span style="color:#008000;text-decoration:underline;"&gt;http://localhost/myapp/login/confirm&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;There is probably a better way of doing this, but it works.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=60637" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/MikeNichols/~4/QAJV5dlJ7po" height="1" width="1"/&gt;</description><category domain="http://devlicio.us/blogs/mike_nichols/archive/tags/ASP.NET/default.aspx">ASP.NET</category></item><item><title>Using Team City With Git</title><link>http://devlicio.us/blogs/mike_nichols/archive/2010/06/12/using-team-city-with-git.aspx</link><pubDate>Sat, 12 Jun 2010 07:07:00 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:60258</guid><dc:creator>Michael Nichols</dc:creator><slash:comments>0</slash:comments><comments>http://devlicio.us/blogs/mike_nichols/archive/2010/06/12/using-team-city-with-git.aspx#comments</comments><description>&lt;p&gt;I love TeamCity, but I had some difficulty with setting up Team City with Git as my vcs so thought I&amp;rsquo;d log my configuration here. Documentation on the plugin is a bit sketchy and the exceptions raised when testing connections can be horrible, but the native Git plugin in Team City (v5.1+) is still under development so some features are still not completed so I expect things to be a bit rough around the edges.&lt;/p&gt;
&lt;h4&gt;Mode&lt;/h4&gt;
&lt;p&gt;I just wanted to my sources to be updated incrementally, being triggered by changes at the host. This requires having the build done on the agent (not the server):&lt;/p&gt;
&lt;p&gt;&lt;a title="teamcitygit1" href="http://www.flickr.com/photos/28939848@N08/4692100781/"&gt;&lt;img alt="teamcitygit1" src="http://farm5.static.flickr.com/4052/4692100781_4597a626b5.jpg" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Note this requires having &lt;b&gt;git&lt;/b&gt; installed on the build agent server. Team City is smart enough to find &lt;b&gt;git&lt;/b&gt; if you follow default installation of it, but I include &lt;b&gt;git&lt;/b&gt; in the PATH for consumption in the build script anyways.&lt;/p&gt;
&lt;h4&gt;Settings&lt;/h4&gt;
&lt;p&gt;Now I need to configure &lt;i&gt;what &lt;/i&gt;is getting fetched by Team City and setup &lt;b&gt;ssh&lt;/b&gt; to talk to &lt;a href="http://github.com"&gt;github&lt;/a&gt; (we host on a private repository there). All development happens on &lt;i&gt;develop&lt;/i&gt; branch so I instruct TeamCity to checkout that branch after fetching the data.&lt;/p&gt;
&lt;p&gt;Also I need to tell TeamCity about authentication:&lt;/p&gt;
&lt;p&gt;&lt;a title="teamcitygit2" href="http://www.flickr.com/photos/28939848@N08/4692759414/"&gt;&lt;img alt="teamcitygit2" src="http://farm5.static.flickr.com/4054/4692759414_4dc93edc4d.jpg" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;Authentication&lt;/h4&gt;
&lt;p&gt;I believe TeamCity still only supports the &amp;lsquo;Default Private Key&amp;rsquo; option. I had seen somewhere someone using a Private Key but I wonder if they were using the older git plugin hosted at github. &lt;/p&gt;
&lt;p&gt;Anyways, the part that took me a while to understand was this note under &amp;lsquo;Authentication Method&amp;rsquo; selection:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Valid only for SSH protocol and applicable to both fetch and push urls. &lt;/p&gt;
&lt;p&gt;Uses mapping specified in the file C:\Documents and Settings\TeamCity\.ssh\config if that that file exists.&amp;nbsp; &lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I run TeamCity under a user account called &amp;lsquo;TeamCity&amp;rsquo;, so this is just instructing me where the build agent will go looking when it is doing its work. It is important to note that passphrases aren&amp;rsquo;t supported yet. The &amp;lsquo;config&amp;rsquo; file threw me because I don&amp;rsquo;t know anything about ssh. I thought that was what my key file should be named (eg. &amp;lsquo;id_rsa&amp;rsquo;) . The &amp;lsquo;Known Hosts Database&amp;rsquo; checkbox is checked because I don&amp;rsquo;t want it checked&amp;hellip;confusing? I thought so too&amp;hellip;please don&amp;rsquo;t ever code an interface with a checkbox that has the label &amp;lsquo;do not check&amp;rsquo; next to it. I thought this was telling me not to check the box&amp;hellip;silly me! If you &lt;i&gt;do &lt;/i&gt;check the box Team City will in fact create the &amp;lsquo;known_hosts&amp;rsquo; database in the folder for you. &lt;/p&gt;
&lt;p&gt;The &amp;lsquo;config&amp;rsquo; file it is talking about can be simply:&lt;/p&gt;
&lt;pre&gt;Host github.com&lt;/pre&gt;
&lt;h4&gt;Fetching&lt;/h4&gt;
&lt;p&gt;Team City explicitly fetches no tags (&amp;lsquo;git fetch &amp;ndash;-no-tags&amp;rsquo;). I use tagging to marking my versions so when my tags weren&amp;rsquo;t being found in my script I wasn&amp;rsquo;t sure what was going on since I &lt;i&gt;knew &lt;/i&gt;the tags were on the remote repository. I thought for sure my n00b git skills were causing me pain. Jet brains confirmed that they are not fetching tags. This leaves two options:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Manually call &amp;lsquo;git fetch &amp;ndash;-tags&amp;rsquo; on the agent; what if I want to clean the directory and have it rebuilt? That seems error prone &lt;/li&gt;
&lt;li&gt;Call git within my build script &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I went for option 2 and that put me back in business with versioning my assemblies. I actually came across an ssh error so ended up adding this to my &lt;b&gt;config&lt;/b&gt; file mentioned earlier:&lt;/p&gt;
&lt;pre&gt;Host github.com&lt;br /&gt;StrictHostKeyChecking no&lt;/pre&gt;
&lt;p&gt;This seemed to resolve this error, but I am sure someone could tell me this is a bad idea. Works for now.&lt;/p&gt;
&lt;p&gt;As an aside, you can see the command being fired by Team City by following instructions &lt;a href="http://confluence.jetbrains.net/display/TCD4/Reporting+Issues#ReportingIssues-VersionControlDebugLogging"&gt;here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I Hope this helps!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=60258" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/MikeNichols/~4/RWKgTgqpPWE" height="1" width="1"/&gt;</description><category domain="http://devlicio.us/blogs/mike_nichols/archive/tags/Github/default.aspx">Github</category><category domain="http://devlicio.us/blogs/mike_nichols/archive/tags/Git/default.aspx">Git</category><category domain="http://devlicio.us/blogs/mike_nichols/archive/tags/TeamCity/default.aspx">TeamCity</category></item><item><title>Removing Git Tag On Remote Repository</title><link>http://devlicio.us/blogs/mike_nichols/archive/2010/05/27/removing-git-tag-on-remote-repository.aspx</link><pubDate>Thu, 27 May 2010 22:29:26 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:59318</guid><dc:creator>Michael Nichols</dc:creator><slash:comments>0</slash:comments><comments>http://devlicio.us/blogs/mike_nichols/archive/2010/05/27/removing-git-tag-on-remote-repository.aspx#comments</comments><description>&lt;p&gt;I needed to remove a tag from a remote repository @ github.&lt;/p&gt;  &lt;p&gt;Here’s the command locally:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;git tag –d &amp;lt;mytag&amp;gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Then this:&lt;/p&gt;  &lt;pre&gt;&lt;strong&gt;git push origin :refs/tags/&amp;lt;mytag&amp;gt;&lt;/strong&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=59318" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/MikeNichols/~4/I9VauxRj9Ik" height="1" width="1"/&gt;</description><category domain="http://devlicio.us/blogs/mike_nichols/archive/tags/Github/default.aspx">Github</category><category domain="http://devlicio.us/blogs/mike_nichols/archive/tags/Git/default.aspx">Git</category></item><item><title>Responsibility And Disaster</title><link>http://devlicio.us/blogs/mike_nichols/archive/2010/05/11/responsibility-and-disaster.aspx</link><pubDate>Wed, 12 May 2010 03:50:00 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:58796</guid><dc:creator>Michael Nichols</dc:creator><slash:comments>1</slash:comments><comments>http://devlicio.us/blogs/mike_nichols/archive/2010/05/11/responsibility-and-disaster.aspx#comments</comments><description>&lt;img style="border-bottom:0px;border-left:0px;margin:0px 0px 0px 10px;display:inline;border-top:0px;border-right:0px;" border="0" alt="Imagefrog Image Hosting" align="right" src="http://www.imagefrog.net/out.php/i84157_chickenlittle.jpg" /&gt;   &lt;p&gt;There is an interesting discussion going on over at a site that is discussing a web host provider that attempted a migration and made and epic fail. Consequently, there are reportedly multiple developers who have lost lots of money and professional credibility.&lt;/p&gt;  &lt;p&gt;I went through this “migration” which would have been better performed by geese, but didn’t lose any money. I also work for a firm producing in-house apps and do a little side work.&lt;/p&gt;  &lt;p&gt;It seems odd to me to place the entire weight of something like reputation or (reasonable) availability for apparently mission-critical apps on a web hosting provider, particularly if we are talking about shared hosting plans. &lt;/p&gt;  &lt;p&gt;However, maybe I am naive. &lt;/p&gt;  &lt;p&gt;Like I said, the side work I have done has been for small corporate sites – if they were down for a bit I couldn’t say my client was losing $200,000. If that was at stake, I would probably opt for a different hosting solution or at minimum have a path to follow in the event of disaster. &lt;/p&gt;  &lt;p&gt;My take on these gripes is this:&lt;/p&gt;  &lt;p&gt;Introducing a hosting provider brings in a new dependency and it seems like it is up to the developer to make clear who is the owner of that dependency. This at least should include good layman’s documentation if the client doesn’t want to pay for support of the site and the developer shouldn’t be so unwitting as to how the app is deployed as to be speechless when a failure occurs. The time to discover about domain registrations and DNS pointers is &lt;em&gt;before&lt;/em&gt; the client is “losing money” on a website, I’d think.&amp;#160; No matter who is responsible for what, it seems like a backup plan for applications which are so important (and those that may not be) should at least include a general guideline to redeploy to another provider. They aren’t really &lt;em&gt;that&lt;/em&gt; different.&lt;/p&gt;  &lt;p&gt;In one comment the complainant was just discovering what is involved in the transfer of domains and DNS records; he seemed to rely on the client to set all that up and never bothered to document retroactively.&amp;#160; This kind of situation seems like an exposure of incomplete work to me, but I am willing to be wrong.&lt;/p&gt;  &lt;p&gt;I’d really be interested in hearing others’ comments on this…&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=58796" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/MikeNichols/~4/w6ojxreK5Sg" height="1" width="1"/&gt;</description><category domain="http://devlicio.us/blogs/mike_nichols/archive/tags/General/default.aspx">General</category><category domain="http://devlicio.us/blogs/mike_nichols/archive/tags/WebHosting/default.aspx">WebHosting</category></item></channel></rss>
