<?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.yoot.be/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>YOOT</title>
	
	<link>http://blog.yoot.be</link>
	<description>Dark Side of the Trunk</description>
	<lastBuildDate>Mon, 08 Mar 2010 20:42:44 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.yoot.be/Yoot" /><feedburner:info uri="yoot" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>DDD Immersion Course review</title>
		<link>http://feeds.yoot.be/~r/Yoot/~3/QDHnE3hih94/</link>
		<comments>http://blog.yoot.be/index.php/2010/03/08/ddd-immersion-course-review/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 20:42:44 +0000</pubDate>
		<dc:creator>stiiifff</dc:creator>
				<category><![CDATA[DDD]]></category>

		<guid isPermaLink="false">http://blog.yoot.be/?p=459</guid>
		<description><![CDATA[I recently had the chance to follow a 4-day Domain-Driven Design Hands-on immersion course in Paris, with Eric Evans.
It was very inspirational, probably the most interesting course I&#8217;ve followed to date. The amount of knowledge contained in the DDD book can be daunting to master, and the course succeeds in clarifying the most complex aspects [...]]]></description>
			<content:encoded><![CDATA[<p>I recently had the chance to follow a 4-day <a href="http://skillsmatter.com/course/design-architecture/domain-model">Domain-Driven Design Hands-on immersion</a> course in Paris, with <a href="http://skillsmatter.com/expert-profile/design-architecture/eric-evans">Eric Evans</a>.</p>
<p>It was very inspirational, probably the most interesting course I&#8217;ve followed to date. The amount of knowledge contained in the <strong>DDD</strong> book can be daunting to master, and the course succeeds in clarifying the most complex aspects of <strong>DDD</strong> as well as delivering the latest evolutions of the approach.</p>
<p>If you are interested in this course, <a href="http://www.virtual-genius.com/blog/">Paul Rayner</a> has written an amazing series of posts about it:</p>
<ul>
<li><a href="http://www.virtual-genius.com/blog/post/Domain-Driven-Design-Immersion-Course-e28093-Part-1.aspx" target="_blank">Part One</a> – Introduction. What is DDD? Ubiquituous language? a Model?</li>
<li><a href="http://www.virtual-genius.com/blog/post/Domain-Driven-Design-Immersion-e28093-Part-2.aspx" target="_blank">Part Two</a> – Building-Block patterns (eg. Aggregate. Domain Event. Creative Collaboration etc)</li>
<li><a href="http://www.virtual-genius.com/blog/post/Domain-Driven-Design-Immersion-Course-e28093-Part-3.aspx" target="_blank">Part Three</a> – Strategic design – Bounded Context and context mapping.</li>
<li><a href="http://www.virtual-genius.com/blog/post/Domain-Driven-Design-Immersion-Course-e28093-Part-4.aspx" target="_blank">Part Four</a> – Strategic design (continued) – Core Domain</li>
<li><a href="http://www.virtual-genius.com/blog/post/Domain-Driven-Design-Immersion-Course-e28093-Part-5.aspx" target="_blank">Part Five</a> – More on supple design (Specification pattern). Implementation concerns. Discussion.</li>
<li><a href="http://www.virtual-genius.com/blog/post/Domain-Driven-Design-(DDD)-Immersion-Course-e28093-Part-6.aspx" target="_blank">Part Six</a> – Design and agile.</li>
<li><a href="http://www.virtual-genius.com/blog/post/Domain-Driven-Design-(DDD)-Immersion-Course-e28093-Part-7-(Final).aspx">Part Seven</a> – Final. Course takeaways and other thoughts.</li>
</ul>
<p>Happy modeling !</p>
<img src="http://feeds.feedburner.com/~r/Yoot/~4/QDHnE3hih94" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.yoot.be/index.php/2010/03/08/ddd-immersion-course-review/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.yoot.be/index.php/2010/03/08/ddd-immersion-course-review/</feedburner:origLink></item>
		<item>
		<title>Donate for NHibernate</title>
		<link>http://feeds.yoot.be/~r/Yoot/~3/r0NWZUV5_2w/</link>
		<comments>http://blog.yoot.be/index.php/2010/03/01/donate-for-nhibernate/#comments</comments>
		<pubDate>Mon, 01 Mar 2010 20:07:42 +0000</pubDate>
		<dc:creator>stiiifff</dc:creator>
				<category><![CDATA[ORM]]></category>
		<category><![CDATA[NHibernate]]></category>

		<guid isPermaLink="false">http://blog.yoot.be/?p=451</guid>
		<description><![CDATA[A donation campaign has started in order to help a great open source tool become even better : NHibernate.
If you are reading those lines, the probability that you or your customers have been using NHibernate, and leveraging its powerful features, is quite high. In a way, you have benefited from Open Source software at its best.
It [...]]]></description>
			<content:encoded><![CDATA[<p>A <a href="http://ayende.com:80/Blog/archive/2010/02/27/nhibernate-donation-campaign.aspx">donation campaign</a> has started in order to help a great open source tool become even better : <a href="http://nhforge.org/">NHibernate</a>.</p>
<p>If you are reading those lines, the probability that you or your customers have been using <strong>NHibernate</strong>, and leveraging its powerful features, is quite high. In a way, you have benefited from <strong>Open Source software at its best</strong>.</p>
<p>It is therefore a great opportunity for you or your customers (encourage them !) to show support to the people who have spent countless hours crafting a <strong>great free tool</strong>, and who will, hopefully, continue to do so <img src='http://blog.yoot.be/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><a href="http://pledgie.com/campaigns/8615">Donate !</a></p>
<img src="http://feeds.feedburner.com/~r/Yoot/~4/r0NWZUV5_2w" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.yoot.be/index.php/2010/03/01/donate-for-nhibernate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.yoot.be/index.php/2010/03/01/donate-for-nhibernate/</feedburner:origLink></item>
		<item>
		<title>Mono track @ FOSDEM 2010</title>
		<link>http://feeds.yoot.be/~r/Yoot/~3/0SPqSnWTLOc/</link>
		<comments>http://blog.yoot.be/index.php/2010/02/22/mono-track-fosdem-2010/#comments</comments>
		<pubDate>Sun, 21 Feb 2010 23:06:20 +0000</pubDate>
		<dc:creator>stiiifff</dc:creator>
				<category><![CDATA[Mono]]></category>

		<guid isPermaLink="false">http://blog.yoot.be/?p=431</guid>
		<description><![CDATA[2 weeks ago in Brussels, I had the pleasure to attend FOSDEM 2010, regarded as&#8221;The best Free Software and Open Source events in Europe&#8220;. I&#8217;m not ashamed to say that I&#8217;ve no experience with Mono so far, but I&#8217;m a curious guy, and the event was not far, and even better, free &#8230; so I [...]]]></description>
			<content:encoded><![CDATA[<p>2 weeks ago in <strong>Brussels</strong>, I had the pleasure to attend <strong><a href="http://fosdem.org/2010/">FOSDEM 2010</a></strong>, regarded as&#8221;<strong><em>The best Free Software and Open Source events in Europe</em></strong>&#8220;. I&#8217;m not ashamed to say that I&#8217;ve no experience with <strong><a href="http://www.mono-project.com">Mono</a></strong> so far, but I&#8217;m a curious guy, and the event was not far, and even better, free &#8230; so I thought, let&#8217;s go have a look to see how things are going in the free world <img src='http://blog.yoot.be/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>All in all, I was pleasantly surprised from what I saw. Apart from the fact that the attendees are somewhat different from those you see at the typical <strong>Micro$oft</strong> conferences, the atmosphere was very nice and you could see a lot of geeks, some younger, some older, having all one common point : the passion about softwares &amp; new technologies.</p>
<p>I mainly followed the <strong>Mono</strong> track and here are a few things that I think are worth mentioning:</p>
<ul>
<li>The <strong>Mono project</strong> &amp; <strong>Microsoft </strong>are not at war (this may be obvious to some but anyway) &#8230; they seem to have healthy collaboration (obviously, within the usual legal boundaries that apply). We are far from the <em>clichés </em>of <strong>Microsoft</strong>, the<strong> Evil Empire</strong> <strong>vs</strong> <strong>The Good Free World</strong>. This is a good thing, diversity brings more creativity, and thus more choice to people.</li>
<li><a href="http://tirania.org/blog/">Miguel de Icaza</a>, the charismatic leader of the <strong>Mono project</strong>, and Vice President of Developer Platform at <a href="http://www.novell.com/">Novell</a>, was there to make a state of the union speech. Among other things, he praised entrepreneurship (he seems to like <a href="http://tirania.org/blog/archive/2010/Jan-29.html">Apple and the iPad</a>), talked about the evolution of <strong>C#</strong> and how good a language it is for most purposes, and granted the audience a few good quotes:</li>
</ul>
<blockquote><p><strong>Any developer below the C# bar is just miserable.</strong></p></blockquote>
<blockquote><p><strong>No Coca-Cola today !</strong> (Talking about the fact that he would try no to make a marketing talk about Novell&#8217;s products)</p></blockquote>
<ul>
<li><a href="http://monodevelop.com/">Mono Develop</a> is improving very nicely. I wouldn&#8217;t trade <strong>Visual Studio</strong> for it yet, but it&#8217;s interesting to see how those guys are doing their best to provide a free alternative to the <strong>Microsoft </strong>star <strong>IDE</strong>.</li>
<li>If in the past, <strong>Mono </strong>was usually lagging far behind and mostly playing catch-up, they are now able to release their free implementation almost at the same time as <strong>Microsoft </strong>releases major revisions to <strong>C#, .Net </strong>&amp; <strong>Silverlight</strong>. Ok, they may not have all the features of the original implementation but this is still an amazing achievement.</li>
<li><strong>Mono </strong>also has a few unique features that are yet to make an appearance in the <strong>.Net</strong> world : <a href="http://tirania.org/blog/archive/2006/Aug-17.html">Ahead of Time compiler</a> &amp; <a href="http://tirania.org/blog/archive/2008/Nov-03.html">SIMD extensions</a>.</li>
<li>Last but not least, <strong><a href="http://monotouch.net/">MonoTouch</a> </strong>allows you to develop for <strong>iPhone </strong>&amp; <strong>iPad </strong>in <strong>C#</strong>.</li>
</ul>
<p>All in all, those guys are doing a great job, and, for us, typical <strong>.Net</strong> developers / consultants, looking at the other side of the fence from time to time, is inspirational.</p>
<p>Therefore, <a href="http://www.dotnethub.be/">DotNetHub</a> would be very happy to welcome speakers that would like to do a session about the <strong>Mono project</strong> &amp; related technologies. Don&#8217;t hesitate to <a href="http://www.dotnethub.be/contact">contacts us</a> !</p>
<img src="http://feeds.feedburner.com/~r/Yoot/~4/0SPqSnWTLOc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.yoot.be/index.php/2010/02/22/mono-track-fosdem-2010/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://blog.yoot.be/index.php/2010/02/22/mono-track-fosdem-2010/</feedburner:origLink></item>
		<item>
		<title>Dependency Injection Inversion</title>
		<link>http://feeds.yoot.be/~r/Yoot/~3/_geZDUw-BbQ/</link>
		<comments>http://blog.yoot.be/index.php/2010/01/19/dependency-injection-inversion/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 13:50:45 +0000</pubDate>
		<dc:creator>stiiifff</dc:creator>
				<category><![CDATA[Castle Project]]></category>
		<category><![CDATA[MEF]]></category>
		<category><![CDATA[IOC]]></category>
		<category><![CDATA[Windsor]]></category>

		<guid isPermaLink="false">http://blog.yoot.be/?p=423</guid>
		<description><![CDATA[Seems there is still a lot of confusion about what is Inversion of Control, what is Dependency Injection, what are the differences between the two, and how to apply one or the other properly.
Several people have reacted to a controversial post by Uncle Bob on that topic with, among the most vocal ones, Davy.  [...]]]></description>
			<content:encoded><![CDATA[<p>Seems there is still a lot of confusion about what is <strong>Inversion of Control</strong>, what is <strong>Dependency Injection</strong>, what are the differences between the two, and how to apply one or the other properly.</p>
<p>Several people have reacted to a controversial <a href="http://blog.objectmentor.com/articles/2010/01/17/dependency-injection-inversion">post</a> by <a href="http://www.objectmentor.com/omTeam/martin_r.html">Uncle Bob</a> on that topic with, among the most vocal ones, <a href="http://davybrion.com/blog/2010/01/dependency-injection-inversion-rejection/">Davy</a>. <img src='http://blog.yoot.be/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>IMHO, some of the best posts on the subject that really make a clear distinction between <strong>IoC</strong> &amp; <strong>DI</strong> are the following ones:</p>
<ul>
<li><a href="http://www.jroller.com/hammett/date/20050416">Inversion of Control != Dependency Injection</a></li>
<li><a href="http://www.betaversion.org/~stefano/linotype/news/38/">On Inversion of Control</a></li>
<li><a href="http://hammett.castleproject.org/?p=337">A small excerpt from the IoC Container doc</a></li>
</ul>
<p>The whole point of <strong>IoC </strong>(forget a minute about <strong>DI</strong>) is to <strong>break the dependencies</strong> between your classes and design them as  <strong>loosely-coupled</strong> as possible (to the point that it&#8217;s actually useful of course, it&#8217;s not an engineering contest).</p>
<p>All the benefits that you get:</p>
<ul>
<li><strong>Dependency Injection</strong></li>
<li><strong>Better testability</strong></li>
<li><strong>Better maintainability</strong></li>
</ul>
<p>are just <span style="text-decoration: underline;"><strong>consequences</strong></span> of the good design of your classes (read about <strong>SOLID </strong>also).</p>
<p>In the end, it&#8217;s just good <strong>Object-Oriented design</strong>, nothing more. And by good, it doesn&#8217;t mean complex, it&#8217;s actually quite simple once you got it.</p>
<img src="http://feeds.feedburner.com/~r/Yoot/~4/_geZDUw-BbQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.yoot.be/index.php/2010/01/19/dependency-injection-inversion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.yoot.be/index.php/2010/01/19/dependency-injection-inversion/</feedburner:origLink></item>
		<item>
		<title>2010 Predictions galore</title>
		<link>http://feeds.yoot.be/~r/Yoot/~3/jVgh_s794gA/</link>
		<comments>http://blog.yoot.be/index.php/2010/01/08/2010-predictions-galore/#comments</comments>
		<pubDate>Fri, 08 Jan 2010 00:12:10 +0000</pubDate>
		<dc:creator>stiiifff</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[2010]]></category>

		<guid isPermaLink="false">http://blog.yoot.be/?p=411</guid>
		<description><![CDATA[Just did a quick tour on the net about the predictions being made for 2010 in the .Net world &#8230; and what is so striking, is that almost everywhere, Silverlight, with its 4th incarnation, is being touted  as one of the stars of the year.
Here a list of random picks:

10 Microsoft Predictions For 2010
Top 25 [...]]]></description>
			<content:encoded><![CDATA[<p>Just did a quick tour on the net about the predictions being made for 2010 in the <strong>.Net</strong> world &#8230; and what is so striking, is that almost everywhere, <strong>Silverlight</strong>, with its 4th incarnation, is being touted  as one of the stars of the year.</p>
<p>Here a list of random picks:</p>
<ul>
<li><a href="http://www.crn.com/software/222001545;jsessionid=JCAHXDKAINAGJQE1GHRSKHWATMY32JVN?pgno=1">10 Microsoft Predictions For 2010</a></li>
<li><a href="http://www.daemonnews.org/internet/1714-top-25-tech-predictions-for-2010.html">Top 25 Tech Predictions for 2010</a></li>
<li><a href="http://geekswithblogs.net/evjen/archive/2010/01/05/137357.aspx">2010 technology predictions</a></li>
<li><a href="http://www.stephenforte.net/PermaLink,guid,76629be9-453e-4e31-8b5f-14d786ba23fa.aspx">Predictions for 2010 Part I- Beyond .NET</a></li>
<li><a href="http://colinizer.com/2009/12/31/2010-new-year-prediction-silverlight-azure-the-new-windows/">2010 New-Year Prediction: Silverlight + Azure = The New Windows</a></li>
<li><a title="Permanent Link to Predictions 2010 [Technology]" rel="bookmark" href="http://www.taranfx.com/predictions-2010">Predictions 2010 [Technology]</a></li>
</ul>
<p>In 2010, <strong>Silverlight 4</strong> will help you build <strong>Line of Business</strong> (<strong>LOB</strong>) applications so easily that it&#8217;s gonna be laughable. Think about it for a minute &#8230; <strong>SL</strong> allows you to develop web applications that have desktop-like rich feature sets in a cross-platform manner. Also, those web applications can be taken out-of-browser and used as ocasionally-connected applications. Even better, it can transparently leverage your powerful GPU to integrate some crazy-never-seen-before-groundbreaking UI metaphors. Sounds like heaven ? <img src='http://blog.yoot.be/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Well not yet, because until recently, it was still difficult to access data from a <strong>Silverlight</strong> application &#8230; you had to go through all that boring thinking to design a 2 or 3 tiers architecture, probably passing some DTOs around, mapping, converting or even better, change-tracking, across tiers. But this is soon going to be the past, as <strong>RIA Services</strong> will simplify all of that. <strong>RIA Services</strong> is <strong>ADO.Net</strong> for <strong>Silverlight</strong>. It lets you access your database directly in your rich UI, query it, change-track it, validate it, bind it, xaml-ize it. Add some <strong>LINQ</strong>-icing on top and you&#8217;ve got some more great magic happening in there.</p>
<p>Sounds like something familiar &#8230; desktop applications, almost-direct database access &#8230; didn&#8217;t we have that in the past ? Wasn&#8217;t it a thing called <strong>Client-Server</strong> ? Damn yeah ! That thing was so simple, I remember now ! Why did we go through all those crazy architecture evolutions, design patterns, &#8230; to finally come back to it ! You gotta be wondering <img src='http://blog.yoot.be/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Anyway, I hope that by now, you&#8217;ve noticed that I was a bit ironic about all of this &#8230; because I think that you have to be very careful with the latest cool stuff and not just blindly think it&#8217;s gonna solve all of your problems. <strong>Silverlight</strong> is a very fine piece of technology, but it&#8217;s easy to fall into some bad practices. <strong>RIA Services</strong> will be the same kind of beast. It will bring some interesting abstractions, but as with all abstractions, you&#8217;ll have some simplifications that will be applied here and there, so beware.</p>
<p>So, let&#8217;s get into the game, here are my predictions for 2010:</p>
<ul>
<li><strong>Silverlight</strong> will indeed see a broader adoption, and <strong>WinForms</strong> / <strong>WPF</strong> desktop applications will continue to slowly decline. There will also most probably be more and more <strong>SL</strong> projects that, by trying to do so much in a browser, will have performance, scalability &amp; memory problems. Similarly, backend resources will continue to be used inefficiently.</li>
<li><a href="http://ayende.com:80/Blog/default.aspx">Ayende</a> will most probably add a <strong>RIA Services-Prof</strong> to its profiler suite, helping developers understanding why the heck are so many HTTP requests being sent from the UI to the backend server.</li>
<li>The <a href="http://www.michaelnygard.com/blog/2008/03/reality.html">reality</a> depicted by <a href="http://www.michaelnygard.com/">M. Nygard</a> in 2008 will still hold true in 2010 (just replace <strong>J2EE</strong> by <strong>.Net</strong>).</li>
</ul>
<img src="http://feeds.feedburner.com/~r/Yoot/~4/jVgh_s794gA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.yoot.be/index.php/2010/01/08/2010-predictions-galore/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.yoot.be/index.php/2010/01/08/2010-predictions-galore/</feedburner:origLink></item>
		<item>
		<title>Looking back at 2009, and forward to 2010</title>
		<link>http://feeds.yoot.be/~r/Yoot/~3/4M5ADg93ENA/</link>
		<comments>http://blog.yoot.be/index.php/2009/12/24/looking-back-at-2009-and-forward-to-2010/#comments</comments>
		<pubDate>Wed, 23 Dec 2009 23:54:06 +0000</pubDate>
		<dc:creator>stiiifff</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[DDD]]></category>
		<category><![CDATA[DotNetHub]]></category>
		<category><![CDATA[SOA]]></category>
		<category><![CDATA[Yoot]]></category>
		<category><![CDATA[Books]]></category>
		<category><![CDATA[NET 4.0]]></category>
		<category><![CDATA[NServiceBus]]></category>

		<guid isPermaLink="false">http://blog.yoot.be/?p=407</guid>
		<description><![CDATA[There will probably be thousands of posts like this one but anyway, here I go with my own &#8230; I wanna take a little time looking back at 2009 and then set my personal expectations for 2010.
Overall, 2009 was a great year  

I finally created my own company ! This gives me a certain [...]]]></description>
			<content:encoded><![CDATA[<p>There will probably be thousands of posts like this one but anyway, here I go with my own &#8230; I wanna take a little time looking back at 2009 and then set my personal expectations for 2010.</p>
<p>Overall, 2009 was a great year <img src='http://blog.yoot.be/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<ul>
<li>I finally created my own company ! This gives me a certain degree of freedom in choosing the types of project I want to work on, the knowledge I want to acquire and even more opportunities to meet a lot of very talented people.</li>
<li>I learned a lot &#8230; especially on how to have a more business-centered focus on software development. Thinking about <strong>business value</strong>, weighting different solutions benefits vs costs, and also, listening &amp; talking more to the business guys.</li>
<li>I read a lot, although I still haven&#8217;t finished all the books I started. <strong>Functional</strong> <strong>&amp; </strong><strong>concurrent programming</strong>, <strong>domain-specific languages</strong>, <strong>Scrum</strong>, <strong>Business/IT Alignment</strong> are in my continuous learning bag.</li>
<li>I followed a great course with <strong>Udi Dahan</strong> and it helped me gain some new perspectives on how to rethink about software design in general. <strong>Messaging</strong>, <strong>SOA</strong> &amp; <strong>DDD</strong> are fascinating topics I want to further learn from.</li>
<li>Articles &amp; presentations of <strong>Eric Evans</strong> on <strong>DDD</strong> and <strong>Udi</strong> on <strong>CQRS</strong> had a tremendous impact on my view of software building. We, software developers tend to focus too much on creating cool frameworks or libraries, and solving complex technical problems, while forgetting about our main goal : <strong>providing business value</strong>. Sometimes, solving a problem from a business point of view is far easier than at a technical level. Also, we tend to be maniac about every line of code we write &#8230; but as <strong>E. Evans</strong> is saying &#8220;<em>Precision design are fragile</em>&#8221; &amp; &#8220;<em>Not all of a system will be well designed</em>&#8220;. Focus your efforts on writing good code in parts of the system that provide most of the business value. It is perfectly fine to write not so good code elsewhere (the duck-tape programmer has its role to play!), just make sure you make everything explicit.</li>
<li>Finally, with some friends, I created a new community about the <strong>.Net platform</strong> &amp; the <strong>Agile methodologies</strong>, <a href="http://www.dotnethub.be/">DotNetHub</a>. It&#8217;s a very exciting project <img src='http://blog.yoot.be/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </li>
</ul>
<p>So, 2009 was so amazing that I&#8217;m eagerly awaiting 2010 !</p>
<ul>
<li>I already booked a <strong>DDD immersion workshop</strong> with <strong>E. Evans</strong> in Paris, mid-February, and I&#8217;m sure it&#8217;s gonna be a great course. Maybe others will follow as I find myself learning a lot during those intensive courses.</li>
<li><strong>DotNetHub</strong> will keep me busy, organizing great conferences with, well-known and well-known-to-be speakers.</li>
<li>I absolutely have to finish all the books I started before I buy any new one !</li>
<li>I will restart working on my app based on <strong>Northwind</strong> and demonstrating <strong>DDD</strong> coupled with <strong>NServiceBus</strong>. I have to admit, I got a bit side-tracked by <strong>DotNetHub</strong> and another major personal event (read further lol).</li>
<li>Probably learn some new technical stuff like <strong>C# 4.0</strong>, <strong>VS2010</strong>/<strong>TFS2010</strong>, <strong>Dublin</strong> &amp; some more <strong>F#</strong> but honestly, that&#8217;s less important and most probably easier than the previous stuff (although <strong>F#</strong> is quite funky). Using your brain and training your critical sense to filter marketing / wrong piece of information /  silver bullets is actually the hardest part of our job.</li>
</ul>
<p>So, that&#8217;s about it folks ! This is the list of my expectations for 2010 &#8230; but that&#8217;s actually all secondary compared to the main challenge I will have to face : becoming a father end of May 2010 ! <img src='http://blog.yoot.be/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  Indeed, my wife is pregnant of my first child. I&#8217;m really excited about it &#8230; now, on top of my to-do list : read the baby books or get killed <img src='http://blog.yoot.be/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  lol</p>
<p>Merry Christmas &amp; Happy New Year to all !</p>
<img src="http://feeds.feedburner.com/~r/Yoot/~4/4M5ADg93ENA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.yoot.be/index.php/2009/12/24/looking-back-at-2009-and-forward-to-2010/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://blog.yoot.be/index.php/2009/12/24/looking-back-at-2009-and-forward-to-2010/</feedburner:origLink></item>
		<item>
		<title>Announcing DotNetHub !</title>
		<link>http://feeds.yoot.be/~r/Yoot/~3/zNKBhXs61mI/</link>
		<comments>http://blog.yoot.be/index.php/2009/12/14/announcing-dotnethub/#comments</comments>
		<pubDate>Sun, 13 Dec 2009 23:23:10 +0000</pubDate>
		<dc:creator>stiiifff</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[Belgium]]></category>
		<category><![CDATA[DotNetHub]]></category>

		<guid isPermaLink="false">http://blog.yoot.be/?p=393</guid>
		<description><![CDATA[I&#8217;ve been working with some friends on a project for a while now, and it is finally time to talk about it more publicly as it is eventually coming to life : DotNetHub !
DotNetHub is a new community about the Microsoft .Net Platform as well as the Agile Methodologies.
DotNetHub will be a bit particular for [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working with some friends on a project for a while now, and it is finally time to talk about it more publicly as it is eventually coming to life : <a href="http://www.dotnethub.be">DotNetHub</a> !</p>
<p><strong>DotNetHub</strong> is a new community about the <strong>Microsoft .Net Platform</strong> as well as the <strong>Agile Methodologies</strong>.</p>
<p><strong>DotNetHub</strong> will be a bit particular for 2 reasons:</p>
<ul>
<li>First, it will be dedicated mainly to french-speaking people, mostly living in <strong>Belgium</strong>, <strong>Luxembourg</strong>, <strong>France</strong> &amp; <strong>Switzerland</strong> (but, if you are elsewhere, don&#8217;t hesitate to contribute !). Why only french-speaking people ? Simply because there are already tons of english-speaking communities, all very good, but my friends and I felt that there was a void to be filled, especially here in <strong>Belgium</strong> (<strong>French</strong> people have <a href="http://www.dotnetguru.org/">DotNetGuru</a> &amp; <a href="http://www.techheadbrothers.com/">Tech Head Brothers</a> !).</li>
<li>Secondly, as mentioned, we will not only focus on <strong>technological aspects </strong>but also on the <strong>methodological</strong> ones, something that we find missing in other communities, but that is nonetheless as important. Bringing those two aspects together in the events &amp; conferences we are going to organize will be a big challenge, but it&#8217;s worth it !</li>
</ul>
<p>We&#8217;re hoping to have many people joining us in order to create a very dynamic community. We are also actively looking for sponsors &#8230; so if you&#8217;re interested, please <a href="http://www.dotnethub.be/contact">contact us</a>.</p>
<p>I&#8217;m already very happy to announce that our first event will take place on the <strong>20th of January</strong> with <strong>Jonathan &#8220;Peli&#8221; de Halleux</strong> from <strong>Microsoft Research</strong>, who will talk about &#8220;<strong>Stubs, Moles &amp; Pex</strong>&#8220;. Go <a href="http://www.dotnethub.be/agenda/stubs-moles-et-pex-test-unitaires-isole-et-parametrise">register</a> on the website, the number of places is limited !</p>
<p>If you have any questions, suggestions, comments, &#8230; please <a href="http://www.dotnethub.be/">visit us</a> ! <img src='http://blog.yoot.be/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><strong>Update </strong>: A more detailed presentation in french by <a href="http://www.pedautreppe.com">Pierre-Emmanuel</a> can be found <a href="http://www.pedautreppe.com/post/DotNetHub%2c-un-nouveau-user-group-en-Wallonie%2c-ciblant-les-technologies-NET-et-les-m%c3%a9thodologies-Agiles.aspx">here</a>.</p>
<img src="http://feeds.feedburner.com/~r/Yoot/~4/zNKBhXs61mI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.yoot.be/index.php/2009/12/14/announcing-dotnethub/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://blog.yoot.be/index.php/2009/12/14/announcing-dotnethub/</feedburner:origLink></item>
		<item>
		<title>Getting a better view from the roof of the Bus</title>
		<link>http://feeds.yoot.be/~r/Yoot/~3/5aPU6h8CdbA/</link>
		<comments>http://blog.yoot.be/index.php/2009/11/03/getting-a-better-view-from-the-roof-of-the-bus/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 00:37:59 +0000</pubDate>
		<dc:creator>stiiifff</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[DDD]]></category>
		<category><![CDATA[EDA]]></category>
		<category><![CDATA[SOA]]></category>
		<category><![CDATA[NServiceBus]]></category>

		<guid isPermaLink="false">http://blog.yoot.be/?p=354</guid>
		<description><![CDATA[Last time, I had a first spike with NServiceBus in combination with Castle Windsor, NHibernate &#38; FluentNHibernate, and highlighted the fact that it was quite easy to get those guys up and running together in a clean way, and from there, to process your first messages.
This time, I would like to take a step back, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.yoot.be/index.php/2009/10/12/stepping-onto-the-bus/">Last time</a>, I had a first spike with <a href="http://nservicebus.com/">NServiceBus</a> in combination with <a href="http://castleproject.org/">Castle Windsor</a>, <a href="http://nhforge.org/Default.aspx">NHibernate</a> &amp; <a href="http://fluentnhibernate.org/">FluentNHibernate</a>, and highlighted the fact that it was quite easy to get those guys up and running together in a clean way, and from there, to process your first messages.</p>
<p>This time, I would like to take a step back, off the <strong>Bus</strong>, to lay down the foundations of a more concrete &amp; complete example. To do so, I will use the well-known used &amp; abused database sample from <strong>Microsoft</strong> : <strong>Northwind</strong> !</p>
<p>I can already hear you all &#8220;<em>Northwind, WTF ?!</em>&#8221; &#8230; except that <a href="http://www.youtube.com/watch?v=2W8d7EyFSrs">this time, it&#8217;s gonna be different, trust me</a> !</p>
<p>Let&#8217;s start by having a look at our veteran database diagram &#8230;</p>
<p><a href="http://blog.yoot.be/wp-content/uploads/2009/11/NorthwindDiagram.png"><img class="aligncenter size-medium wp-image-360" title="NorthwindDiagram" src="http://blog.yoot.be/wp-content/uploads/2009/11/NorthwindDiagram-300x256.png" alt="NorthwindDiagram" width="300" height="256" /></a></p>
<p>As we can see, <strong>Northwind</strong> is a traditional sales company, with an online business, which is:</p>
<ul>
<li>Receiving <strong>Orders</strong> from <strong>Customers</strong>, classified in different <strong>Demographic</strong> segments, and shipping those orders via third-party <strong>Shippers</strong>.</li>
<li>Provisioning adequate <strong>Stock</strong> quantities of <strong>Products</strong>, arranged in <strong>Categories</strong>, by buying from several <strong>Suppliers</strong>, to deliver ordered quantities.</li>
<li>Managing <strong>Salesmen</strong> organized in <strong>Territories</strong> &amp; <strong>Regions</strong>.</li>
</ul>
<p>(yeah, I can get all that from a simple database diagram &#8230; impressive imagination huh ? <img src='http://blog.yoot.be/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> )</p>
<p>In an <a href="http://en.wikipedia.org/wiki/Service-oriented_architecture">SOA</a> world, we wil tend to breakdown the different facets of the company into several independent but cooperating <strong>Services</strong>.</p>
<p>A naive but all too common way to split our problem domain would probably be as follows:</p>
<ul>
<li><strong>Employee service</strong>: manage employees, territories &amp; regions.</li>
<li><strong>Customer service</strong>: manage customer &amp; demographic segments.</li>
<li><strong>Order service</strong>: manages customer orders &amp; shippers.</li>
<li><strong>Supplier service</strong>: manages suppliers &amp; stock.</li>
<li><strong>Product service</strong>: manages products &amp; categories.</li>
</ul>
<p>Unfortunately, this simplistic way of defining service boundaries around groups of related concepts most often leads to services that are not autonomous (e.g. call each others, use same database), which violates one of the 4 tenets of <strong>SOA</strong> (&#8220;<em>Services are autonomous</em>&#8220;). Plus the fact that it just smells too much like a <strong>CRUD API</strong>.</p>
<p>A better starting point for modeling services is to analyze the <a href="http://blog.yoot.be/index.php/2009/10/23/business-capabilities/">Business Capabilities</a> of the company, that is to say, the distinctive aspects of the company that are contributing to achieve its main goals. Another possibility can also be to model your <strong>Services</strong> around <a href="http://www.markhneedham.com/blog/2009/03/07/ddd-bounded-contexts/">Bounded Contexts</a> that you would have previously identified, if you are a <a href="http://domaindrivendesign.org/">DDD</a> practitioner. I&#8217;m still not yet entirely sure which solution you should prefer and in which conditions &#8230; good topic for another discussion.</p>
<p>But in any case, your <strong>Services</strong> will be better <a href="http://en.wikipedia.org/wiki/Business/IT_alignment">aligned with the Business</a> rather than just being technical CRUD-services.</p>
<p>Here is an attempt at defining the <strong>Business Capabilities (BC) </strong>and their respective goals in our beloved fictive <strong>Northwind</strong> company:</p>
<ul>
<li><strong>Marketing BC</strong>: maintains a catalog of products, define pricing &amp; promotional operations to maximize sales.</li>
<li><strong>Sales BC</strong>: accepts customer orders and improves customer relationship.</li>
<li><strong>Inventory BC</strong>: optimizes the provisioning of product stocks via suppliers to support sales.</li>
<li><strong>Shipping BC</strong>: optimizes delivery times &amp; costs through shippers.</li>
<li><strong>HR BC</strong>: manages salesmen to cover sales territories &amp; markets.</li>
</ul>
<p>They might change as the company&#8217;s goals evolve, some being dropped, new ones being added but let&#8217;s focus on these ones for now. One service will be defined for each business capability.</p>
<p>Each of those services will eventually use it&#8217;s own independent datastore to persist information and will expose its features by accepting incoming <strong>Messages</strong> and triggering outgoing <strong>Events</strong> on the <strong>Messaging</strong> infrastructure.</p>
<p>Those services will be composed to form one or more application(s) that will deliver great value to the company and increase its sales by multiple orders of magnitude !!!</p>
<p>To break with the past, I&#8217;ve decided to name this sample <strong>Southwind</strong>! It sounds warmer and way cooler than <strong>Northwind</strong>, doesn&#8217;t it? <img src='http://blog.yoot.be/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  Indeed, it will feature a first personal attempt at building a sample bringing together an <strong>Event-Driven Architecture</strong> with domain models built following the <strong>Domain-Driven Design</strong> approach, on top of <strong>NServiceBus</strong>. Might be a bit ambitious, but it&#8217;s so interesting right ?</p>
<p>That&#8217;s it for now, till next time where I will focus on the messages &amp; events being exchanged by the different services.</p>
<p>Meanwhile, go read this great article about <a href="http://blog.scottmfelder.com/2009/11/04/event-driven-soa-with-nservicebus/">Event Driven SOA with NServiceBus</a>.</p>
<p>As always, remarks, comments, suggestions are welcome. And if you wanna help building this great sample, you&#8217;re more than welcome! <img src='http://blog.yoot.be/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<img src="http://feeds.feedburner.com/~r/Yoot/~4/5aPU6h8CdbA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.yoot.be/index.php/2009/11/03/getting-a-better-view-from-the-roof-of-the-bus/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.yoot.be/index.php/2009/11/03/getting-a-better-view-from-the-roof-of-the-bus/</feedburner:origLink></item>
		<item>
		<title>Business Capabilities</title>
		<link>http://feeds.yoot.be/~r/Yoot/~3/OxoenSpe6Yc/</link>
		<comments>http://blog.yoot.be/index.php/2009/10/23/business-capabilities/#comments</comments>
		<pubDate>Fri, 23 Oct 2009 07:16:22 +0000</pubDate>
		<dc:creator>stiiifff</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[EDA]]></category>
		<category><![CDATA[SOA]]></category>

		<guid isPermaLink="false">http://blog.yoot.be/?p=349</guid>
		<description><![CDATA[A series of interesting links about Business Capabilities:

Business capabilities or business processes
Business Capabilities and Business Strategy
Enterprise Architecture as Business Capabilities Architecture
A Business-Oriented Foundation for Service Orientation
Business-Capability Mapping: Staying Ahead of the Joneses
A single taxonomy of business capabilities
Enabling Business Capabilities with SOA

]]></description>
			<content:encoded><![CDATA[<p>A series of interesting links about <strong>Business Capabilities</strong>:</p>
<ul>
<li><a href="http://weblogs.asp.net/ngur/archive/2006/07/28/Business-capabilities-or-business-processes-.aspx">Business capabilities or business processes</a></li>
<li><a href="http://weblogs.asp.net/ngur/archive/2009/07/26/business-capabilities-and-business-strategy.aspx">Business Capabilities and Business Strategy</a></li>
<li><a href="http://www.ewita.com/newsletters/10025_files/EnterpriseArchitectureAsCapabilitiesArchSlides.PDF">Enterprise Architecture as Business Capabilities Architecture</a></li>
<li><a href="http://msdn.microsoft.com/en-us/library/aa479368.aspx">A Business-Oriented Foundation for Service Orientation</a></li>
<li><a href="http://msdn.microsoft.com/en-us/library/bb402954.aspx">Business-Capability Mapping: Staying Ahead of the Joneses</a></li>
<li><a href="http://blogs.msdn.com/nickmalik/archive/2006/05/16/598889.aspx">A single taxonomy of business capabilities</a></li>
<li><a href="http://msdn.microsoft.com/en-us/architecture/aa699435.aspx">Enabling Business Capabilities with SOA</a></li>
</ul>
<img src="http://feeds.feedburner.com/~r/Yoot/~4/OxoenSpe6Yc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.yoot.be/index.php/2009/10/23/business-capabilities/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.yoot.be/index.php/2009/10/23/business-capabilities/</feedburner:origLink></item>
		<item>
		<title>Stepping onto the Bus</title>
		<link>http://feeds.yoot.be/~r/Yoot/~3/6jo2YPBdTi0/</link>
		<comments>http://blog.yoot.be/index.php/2009/10/12/stepping-onto-the-bus/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 21:34:30 +0000</pubDate>
		<dc:creator>stiiifff</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Castle Project]]></category>
		<category><![CDATA[DDD]]></category>
		<category><![CDATA[EDA]]></category>
		<category><![CDATA[ORM]]></category>
		<category><![CDATA[SOA]]></category>
		<category><![CDATA[IOC]]></category>
		<category><![CDATA[NHibernate]]></category>
		<category><![CDATA[NServiceBus]]></category>
		<category><![CDATA[Windsor]]></category>

		<guid isPermaLink="false">http://blog.yoot.be/?p=274</guid>
		<description><![CDATA[I recently had the chance to follow the Advanced Distributed Systems Design with SOA course with Udi Dahan in Brussels, a rejuvenating experience for various reasons : I had no real-world  SOA or Messaging Bus experience, it helped me clear out some misunderstandings I had about DDD and also, although painful at first, Udi [...]]]></description>
			<content:encoded><![CDATA[<p>I recently had the chance to follow the <a href="http://skillsmatter.com/course/design-architecture/advanced-distributed-systems-design-with-soa">Advanced Distributed Systems Design with SOA</a> course with <a href="http://www.udidahan.com/">Udi Dahan</a> in <a href="http://www.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;q=brussels&amp;vps=1&amp;jsv=178b&amp;sll=50.677348,4.562531&amp;sspn=0.006608,0.01929&amp;ie=UTF8&amp;geocode=FUnaBwMdp3JCAA&amp;split=0">Brussels</a>, a rejuvenating experience for various reasons : I had no real-world  <strong>SOA </strong>or <strong>Messaging Bus</strong> experience, it helped me clear out some misunderstandings I had about <strong>DDD</strong> and also, although painful at first, <strong>Udi </strong>finger pointed all the bad habits &amp; misconceptions I had accumulated over the years (I can still hear him squeaking &#8220;<em>Northwind ! Northwind !</em>&#8220;).</p>
<p>So here I am, entering the realm of <a href="http://en.wikipedia.org/wiki/Service-oriented_architecture">SOA</a>, <a href="http://en.wikipedia.org/wiki/Event_driven_architecture">EDA</a> &amp; <a href="http://domaindrivendesign.org/">DDD</a> that might well be heaven on earth for both business people &amp; software-makers, the place we all heard of but never saw. But let&#8217;s start slowly, and discover my first endeavor with <a href="http://nservicebus.com/">NServiceBus</a>, shall we? <img src='http://blog.yoot.be/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>For a good introduction on <a href="http://nservicebus.com/">NServiceBus</a>, I suggest you to read the <a href="http://elegantcode.com/2009/10/09/exploring-nservicebus/">post</a> from <a href="http://elegantcode.com/about/jan-van-ryswyck/">Jan</a> who has been doing research on the same aforementioned topics as well.</p>
<p>This post will focus on how well <a href="http://nservicebus.com/">NServiceBus</a>, <a href="http://nhforge.org/Default.aspx">NHibernate</a>, <a href="http://fluentnhibernate.org/">FluentNHibernate</a> &amp; <a href="http://castleproject.org/">Castle Framework</a> play together and how to make them fly in a <a href="http://domaindrivendesign.org/">DDD</a> context. Ok, ok, enough talking, show me the code man !!! <img src='http://blog.yoot.be/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>To manage my <strong>NHibernate </strong>sessions (<strong>ISession</strong>), I like to use the <a href="http://castleproject.org/container/facilities/trunk/nhibernate/index.html">Castle&#8217;s NHibernate Integration facility</a>, as it gives me a nice abstraction in the form of the <strong>ISessionManager </strong>component:</p>
<p><a href="http://blog.yoot.be/wp-content/uploads/2009/10/ISessionManager.png"><img class="size-full wp-image-296 alignnone" title="ISessionManager" src="http://blog.yoot.be/wp-content/uploads/2009/10/ISessionManager.png" alt="ISessionManager" width="246" height="142" /></a></p>
<p>Next to that, a little more than a month ago, the <a href="http://nhforge.org/blogs/nhibernate/archive/2009/08/29/fluent-nhibernate-1-0.aspx">1.0 version of FluentNHibernate</a> was released, and it&#8217;s really neat for both <strong>NHibernate configuration</strong> &amp; <strong>mappings</strong>. So, I like to use it as well:</p>
<pre name="code" class="c-sharp">Fluently.Configure(config)
  .Database(MsSqlConfiguration.MsSql2008
    .DefaultSchema("dbo")
    .ConnectionString(c =&gt; c
      .FromConnectionStringWithKey("Northwind"))
    .QuerySubstitutions("true 1, false 0")
    .DoNot.UseOuterJoin()
    .ShowSql())
  .Mappings(m =&gt; m
    .FluentMappings.AddFromAssemblyOf&lt;CatalogMap&gt;()
    .ExportTo(System.Environment.CurrentDirectory))
  .BuildConfiguration();</pre>
<p>One very nice thing about <strong>NServiceBus </strong>(and its <a href="http://sourceforge.net/apps/mediawiki/nservicebus/index.php?title=Generic_Host">Generic Host</a>) is that it acknowledges from the start that our softwares have to operate in different environments and for that, it offers a very clean solution : <strong>Profiles</strong>.</p>
<p>Wrapping it all up, wouldn&#8217;t it be nice if I could use <strong>Castle</strong>&#8217;s <strong>NHibernate Integration</strong> facility for useful components like <strong>ISessionManager </strong>(and others, more on that later), <strong>FluentNHibernate </strong>for configuration &amp; mappings and take advantage of <strong>NServiceBus Profiles</strong> ? Hell yeah !!! Well, that&#8217;s actually quite easy &amp; clean. <img src='http://blog.yoot.be/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>First, configure the <strong>NH</strong> facility in your config file:</p>
<pre name="code" class="xml">&lt;castle&gt;
  &lt;facilities&gt;
    &lt;facility id="nhibernate.facility" type="Castle.Facilities.NHibernateIntegration.NHibernateFacility, Castle.Facilities.NHibernateIntegration"&gt;
      &lt;factory id="nhibernate.factory"/&gt;
    &lt;/facility&gt;
  &lt;/facilities&gt;
&lt;/castle&gt;</pre>
<p>Notice that the configuration for the factory is empty &#8230; indeed, we want to configure it <strong>fluently</strong> in the code.</p>
<p>Create a <strong>Profile Handler class</strong> (implements a <strong>IHandleProfile</strong> <a href="http://martinfowler.com/bliki/RoleInterface.html">role interface</a>) which simply registers an object into the container (<strong>NSB </strong>is container-agnostic) :</p>
<pre name="code" class="c-sharp">public class IntegrationProfileHandler : IHandleProfile&lt;Integration&gt;
{
  public void ProfileActivated()
  {
    Configure.Instance.Configurer
      .RegisterSingleton&lt;IConfigurationContributor&gt;(
        new IntegrationNHibernateConfig());
  }
}</pre>
<p>&#8230; and finally, an implementation of the <strong>IConfigurationContributor </strong>interface &#8230; which is part of <strong>Castle</strong>&#8217;s <strong>NHibernate Integration</strong> facility, and will be called before <strong>NH</strong>&#8217;s <strong>SessionFactory</strong> is built in order to, well, contribute to the configuration. <img src='http://blog.yoot.be/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<pre name="code" class="c-sharp">public class IntegrationNHibernateConfig : IConfigurationContributor
{
  public void Process(string name, Configuration config)
  {
    Fluently.Configure(config)
      .Database(MsSqlConfiguration.MsSql2008
        .DefaultSchema("dbo")
        .ConnectionString(c =&gt; c
          .FromConnectionStringWithKey("Northwind"))
        .QuerySubstitutions("true 1, false 0")
        .DoNot.UseOuterJoin()
        .ShowSql())
      .Mappings(m =&gt; m
        .FluentMappings.AddFromAssemblyOf&lt;CatalogMap&gt;()
        .ExportTo(System.Environment.CurrentDirectory))
      .BuildConfiguration();
  }
}</pre>
<p>Ok, very nice &#8230; but I&#8217;m not done yet.</p>
<p>A nice concept that we want to use when querying in a true <strong>DDD </strong>fashion is the notion of <strong>Fetching Strategy</strong> (read more about it <a href="http://www.udidahan.com/2007/04/23/fetching-strategy-design/">here</a> &amp; <a href="http://www.udidahan.com/2007/09/16/fetching-strategy-nhibernate-implementation-available/">there</a>). We need <strong>Fetching Strategies</strong> for a very simple reason:</p>
<p>Make sure that once we call into the <a href="http://martinfowler.com/eaaCatalog/domainModel.html">Domain Model</a> to perform a certain action, it has everything it needs to do its job, without causing lazy-loading to trigger and possibly N+1 select problems.</p>
<p>For that matter, I define a simple interface <strong>IFetchingStrategy</strong> (<strong>IEntityRole </strong>is just a <a href="http://en.wikipedia.org/wiki/Marker_interface_pattern">marker interface</a>):</p>
<pre name="code" class="c-sharp">public interface IFetchingStrategy&lt;TEntityRole&gt;
    where TEntityRole : IEntityRole
{
  string[] FetchList { get; }
}</pre>
<p>&#8230; that I can then implement to define a fetching strategy per entity role:</p>
<pre name="code" class="c-sharp">public interface IRegisterProductInCatalog : IEntityRole
{
  void RegisterProduct(string category,
         string productName, string productDescription);
}

public class RegisterProductInCatalogStrategy : IFetchingStrategy&lt;IRegisterProductInCatalog&gt;
{
  public string[] FetchList
  {
    get { return new[] { "Categories.Products" }; }
  }
}</pre>
<p>Now, it would be nice if I could get an easy access to those fetching strategies &#8230; well, that&#8217;s what you use an IoC container for <img src='http://blog.yoot.be/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  Here is the configuration of <strong>Castle&#8217;s Windsor</strong> container in <strong>NServiceBus endpoint&#8217;s configuration</strong> class:</p>
<pre name="code" class="c-sharp">public class EndpointConfig : IConfigureThisEndpoint, AsA_Server, IWantCustomInitialization
{
  public void Init()
  {
    var container = new WindsorContainer(new XmlInterpreter());

    Configure.With()
      .CastleWindsorBuilder(container)
      .XmlSerializer();

    container.Register(
      AllTypes
        .Of(typeof(IFetchingStrategy&lt;&gt;))
        .Pick(Configure.TypesToScan)
        .WithService.FirstInterface()
    );
  }
}</pre>
<p><strong>Fluent configuration</strong> for the <strong>Bus</strong> &amp; the <strong>Container</strong> ! Woohoo, my head is turning ! <img src='http://blog.yoot.be/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>Now, for the final part, the <strong>MessageHandler</strong> that makes use of all those cuties &amp; with the help some little extension methods:</p>
<pre name="code" class="c-sharp">public class ProductManager : IHandleMessages&lt;RegisterProductInCatalogRequest&gt;
{
  public virtual IBus Bus { get; set; }
  public virtual ISessionManager SessionManager { get; set; }
  public virtual IFetchingStrategy&lt;IRegisterProductInCatalog&gt; Strategy { get; set; }

  public virtual void Handle(RegisterProductInCatalogRequest message)
  {
    using (var session = SessionManager.OpenSession())
    {
      var catalog =
            session.For&lt;Catalog&gt;(message.CatalogId)
                   .Apply(Strategy)
                   .UniqueResult&lt;IRegisterProductInCatalog&gt;();

      catalog.RegisterProduct(message.CategoryName,
                              message.ProductName,
                              message.ProductDescription);
    }
  }
}</pre>
<p>I don&#8217;t know you, but that&#8217;s the kind of code that makes me happy (like a hippo). <img src='http://blog.yoot.be/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Comments, feedback, suggestions are all welcome ! <img src='http://blog.yoot.be/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<img src="http://feeds.feedburner.com/~r/Yoot/~4/6jo2YPBdTi0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.yoot.be/index.php/2009/10/12/stepping-onto-the-bus/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://blog.yoot.be/index.php/2009/10/12/stepping-onto-the-bus/</feedburner:origLink></item>
	</channel>
</rss>
