<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Living in the Tech Avalanche Generation</title>
	
	<link>http://www.simonsegal.net/blog</link>
	<description>A practitioner's introspective on technology</description>
	<pubDate>Wed, 11 Nov 2009 05:59:16 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/simonsegal/rQlV" type="application/rss+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>Debate Driven Development - (that 3 letter acronym is taken)</title>
		<link>http://feedproxy.google.com/~r/simonsegal/rQlV/~3/rfFUwZDSg0o/</link>
		<comments>http://www.simonsegal.net/blog/2009/11/11/debate-driven-development-that-3-letter-acronym-is-taken/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 05:59:16 +0000</pubDate>
		<dc:creator>Simon Segal</dc:creator>
		
		<category><![CDATA[Communication]]></category>

		<category><![CDATA[developers]]></category>

		<guid isPermaLink="false">http://www.simonsegal.net/blog/?p=576</guid>
		<description><![CDATA[I was reminded today of the value of debate, strongly held opinions and having the courage to let go of weakly held opinions. I like to think of the latter of these three as the ability to liberally contradict oneself when it becomes clear that a position held no longer seems able to be supported [...]]]></description>
			<content:encoded><![CDATA[<p>I was reminded today of the value of debate, strongly held opinions and having the courage to let go of weakly held opinions. I like to think of the latter of these three as the ability to liberally contradict oneself when it becomes clear that a position held no longer seems able to be supported and the only logical course is accepting another point of view which has stood up to the rigours or test of the debate.</p>
<p>The best experiences I have had always seem to take root in groups (even as small as two) where debate of ideas were frequent and encouraged. Further to that, protagonists exhibit an ability to come to the debate without ego and a willingness to leave a position previously held when the debates logical outcome cannot support their position. I have in the past witnessed what I call the &#8216;<em><strong>developers mother Teresa effect</strong></em>&#8216; where a developer will hold on to their position when all else seems lost, purely out of a need to save it&#8217;s soul.</p>
<p>What was fantastic about today&#8217;s debate was that it started out around a single issue and flowed into a much broader discussion that lead to a great number of issues and solutions that had not yet been considered much less understood. So what started as a debate over a single topic ended with an array of solutions to a number of issues that were previously hidden - a very positive outcome all in all. Along the way we argued (debated) our viewpoints strongly but never was their hint of <em><strong>dying for a cause</strong></em> borne out of it&#8217;s ownership. In some small way it reminded me of TDD, in the sense that as a group we were able navigate an outcome from testing our opinions and ideas, in the same vein as one discovers the design of code through testing.</p>
<p class="addtoany_share_save">
    <a name="a2a_dd" onmouseover="a2a_show_dropdown(this)" onmouseout="a2a_onMouseOut_delay()" href="http://www.addtoany.com/bookmark?sitename=Living%20in%20the%20Tech%20Avalanche%20Generation&amp;siteurl=http%3A%2F%2Fwww.simonsegal.net%2Fblog%2F&amp;linkname=Debate%20Driven%20Development%20-%20%28that%203%20letter%20acronym%20is%20taken%29&amp;linkurl=http%3A%2F%2Fwww.simonsegal.net%2Fblog%2F2009%2F11%2F11%2Fdebate-driven-development-that-3-letter-acronym-is-taken%2F"><img src="http://www.simonsegal.net/blog/wp-content/plugins/add-to-any/share_save_171_16.gif" width="171" height="16" border="0" alt="Share/Save/Bookmark"/></a>
    <script type="text/javascript">
		a2a_linkname="Debate Driven Development - (that 3 letter acronym is taken)";
		a2a_linkurl="http://www.simonsegal.net/blog/2009/11/11/debate-driven-development-that-3-letter-acronym-is-taken/";
				a2a_show_title=1;    </script>
    <script type="text/javascript" src="http://www.addtoany.com/menu/page.js"></script>

	</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=rfFUwZDSg0o:iwyrDL-rln8:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=rfFUwZDSg0o:iwyrDL-rln8:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=rfFUwZDSg0o:iwyrDL-rln8:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=rfFUwZDSg0o:iwyrDL-rln8:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=rfFUwZDSg0o:iwyrDL-rln8:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=rfFUwZDSg0o:iwyrDL-rln8:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=rfFUwZDSg0o:iwyrDL-rln8:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=rfFUwZDSg0o:iwyrDL-rln8:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=rfFUwZDSg0o:iwyrDL-rln8:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=rfFUwZDSg0o:iwyrDL-rln8:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=rfFUwZDSg0o:iwyrDL-rln8:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/simonsegal/rQlV/~4/rfFUwZDSg0o" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.simonsegal.net/blog/2009/11/11/debate-driven-development-that-3-letter-acronym-is-taken/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.simonsegal.net/blog/2009/11/11/debate-driven-development-that-3-letter-acronym-is-taken/</feedburner:origLink></item>
		<item>
		<title>Are desktop developers ignoring WPF at their peril?</title>
		<link>http://feedproxy.google.com/~r/simonsegal/rQlV/~3/zrKnTqq8vvs/</link>
		<comments>http://www.simonsegal.net/blog/2009/10/26/are-desktop-developers-ignoring-wpf-at-their-peril/#comments</comments>
		<pubDate>Sun, 25 Oct 2009 14:11:13 +0000</pubDate>
		<dc:creator>Simon Segal</dc:creator>
		
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://www.simonsegal.net/blog/2009/10/26/are-desktop-developers-ignoring-wpf-at-their-peril/</guid>
		<description><![CDATA[So is 2010 the year when WPF finally starts to make the big-time? Having spent some time now working with the new desktop framework, I find it unlikely that I will find a compelling enough reason to choose Windows Forms for a desktop UI technology choice again. 
So what’s holding it (WPF) back? I have [...]]]></description>
			<content:encoded><![CDATA[<p>So is 2010 the year when <a href="http://en.wikipedia.org/wiki/Windows_Presentation_Foundation" target="_blank">WPF</a> finally starts to make the big-time? Having spent some time now working with the new desktop framework, I find it unlikely that I will find a compelling enough reason to choose Windows Forms for a desktop UI technology choice again. </p>
<p>So what’s holding it (WPF) back? I have read and listened to a lot of stuff online suggesting it’s so complex that it’s turning people off the idea. So what about the issue of so called complexity? Of all the ‘<strong><u>W</u></strong>’ technology stacks to come out from Microsoft, I count <a href="http://en.wikipedia.org/wiki/Windows_Communication_Foundation" target="_blank">WCF</a> as the most complex and there certainly hasn’t been any overwhelming discussion about how that complexity has raised the barrier of entry, to the point where it’s slowed adoption. There seems to be an consistent message coming from the scribes, with constant reference to a new division of labour, shared by the trusty old developer and the so called ‘turtle necks’ (designers), a term that seems to be sticking and one I’m sure designers find <strike>amusing</strike> a pejorative one. And lets not forget the newest addition to the vernacular, the ‘<strong><em>Devigner</em></strong>’! There seems to be a lot of opinion and chatter that holds the opinion that UI design is no longer within our grasp as developers, unless we have enough right brain activity going on that we might be precluded from committing outrageous sins of the desktop.</p>
<p><a href="http://www.simonsegal.net/blog/wp-content/uploads/2009/10/stick2.png" target="_blank"><img style="border-bottom: 0px; border-left: 0px; margin: 0px 10px 0px 0px; display: inline; border-top: 0px; border-right: 0px" title="stick2" border="0" alt="stick2" align="left" src="http://www.simonsegal.net/blog/wp-content/uploads/2009/10/stick2-thumb.png" width="87" height="102" /></a> So here’s my take – I have written a few UI’s now in XAML based technology (SL and WPF) and I do not count myself as a designer or devigner. Perhaps I have some artistic flair (yeah I’m an arty type) in a general sense, but when it comes to graphics, I am pure stick figures all the way. I have been known to classify myself in the past as the patron saint of the graphically challenged! And yet I have now developed a couple of XAML User Interfaces where the User’s and my peers considered them to be ‘attractive’, self describing, efficient, simple to use, etc. Oh, and I still managed to do this all with my trusty old <a href="http://martinfowler.com/eaaDev/SupervisingPresenter.html" target="_blank">supervising controller</a> in tow.</p>
<p>So why didn’t I cower in corner somewhere at the prospect of building a XAML UI? Well it’s not in my nature for starters, but secondly I wasn’t prepared to believe the hype. Sure I did quite a bit of prototyping and experimentation but in the wash up, learning is doing and each time I do it I get better at it – sound familiar? By the way, I don’t think I was doing anything graphically amazing per`se, but some nice simple animations will go a long way even from the king of the stick men. </p>
<p>Here is what I advise: don’t be afraid of the technology. If you ever developed desktop applications in the past and considered yourself capable in designing a good user experience, then don’t buy into the scare mongering and be prepared to jump off the cliff.</p>
<p>I don’t doubt that there will be some small percentage of software teams that will bring on a dedicated designer(s) but I would hate to think that the small development teams out there will be put off venturing out into the brave new world. Yes there is a lot of complexity (particularly in WPF) and the learning curve is certainly not shallow by any means, but nothing good in life is easy. </p>
<p class="addtoany_share_save">
    <a name="a2a_dd" onmouseover="a2a_show_dropdown(this)" onmouseout="a2a_onMouseOut_delay()" href="http://www.addtoany.com/bookmark?sitename=Living%20in%20the%20Tech%20Avalanche%20Generation&amp;siteurl=http%3A%2F%2Fwww.simonsegal.net%2Fblog%2F&amp;linkname=Are%20desktop%20developers%20ignoring%20WPF%20at%20their%20peril%3F&amp;linkurl=http%3A%2F%2Fwww.simonsegal.net%2Fblog%2F2009%2F10%2F26%2Fare-desktop-developers-ignoring-wpf-at-their-peril%2F"><img src="http://www.simonsegal.net/blog/wp-content/plugins/add-to-any/share_save_171_16.gif" width="171" height="16" border="0" alt="Share/Save/Bookmark"/></a>
    <script type="text/javascript">
		a2a_linkname="Are desktop developers ignoring WPF at their peril?";
		a2a_linkurl="http://www.simonsegal.net/blog/2009/10/26/are-desktop-developers-ignoring-wpf-at-their-peril/";
				a2a_show_title=1;    </script>
    <script type="text/javascript" src="http://www.addtoany.com/menu/page.js"></script>

	</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=zrKnTqq8vvs:PE7F0O_JIoU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=zrKnTqq8vvs:PE7F0O_JIoU:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=zrKnTqq8vvs:PE7F0O_JIoU:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=zrKnTqq8vvs:PE7F0O_JIoU:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=zrKnTqq8vvs:PE7F0O_JIoU:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=zrKnTqq8vvs:PE7F0O_JIoU:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=zrKnTqq8vvs:PE7F0O_JIoU:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=zrKnTqq8vvs:PE7F0O_JIoU:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=zrKnTqq8vvs:PE7F0O_JIoU:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=zrKnTqq8vvs:PE7F0O_JIoU:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=zrKnTqq8vvs:PE7F0O_JIoU:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/simonsegal/rQlV/~4/zrKnTqq8vvs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.simonsegal.net/blog/2009/10/26/are-desktop-developers-ignoring-wpf-at-their-peril/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.simonsegal.net/blog/2009/10/26/are-desktop-developers-ignoring-wpf-at-their-peril/</feedburner:origLink></item>
		<item>
		<title>Update on SOA / DDD Course with Udi Dahan in Melbourne Australia</title>
		<link>http://feedproxy.google.com/~r/simonsegal/rQlV/~3/2tUrk22kdQE/</link>
		<comments>http://www.simonsegal.net/blog/2009/10/18/update-on-soa-ddd-course-with-udi-dahan-in-melbourne-australia/#comments</comments>
		<pubDate>Sun, 18 Oct 2009 00:36:20 +0000</pubDate>
		<dc:creator>Simon Segal</dc:creator>
		
		<category><![CDATA[DDD]]></category>

		<category><![CDATA[SOA]]></category>

		<category><![CDATA[Training]]></category>

		<guid isPermaLink="false">http://www.simonsegal.net/blog/2009/10/18/update-on-soa-ddd-course-with-udi-dahan-in-melbourne-australia/</guid>
		<description><![CDATA[Due to a rescheduling of this course there are now 3 seats available. If you missed out last time, registrations have now reopened for this limited number of seats. Please follow this link to register. The new date for the course is January 18th – 22nd 2010.

    
    
		a2a_linkname="Update [...]]]></description>
			<content:encoded><![CDATA[<p>Due to a rescheduling of this course there are now 3 seats available. If you missed out last time, registrations have now reopened for this limited number of seats. Please follow this <a href="http://www.udidahan.com/training/" target="_blank">link to register</a>. The new date for the course is January 18th – 22nd 2010.</p>
<p class="addtoany_share_save">
    <a name="a2a_dd" onmouseover="a2a_show_dropdown(this)" onmouseout="a2a_onMouseOut_delay()" href="http://www.addtoany.com/bookmark?sitename=Living%20in%20the%20Tech%20Avalanche%20Generation&amp;siteurl=http%3A%2F%2Fwww.simonsegal.net%2Fblog%2F&amp;linkname=Update%20on%20SOA%20%2F%20DDD%20Course%20with%20Udi%20Dahan%20in%20Melbourne%20Australia&amp;linkurl=http%3A%2F%2Fwww.simonsegal.net%2Fblog%2F2009%2F10%2F18%2Fupdate-on-soa-ddd-course-with-udi-dahan-in-melbourne-australia%2F"><img src="http://www.simonsegal.net/blog/wp-content/plugins/add-to-any/share_save_171_16.gif" width="171" height="16" border="0" alt="Share/Save/Bookmark"/></a>
    <script type="text/javascript">
		a2a_linkname="Update on SOA / DDD Course with Udi Dahan in Melbourne Australia";
		a2a_linkurl="http://www.simonsegal.net/blog/2009/10/18/update-on-soa-ddd-course-with-udi-dahan-in-melbourne-australia/";
				a2a_show_title=1;    </script>
    <script type="text/javascript" src="http://www.addtoany.com/menu/page.js"></script>

	</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=2tUrk22kdQE:b9KOOwRW9kQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=2tUrk22kdQE:b9KOOwRW9kQ:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=2tUrk22kdQE:b9KOOwRW9kQ:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=2tUrk22kdQE:b9KOOwRW9kQ:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=2tUrk22kdQE:b9KOOwRW9kQ:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=2tUrk22kdQE:b9KOOwRW9kQ:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=2tUrk22kdQE:b9KOOwRW9kQ:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=2tUrk22kdQE:b9KOOwRW9kQ:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=2tUrk22kdQE:b9KOOwRW9kQ:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=2tUrk22kdQE:b9KOOwRW9kQ:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=2tUrk22kdQE:b9KOOwRW9kQ:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/simonsegal/rQlV/~4/2tUrk22kdQE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.simonsegal.net/blog/2009/10/18/update-on-soa-ddd-course-with-udi-dahan-in-melbourne-australia/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.simonsegal.net/blog/2009/10/18/update-on-soa-ddd-course-with-udi-dahan-in-melbourne-australia/</feedburner:origLink></item>
		<item>
		<title>Inspirational people in Software</title>
		<link>http://feedproxy.google.com/~r/simonsegal/rQlV/~3/yQBpDyEO2s0/</link>
		<comments>http://www.simonsegal.net/blog/2009/10/11/inspirational-people-in-software/#comments</comments>
		<pubDate>Sun, 11 Oct 2009 02:01:55 +0000</pubDate>
		<dc:creator>Simon Segal</dc:creator>
		
		<category><![CDATA[Career]]></category>

		<guid isPermaLink="false">http://www.simonsegal.net/blog/2009/10/11/inspirational-people-in-software/</guid>
		<description><![CDATA[Recently K. Scott Allen posted on the inspirational effect of books on software developers and so I mentality sifted through my memory in an attempt to find one that I could say really had that effect on me. My first problem was finding a definition for ‘Inspiration’. I am going to take some artistic license [...]]]></description>
			<content:encoded><![CDATA[<p>Recently K. Scott Allen <a href="http://odetocode.com/Blogs/scott/archive/2009/10/07/inspirational-books-in-software-development.aspx" target="_blank">posted</a> on the inspirational effect of books on software developers and so I mentality sifted through my memory in an attempt to find one that I could say really had that effect on me. My first problem was finding a definition for <strong><em>‘Inspiration’</em></strong>. I am going to take some artistic license here and avoid any accepted dictionary definitions and lean on my own personal experiences to assign a meaning and value to <em><strong>‘Inspiration’</strong></em>.</p>
<p>In the past when I have been inspired it has always had a cause and effect relationship, I get inspired to *act* for a given cause or outcome. Sometimes this is a private affair and other times it’s a shared experience, nonetheless it’s always rooted in action, the effects of which are distinguished by a *reaction* (hopefully positive) from myself and other people with whom I interact.</p>
<p>There have been a few people along the way during my career in software development that have inspired me, some whom I have had the pleasure to meet and others whose teachings and ideas I have followed. In each case I have indeed been inspired to learn and grow. I have also had the privilege of working in groups where the individuals within were able to inspire each other through sharing a common goal. The latter of these types of experience I have found anecdotally to be increasing in frequency with respect to software development. It goes without saying that when I had a career in music this was far more commonplace.</p>
<p>K. Scott remarked in his <a href="http://odetocode.com/Blogs/scott/archive/2009/10/07/inspirational-books-in-software-development.aspx" target="_blank">post</a> that:</p>
<blockquote><p>“An inspirational book, in my mind, transcends any specific technology and makes you think differently about how you approach your job.”</p></blockquote>
<p>a statement that for me rings true for any form of inspiration, whether it comes from books or other sources. I remember in my days as a music recording engineer / producer, I worked with artists and drew on the teachings <a href="http://en.wikipedia.org/wiki/Constantin_Stanislavski">Constantin Stanislavski</a> (the father of <a href="http://en.wikipedia.org/wiki/Method_acting" target="_blank">method acting</a>) to provide inspiration for character portrayal in live performance.</p>
<p>So what about you? Who inspires you? BTW, that’s a rhetorical question unless you see fit to share your answer.</p>
<p class="addtoany_share_save">
    <a name="a2a_dd" onmouseover="a2a_show_dropdown(this)" onmouseout="a2a_onMouseOut_delay()" href="http://www.addtoany.com/bookmark?sitename=Living%20in%20the%20Tech%20Avalanche%20Generation&amp;siteurl=http%3A%2F%2Fwww.simonsegal.net%2Fblog%2F&amp;linkname=Inspirational%20people%20in%20Software&amp;linkurl=http%3A%2F%2Fwww.simonsegal.net%2Fblog%2F2009%2F10%2F11%2Finspirational-people-in-software%2F"><img src="http://www.simonsegal.net/blog/wp-content/plugins/add-to-any/share_save_171_16.gif" width="171" height="16" border="0" alt="Share/Save/Bookmark"/></a>
    <script type="text/javascript">
		a2a_linkname="Inspirational people in Software";
		a2a_linkurl="http://www.simonsegal.net/blog/2009/10/11/inspirational-people-in-software/";
				a2a_show_title=1;    </script>
    <script type="text/javascript" src="http://www.addtoany.com/menu/page.js"></script>

	</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=yQBpDyEO2s0:pLel2VFZIRw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=yQBpDyEO2s0:pLel2VFZIRw:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=yQBpDyEO2s0:pLel2VFZIRw:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=yQBpDyEO2s0:pLel2VFZIRw:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=yQBpDyEO2s0:pLel2VFZIRw:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=yQBpDyEO2s0:pLel2VFZIRw:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=yQBpDyEO2s0:pLel2VFZIRw:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=yQBpDyEO2s0:pLel2VFZIRw:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=yQBpDyEO2s0:pLel2VFZIRw:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=yQBpDyEO2s0:pLel2VFZIRw:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=yQBpDyEO2s0:pLel2VFZIRw:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/simonsegal/rQlV/~4/yQBpDyEO2s0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.simonsegal.net/blog/2009/10/11/inspirational-people-in-software/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.simonsegal.net/blog/2009/10/11/inspirational-people-in-software/</feedburner:origLink></item>
		<item>
		<title>A Linq To SQL Saga Persister for NServiceBus</title>
		<link>http://feedproxy.google.com/~r/simonsegal/rQlV/~3/mG3WXb_DecE/</link>
		<comments>http://www.simonsegal.net/blog/2009/09/22/a-linq-to-sql-saga-persister-for-nservicebus/#comments</comments>
		<pubDate>Mon, 21 Sep 2009 14:31:54 +0000</pubDate>
		<dc:creator>Simon Segal</dc:creator>
		
		<category><![CDATA[Entity Framework]]></category>

		<category><![CDATA[LINQ To SQL]]></category>

		<category><![CDATA[NServiceBus]]></category>

		<guid isPermaLink="false">http://www.simonsegal.net/blog/2009/09/22/a-linq-to-sql-saga-persister-for-nservicebus/</guid>
		<description><![CDATA[NServiceBus is becoming a very popular Open Source development framework and out of the box it supports some very elegant feature extensibility points (thanks Udi) that have been designed very deliberately in a technology agnostic way. This allows us as developers to write our own implementations of certain features in the technology of our choice, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.nservicebus.com/" target="_blank">NServiceBus</a> is becoming a very popular Open Source development framework and out of the box it supports some very elegant feature extensibility points (thanks Udi) that have been designed very deliberately in a technology agnostic way. This allows us as developers to write our own implementations of certain features in the technology of our choice, and the subject of this post focuses on extending the <a href="http://www.udidahan.com/2009/04/20/saga-persistence-and-event-driven-architectures/" target="_blank">Saga Persister</a>. However at this point let me just say that it may well be worth your while to read <a href="http://www.udidahan.com/2009/04/20/saga-persistence-and-event-driven-architectures/" target="_blank">Udi’s post</a> on Saga’s before continuing and then come back here to finish.</p>
<h3><span style="text-decoration: underline;">The Saga Persister</span></h3>
<p>It may be premature to discuss the Saga Persister without first touching on that which begat it, namely the Saga. I like to think of Saga’s as a long running stateful services, with methods for entry points that handle messages. You can also think of a Saga as a class that contains a set of methods, each one handling a different message type, where the entire Saga, it’s methods and all the logic contained within, accomplish a set of work over time. These methods make up the <em><strong>contract</strong></em> of what is ultimately a stateful service. For a lengthy discussion of Saga’s I recommend reading more from Udi <a href="http://www.udidahan.com/2009/04/20/saga-persistence-and-event-driven-architectures/" target="_blank">here</a>. In the meantime here’s a somewhat elided example:</p>
<div>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #0000ff;">public</span> <span style="color: #0000ff;">class</span> RequestLeaveSaga : Saga&lt;RequestLeaveSagaData&gt;,
        ISagaStartedBy&lt;IAnnualLeaveRequest&gt;,
        IMessageHandler&lt;IAuthorizationForAnnualLeaveResponse&gt;,
        IMessageHandler&lt;ICancelAnnualLeaveRequest&gt;
{
    <span style="color: #0000ff;">public</span> <span style="color: #0000ff;">override</span> <span style="color: #0000ff;">void</span> Timeout(<span style="color: #0000ff;">object</span> state)
    {
        <span style="color: #008000;">//&#8230;timeout logic here</span>
    }

    <span style="color: #0000ff;">public</span> <span style="color: #0000ff;">void</span> Handle(IAnnualLeaveRequest message)
    {
        Data.Id = Guid.NewGuid();
        Data.LeaveRequestId = message.LeaveRequestId;
        Data.EmployeeId = message.EmployeeId;

        var leaveRequestForAuthorization =
            Bus.CreateInstance&lt;IReqeustingAnnualLeaveAuthorization&gt;(
            m =&gt;
                {
                    m.EmployeeId = message.EmployeeId;
                    m.FirstDayOfLeave = message.LeaveStartsAt;
                    m.NumberOfDaysRequested =
                        Data.CalculateDays(message.LeaveStartsAt,
                            message.LeaveEndsAt);
                    m.TimeOfRequestSubmission = message.TimeOfRequest;
                    m.SagaId = Data.Id;
                });
        Bus.Send(leaveRequestForAuthorization);
    }

    <span style="color: #0000ff;">public</span> <span style="color: #0000ff;">void</span> Handle(IAuthorizationForAnnualLeaveResponse message)
    {
        <span style="color: #008000;">//&#8230;handles the response message from a HR authorization service</span>
    }

    <span style="color: #0000ff;">public</span> <span style="color: #0000ff;">void</span> Handle(ICancelAnnualLeaveRequest message)
    {
        <span style="color: #008000;">//&#8230;handles cancel message to invalidate the request for leave</span>
    }
}</pre>
</div>
<p>The key to understanding the Saga Persister is linked directly to the statefulness of the Saga itself, where the job of the persister is to initially hydrate the Saga’s  state to storage (persistent or otherwise), so that when one of it’s subsequent message handlers (methods in its contract) are called, it can be re-hydrated from the storage. Saga’s contain a property named <strong><em>Data</em></strong>, which we can see (above) has been referred to in the body of the Handle method for the <strong><em>IAnnualLeaveRequest</em></strong> message. The underlying type for the Data property is determined generically in the signature for Saga&lt;T&gt; where T is an <strong><em>ISagaEntity</em></strong>. When persisting Saga state (to storage), NServiceBus will use the values it finds in the instance of &lt;T&gt; (the <em><strong>ISagaEntity </strong></em>reference in the <strong><em>Data</em></strong> property).</p>
<p>To better understand how this works lets look at the details specified in configuration of the Bus using the NServiceBus fluent interface for configuration, which resides in the process hosting the Saga. The following example is derived from the configuration of the Bus as demonstrated in the NServiceBus <strong>“Manufacturing”</strong> sample project.  In this example (below) I have substituted the “out of the box” persister (backed by NHibernate) with a Linq To SQL implementation.</p>
<div>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #0000ff;">try</span>
{
    DataContext sessionFactory = GetContext();

    var bus = NServiceBus.Configure.With()
        .SpringBuilder(
            (cfg =&gt;
            {
                cfg.ConfigureComponent&lt;OrderSagaFinder&gt;
                    (ComponentCallModelEnum.None)
                    .SessionFactory = sessionFactory;
            }))
        .XmlSerializer()
        .MsmqTransport()
            .IsTransactional(<span style="color: #0000ff;">true</span>)
            .PurgeOnStartup(<span style="color: #0000ff;">false</span>)
        .DbSubscriptionStorage()
            .Table(<span style="color: #006080;">&#8220;Subscriptions&#8221;</span>)
            .SubscriberEndpointColumnName(<span style="color: #006080;">&#8220;SubscriberEndpoint&#8221;</span>)
            .MessageTypeColumnName(<span style="color: #006080;">&#8220;MessageType&#8221;</span>)
        .Sagas()
        .LinqToSqlSagaPersister&lt;OrderSagaData&gt;(sessionFactory)
        .UnicastBus()
            .ImpersonateSender(<span style="color: #0000ff;">false</span>)
            .LoadMessageHandlers(
                First&lt;GridInterceptingMessageHandler&gt;
                    .Then&lt;SagaMessageHandler&gt;()
             )
        .CreateBus()
        .Start();
}
<span style="color: #0000ff;">catch</span> (Exception e)
{
    LogManager.GetLogger(<span style="color: #006080;">&#8220;hello&#8221;</span>).Fatal(<span style="color: #006080;">&#8220;Exiting&#8221;</span>, e);
}</pre>
</div>
<p>There are two main areas of this configuration code that we should focus on. Firstly when we configure the nominated Inversion of Control container we can specify which Saga Finder to have configured and inject the required LINQ To SQL DataContext. Further down in this usage of the fluent interface I have specified that this endpoint supports Sagas and that they should use the LINQ To SQL Saga Persister and also that the same DataContext should be injected.</p>
<div>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">.Sagas()
.LinqToSqlSagaPersister&lt;OrderSagaData&gt;(sessionFactory)</pre>
</div>
<div>
</div>
<div>Another extensibility point that needs to be addressed in order for the <em><strong>LinqToSqlSagaPersister</strong></em> to show up in the fluent interface API, demands that an implementation of an Extension Method is required for any new custom persister. Let’s look at the Extension method that makes the <strong><em>LinqToSqlSagaPersister</em></strong> available:</div>
<div>
</div>
<div>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #0000ff;">namespace</span> NServiceBus
{
    <span style="color: #0000ff;">public</span> <span style="color: #0000ff;">static</span> <span style="color: #0000ff;">class</span> ConfigureLinqToSqlSagaPersister
    {
        <span style="color: #0000ff;">public</span> <span style="color: #0000ff;">static</span> Configure LinqToSqlSagaPersister&lt;T&gt;(<span style="color: #0000ff;">this</span> Configure config,
            DataContext sessionFactory) <span style="color: #0000ff;">where</span> T : <span style="color: #0000ff;">class</span>, ISagaEntity
        {
            config.Configurer
                .ConfigureComponent&lt;LinqToSqlSagaPersister&lt;T&gt;&gt;
                        (ComponentCallModelEnum.Singlecall)
                .SessionFactory = sessionFactory;

            <span style="color: #0000ff;">return</span> config;
        }
    }
}</pre>
</div>
<div>
</div>
<div>Out of the box NServiceBus comes with an NHibernate backed Saga Persister that developers can freely use with very predictable and stable results. However, its possible that you may wish to implement your own persister based on your favourite ORM technology or alternate storage.</div>
<h3><span style="text-decoration: underline;">Implement an Interface</span></h3>
<p>To create your custom Saga Persister you will need to implement an interface found in the NServiceBus library, unsurprisingly this Interface is named ISagaPersister and has four method signatures that make up it’s contract definition.</p>
<div>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #0000ff;">public</span> <span style="color: #0000ff;">class</span> LinqToSqlSagaPersister&lt;T&gt; :
        ISagaPersister <span style="color: #0000ff;">where</span> T : <span style="color: #0000ff;">class</span>, ISagaEntity
{
    <span style="color: #0000ff;">public</span> <span style="color: #0000ff;">void</span> Complete(ISagaEntity saga)
    {
        SessionFactory.GetTable&lt;T&gt;().DeleteOnSubmit(saga <span style="color: #0000ff;">as</span> T);
        SessionFactory.SubmitChanges();
    }

    <span style="color: #0000ff;">public</span> ISagaEntity Get(Guid sagaId)
    {
        <span style="color: #0000ff;">return</span> SessionFactory.GetTable&lt;T&gt;()
            .Where(s =&gt; s.Id == sagaId).Single();
    }

    <span style="color: #0000ff;">public</span> <span style="color: #0000ff;">void</span> Save(ISagaEntity saga)
    {
        SessionFactory.GetTable&lt;T&gt;().InsertOnSubmit(saga <span style="color: #0000ff;">as</span> T);
        SessionFactory.SubmitChanges();
    }

    <span style="color: #0000ff;">public</span> <span style="color: #0000ff;">void</span> Update(ISagaEntity saga)
    {
        SessionFactory.SubmitChanges();
    }

    <span style="color: #0000ff;">public</span> <span style="color: #0000ff;">virtual</span> DataContext SessionFactory { get; set; }
}</pre>
</div>
<p>The four methods of an ISagaPersister are responsible for interacting with the persistence store by getting a Saga entity by it’s ID, updating an existing saga entity, saving a saga entity and setting a saga as completed and removing it from the active saga list.</p>
<h3><span style="text-decoration: underline;">The Mapping File</span></h3>
<p>In order to Map the ISagaEntity to the database tables we can take advantage of the fact that LINQ To SQL supports POCO’s and simply map our entities as required.</p>
<div>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #0000ff;">&lt;?</span><span style="color: #800000;">xml</span> <span style="color: #ff0000;">version</span><span style="color: #0000ff;">=&#8221;1.0&#8243;</span> <span style="color: #ff0000;">encoding</span><span style="color: #0000ff;">=&#8221;utf-8&#8243;</span>?<span style="color: #0000ff;">&gt;</span>
<span style="color: #0000ff;">&lt;</span><span style="color: #800000;">Database</span> <span style="color: #ff0000;">Name</span><span style="color: #0000ff;">=&#8221;Sagas&#8221;</span>
          <span style="color: #ff0000;">xmlns</span><span style="color: #0000ff;">=&#8221;http://schemas.microsoft.com/linqtosql/mapping/2007&#8243;</span><span style="color: #0000ff;">&gt;</span>
  <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">Table</span> <span style="color: #ff0000;">Name</span><span style="color: #0000ff;">=&#8221;dbo.OrderSagaData&#8221;</span> <span style="color: #ff0000;">Member</span><span style="color: #0000ff;">=&#8221;OrderSagaData&#8221;</span><span style="color: #0000ff;">&gt;</span>
    <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">Type</span> <span style="color: #ff0000;">Name</span><span style="color: #0000ff;">=&#8221;OrderService.OrderSagaData&#8221;</span><span style="color: #0000ff;">&gt;</span>
      <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">Column</span> <span style="color: #ff0000;">Name</span><span style="color: #0000ff;">=&#8221;Id&#8221;</span> <span style="color: #ff0000;">Member</span><span style="color: #0000ff;">=&#8221;Id&#8221;</span> <span style="color: #ff0000;">DbType</span><span style="color: #0000ff;">=&#8221;UniqueIdentifier NOT NULL&#8221;</span>
              <span style="color: #ff0000;">IsPrimaryKey</span><span style="color: #0000ff;">=&#8221;true&#8221;</span> <span style="color: #ff0000;">CanBeNull</span><span style="color: #0000ff;">=&#8221;false&#8221;</span> <span style="color: #0000ff;">/&gt;</span>
      <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">Column</span> <span style="color: #ff0000;">Name</span><span style="color: #0000ff;">=&#8221;Originator&#8221;</span> <span style="color: #ff0000;">Member</span><span style="color: #0000ff;">=&#8221;Originator&#8221;</span>
              <span style="color: #ff0000;">DbType</span><span style="color: #0000ff;">=&#8221;VarChar(50)&#8221;</span> <span style="color: #ff0000;">CanBeNull</span><span style="color: #0000ff;">=&#8221;true&#8221;</span> <span style="color: #0000ff;">/&gt;</span>
      <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">Column</span> <span style="color: #ff0000;">Name</span><span style="color: #0000ff;">=&#8221;PurchaseOrderNumber&#8221;</span> <span style="color: #ff0000;">Member</span><span style="color: #0000ff;">=&#8221;PurchaseOrderNumber&#8221;</span>
              <span style="color: #ff0000;">DbType</span><span style="color: #0000ff;">=&#8221;VarChar(50) NOT NULL&#8221;</span> <span style="color: #ff0000;">CanBeNull</span><span style="color: #0000ff;">=&#8221;false&#8221;</span> <span style="color: #0000ff;">/&gt;</span>
      <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">Column</span> <span style="color: #ff0000;">Name</span><span style="color: #0000ff;">=&#8221;PartnerId&#8221;</span> <span style="color: #ff0000;">Member</span><span style="color: #0000ff;">=&#8221;PartnerId&#8221;</span>
              <span style="color: #ff0000;">DbType</span><span style="color: #0000ff;">=&#8221;UniqueIdentifier NOT NULL&#8221;</span> <span style="color: #ff0000;">CanBeNull</span><span style="color: #0000ff;">=&#8221;false&#8221;</span> <span style="color: #0000ff;">/&gt;</span>
      <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">Column</span> <span style="color: #ff0000;">Name</span><span style="color: #0000ff;">=&#8221;ProvideBy&#8221;</span> <span style="color: #ff0000;">Member</span><span style="color: #0000ff;">=&#8221;ProvideBy&#8221;</span>
              <span style="color: #ff0000;">DbType</span><span style="color: #0000ff;">=&#8221;DateTime NOT NULL&#8221;</span> <span style="color: #ff0000;">CanBeNull</span><span style="color: #0000ff;">=&#8221;false&#8221;</span> <span style="color: #0000ff;">/&gt;</span>
      <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">Association</span> <span style="color: #ff0000;">Name</span><span style="color: #0000ff;">=&#8221;OrderSagaData_OrderSagaDataLine&#8221;</span> <span style="color: #ff0000;">Member</span><span style="color: #0000ff;">=&#8221;Lines&#8221;</span>
              <span style="color: #ff0000;">ThisKey</span><span style="color: #0000ff;">=&#8221;Id&#8221;</span> <span style="color: #ff0000;">OtherKey</span><span style="color: #0000ff;">=&#8221;OrderSagaDataId&#8221;</span>
              <span style="color: #ff0000;">Storage</span><span style="color: #0000ff;">=&#8221;_orderLines&#8221;</span><span style="color: #0000ff;">/&gt;</span>
    <span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">Type</span><span style="color: #0000ff;">&gt;</span>
  <span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">Table</span><span style="color: #0000ff;">&gt;</span>
  <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">Table</span> <span style="color: #ff0000;">Name</span><span style="color: #0000ff;">=&#8221;dbo.OrderSagaDataLines&#8221;</span> <span style="color: #ff0000;">Member</span><span style="color: #0000ff;">=&#8221;OrderSagaDataLines&#8221;</span><span style="color: #0000ff;">&gt;</span>
    <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">Type</span> <span style="color: #ff0000;">Name</span><span style="color: #0000ff;">=&#8221;OrderService.OrderLine&#8221;</span><span style="color: #0000ff;">&gt;</span>
      <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">Column</span> <span style="color: #ff0000;">Name</span><span style="color: #0000ff;">=&#8221;Id&#8221;</span> <span style="color: #ff0000;">Member</span><span style="color: #0000ff;">=&#8221;Id&#8221;</span> <span style="color: #ff0000;">DbType</span><span style="color: #0000ff;">=&#8221;UniqueIdentifier NOT NULL&#8221;</span>
              <span style="color: #ff0000;">IsPrimaryKey</span><span style="color: #0000ff;">=&#8221;true&#8221;</span> <span style="color: #ff0000;">CanBeNull</span><span style="color: #0000ff;">=&#8221;false&#8221;</span> <span style="color: #0000ff;">/&gt;</span>
      <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">Column</span> <span style="color: #ff0000;">Name</span><span style="color: #0000ff;">=&#8221;OrderSagaDataId&#8221;</span> <span style="color: #ff0000;">Member</span><span style="color: #0000ff;">=&#8221;OrderSagaDataId&#8221;</span>
              <span style="color: #ff0000;">DbType</span><span style="color: #0000ff;">=&#8221;UniqueIdentifier NOT NULL&#8221;</span> <span style="color: #ff0000;">CanBeNull</span><span style="color: #0000ff;">=&#8221;false&#8221;</span> <span style="color: #0000ff;">/&gt;</span>
      <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">Column</span> <span style="color: #ff0000;">Name</span><span style="color: #0000ff;">=&#8221;ProductId&#8221;</span> <span style="color: #ff0000;">Member</span><span style="color: #0000ff;">=&#8221;ProductId&#8221;</span>
              <span style="color: #ff0000;">DbType</span><span style="color: #0000ff;">=&#8221;UniqueIdentifier NOT NULL&#8221;</span> <span style="color: #ff0000;">CanBeNull</span><span style="color: #0000ff;">=&#8221;false&#8221;</span> <span style="color: #0000ff;">/&gt;</span>
      <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">Column</span> <span style="color: #ff0000;">Name</span><span style="color: #0000ff;">=&#8221;Quantity&#8221;</span> <span style="color: #ff0000;">Member</span><span style="color: #0000ff;">=&#8221;Quantity&#8221;</span>
              <span style="color: #ff0000;">DbType</span><span style="color: #0000ff;">=&#8221;Float NOT NULL&#8221;</span> <span style="color: #ff0000;">CanBeNull</span><span style="color: #0000ff;">=&#8221;false&#8221;</span> <span style="color: #0000ff;">/&gt;</span>
      <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">Column</span> <span style="color: #ff0000;">Name</span><span style="color: #0000ff;">=&#8221;AuthorizedQuantity&#8221;</span> <span style="color: #ff0000;">Member</span><span style="color: #0000ff;">=&#8221;AuthorizedQuantity&#8221;</span>
              <span style="color: #ff0000;">DbType</span><span style="color: #0000ff;">=&#8221;Float NOT NULL&#8221;</span> <span style="color: #ff0000;">CanBeNull</span><span style="color: #0000ff;">=&#8221;false&#8221;</span> <span style="color: #0000ff;">/&gt;</span>
      <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">Association</span> <span style="color: #ff0000;">Name</span><span style="color: #0000ff;">=&#8221;OrderSagaData_OrderSagaDataLine&#8221;</span> <span style="color: #ff0000;">Member</span><span style="color: #0000ff;">=&#8221;Order&#8221;</span>
              <span style="color: #ff0000;">ThisKey</span><span style="color: #0000ff;">=&#8221;OrderSagaDataId&#8221;</span> <span style="color: #ff0000;">OtherKey</span><span style="color: #0000ff;">=&#8221;Id&#8221;</span>
              <span style="color: #ff0000;">IsForeignKey</span><span style="color: #0000ff;">=&#8221;true&#8221;</span> <span style="color: #ff0000;">Storage</span><span style="color: #0000ff;">=&#8221;_order&#8221;</span> <span style="color: #0000ff;">/&gt;</span>
    <span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">Type</span><span style="color: #0000ff;">&gt;</span>
  <span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">Table</span><span style="color: #0000ff;">&gt;</span>
<span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">Database</span><span style="color: #0000ff;">&gt;</span></pre>
</div>
<p>To make the mapping file work with the DataContext instantiation we need to do something like the following:</p>
<div>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #0000ff;">private</span> <span style="color: #0000ff;">static</span> DataContext GetContext()
{
    StreamReader sr =
        <span style="color: #0000ff;">new</span> StreamReader(<span style="color: #006080;">&#8220;D:\\SagaL2SMapping.xml&#8221;</span>);

    <span style="color: #008000;">//set the mapping source up</span>
    XmlMappingSource mapping = XmlMappingSource.FromStream(sr.BaseStream);

    DataContext db = <span style="color: #0000ff;">null</span>;

    <span style="color: #008000;">//new up a persistance repository</span>
    db = <span style="color: #0000ff;">new</span> DataContext(<span style="color: #006080;">&#8220;Data Source=BOOMER\\BOOM09;initial &#8220;</span> +
                        <span style="color: #006080;">&#8220;catalog=Sagas;user id=sa;password=supremo&#8221;</span>,
                         mapping);

    var loadopts = <span style="color: #0000ff;">new</span> DataLoadOptions();
    loadopts.LoadWith&lt;OrderSagaData&gt;(o =&gt; o.Lines);
    db.LoadOptions = loadopts;
    db.DeferredLoadingEnabled = <span style="color: #0000ff;">false</span>;

    db.Log = <span style="color: #0000ff;">new</span> DebuggerTextWriter();

    <span style="color: #0000ff;">return</span> db;
}</pre>
</div>
<h3><span style="text-decoration: underline;">The Saga Finder</span></h3>
<p>The final part of the puzzle is the Saga Finder which is dealt with by implementing the class <strong><em>IFindSagas&lt;T&gt;. </em></strong>The <strong><em>IFindSagas</em></strong> class contains a nested interface <strong><em>Using&lt;M&gt;</em></strong> which indicates to NServiceBus that implementers of <strong><em>IFindSagas&lt;T&gt;</em></strong> have the ability to find saga’s of the type <strong><em>&lt;T&gt;</em></strong> where the message being handled is of type <strong><em>&lt;M&gt;</em></strong>. Once again using the “<strong><em>manufacturing</em></strong>” sample from the NServiceBus download, I have implemented a Saga Finder using LINQ To SQL:</p>
<div>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #0000ff;">public</span> <span style="color: #0000ff;">class</span> OrderSagaFinder :
    IFindSagas&lt;OrderSagaData&gt;.Using&lt;OrderMessage&gt;,
    IFindSagas&lt;OrderSagaData&gt;.Using&lt;CancelOrderMessage&gt;
{
    <span style="color: #0000ff;">public</span> OrderSagaData FindBy(OrderMessage message)
    {
        <span style="color: #0000ff;">return</span> FindBy(message.PurchaseOrderNumber, message.PartnerId);
    }

    <span style="color: #0000ff;">public</span> OrderSagaData FindBy(CancelOrderMessage message)
    {
        <span style="color: #0000ff;">return</span> FindBy(message.PurchaseOrderNumber, message.PartnerId);
    }

    <span style="color: #0000ff;">public</span> OrderSagaData FindBy(<span style="color: #0000ff;">string</span> purchaseOrderNumber, Guid partnerId)
    {
        <span style="color: #0000ff;">return</span> sessionFactory.GetTable&lt;OrderSagaData&gt;().Where(
            o =&gt; o.PurchaseOrderNumber == purchaseOrderNumber &amp;&amp;
                o.PartnerId == partnerId).FirstOrDefault();
    }

    <span style="color: #0000ff;">private</span> DataContext sessionFactory;

    <span style="color: #0000ff;">public</span> <span style="color: #0000ff;">virtual</span> DataContext SessionFactory
    {
        get { <span style="color: #0000ff;">return</span> sessionFactory; }
        set { sessionFactory = <span style="color: #0000ff;">value</span>; }
    }
}</pre>
</div>
<p>The <strong><em>Using&lt;M&gt;</em></strong> interface in NServiceBus specifies a single method in it’s signature, which you probably guessed is:</p>
<div>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">T FindBy(M message)</pre>
</div>
<div>
</div>
<div>I hope this helps if your interested in implementing your own Saga Persister and I recommend that you read Udi’s post on Saga’s and play with the sample from the <a href="http://www.nservicebus.com/Downloads.aspx" target="_blank">NServiceBus download</a> to get a better idea about their uses.</div>
<div>
</div>
<div>For those interested I will be following up soon with an Entity Framework persister in a subsequent post however please note it will only be compatible with V 4.0 of Entity Framework (due to the lack of POCO support in the current version).</div>
<p class="addtoany_share_save">
    <a name="a2a_dd" onmouseover="a2a_show_dropdown(this)" onmouseout="a2a_onMouseOut_delay()" href="http://www.addtoany.com/bookmark?sitename=Living%20in%20the%20Tech%20Avalanche%20Generation&amp;siteurl=http%3A%2F%2Fwww.simonsegal.net%2Fblog%2F&amp;linkname=A%20Linq%20To%20SQL%20Saga%20Persister%20for%20NServiceBus&amp;linkurl=http%3A%2F%2Fwww.simonsegal.net%2Fblog%2F2009%2F09%2F22%2Fa-linq-to-sql-saga-persister-for-nservicebus%2F"><img src="http://www.simonsegal.net/blog/wp-content/plugins/add-to-any/share_save_171_16.gif" width="171" height="16" border="0" alt="Share/Save/Bookmark"/></a>
    <script type="text/javascript">
		a2a_linkname="A Linq To SQL Saga Persister for NServiceBus";
		a2a_linkurl="http://www.simonsegal.net/blog/2009/09/22/a-linq-to-sql-saga-persister-for-nservicebus/";
				a2a_show_title=1;    </script>
    <script type="text/javascript" src="http://www.addtoany.com/menu/page.js"></script>

	</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=mG3WXb_DecE:fVQ5xm1L1O8:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=mG3WXb_DecE:fVQ5xm1L1O8:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=mG3WXb_DecE:fVQ5xm1L1O8:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=mG3WXb_DecE:fVQ5xm1L1O8:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=mG3WXb_DecE:fVQ5xm1L1O8:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=mG3WXb_DecE:fVQ5xm1L1O8:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=mG3WXb_DecE:fVQ5xm1L1O8:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=mG3WXb_DecE:fVQ5xm1L1O8:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=mG3WXb_DecE:fVQ5xm1L1O8:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=mG3WXb_DecE:fVQ5xm1L1O8:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=mG3WXb_DecE:fVQ5xm1L1O8:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/simonsegal/rQlV/~4/mG3WXb_DecE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.simonsegal.net/blog/2009/09/22/a-linq-to-sql-saga-persister-for-nservicebus/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.simonsegal.net/blog/2009/09/22/a-linq-to-sql-saga-persister-for-nservicebus/</feedburner:origLink></item>
		<item>
		<title>SOA and DDD Course with Udi Dahan in Australia 09 is now FULL</title>
		<link>http://feedproxy.google.com/~r/simonsegal/rQlV/~3/By1RcTWfjTM/</link>
		<comments>http://www.simonsegal.net/blog/2009/09/12/soa-and-ddd-course-with-udi-dahan-in-australia-09-is-now-full/#comments</comments>
		<pubDate>Sat, 12 Sep 2009 07:49:52 +0000</pubDate>
		<dc:creator>Simon Segal</dc:creator>
		
		<category><![CDATA[Training]]></category>

		<guid isPermaLink="false">http://www.simonsegal.net/blog/2009/09/12/soa-and-ddd-course-with-udi-dahan-in-australia-09-is-now-full/</guid>
		<description><![CDATA[I have been busy helping to organise and plan Udi’s course for October ‘09 in Melbourne Australia and if you have been following the event announcements here you should know that it is now full with no more seats available. Thanks to everyone who has committed to attend we are all looking forward to a [...]]]></description>
			<content:encoded><![CDATA[<p>I have been busy helping to organise and plan <a href="http://www.udidahan.com/training/" target="_blank">Udi’s course for October ‘09</a> in Melbourne Australia and if you have been following the event announcements here you should know that it is now full with no more seats available. Thanks to everyone who has committed to attend we are all looking forward to a great week. Thanks of course to Udi for making himself available to those of us here in this remote .NET outpost. To those who missed out, don’t despair I am hopeful that we can entice Udi back to Australia in 2010.</p>
<p class="addtoany_share_save">
    <a name="a2a_dd" onmouseover="a2a_show_dropdown(this)" onmouseout="a2a_onMouseOut_delay()" href="http://www.addtoany.com/bookmark?sitename=Living%20in%20the%20Tech%20Avalanche%20Generation&amp;siteurl=http%3A%2F%2Fwww.simonsegal.net%2Fblog%2F&amp;linkname=SOA%20and%20DDD%20Course%20with%20Udi%20Dahan%20in%20Australia%2009%20is%20now%20FULL&amp;linkurl=http%3A%2F%2Fwww.simonsegal.net%2Fblog%2F2009%2F09%2F12%2Fsoa-and-ddd-course-with-udi-dahan-in-australia-09-is-now-full%2F"><img src="http://www.simonsegal.net/blog/wp-content/plugins/add-to-any/share_save_171_16.gif" width="171" height="16" border="0" alt="Share/Save/Bookmark"/></a>
    <script type="text/javascript">
		a2a_linkname="SOA and DDD Course with Udi Dahan in Australia 09 is now FULL";
		a2a_linkurl="http://www.simonsegal.net/blog/2009/09/12/soa-and-ddd-course-with-udi-dahan-in-australia-09-is-now-full/";
				a2a_show_title=1;    </script>
    <script type="text/javascript" src="http://www.addtoany.com/menu/page.js"></script>

	</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=By1RcTWfjTM:ldxnF5be_xQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=By1RcTWfjTM:ldxnF5be_xQ:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=By1RcTWfjTM:ldxnF5be_xQ:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=By1RcTWfjTM:ldxnF5be_xQ:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=By1RcTWfjTM:ldxnF5be_xQ:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=By1RcTWfjTM:ldxnF5be_xQ:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=By1RcTWfjTM:ldxnF5be_xQ:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=By1RcTWfjTM:ldxnF5be_xQ:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=By1RcTWfjTM:ldxnF5be_xQ:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=By1RcTWfjTM:ldxnF5be_xQ:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=By1RcTWfjTM:ldxnF5be_xQ:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/simonsegal/rQlV/~4/By1RcTWfjTM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.simonsegal.net/blog/2009/09/12/soa-and-ddd-course-with-udi-dahan-in-australia-09-is-now-full/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.simonsegal.net/blog/2009/09/12/soa-and-ddd-course-with-udi-dahan-in-australia-09-is-now-full/</feedburner:origLink></item>
		<item>
		<title>SketchFlow and Agile Modelling. A good marriage?</title>
		<link>http://feedproxy.google.com/~r/simonsegal/rQlV/~3/7cjHBo8oc7E/</link>
		<comments>http://www.simonsegal.net/blog/2009/09/09/sketchflow-and-agile-modelling-a-good-marriage/#comments</comments>
		<pubDate>Wed, 09 Sep 2009 12:45:18 +0000</pubDate>
		<dc:creator>Simon Segal</dc:creator>
		
		<category><![CDATA[Agile]]></category>

		<category><![CDATA[Communication]]></category>

		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://www.simonsegal.net/blog/2009/09/09/sketchflow-and-agile-modelling-a-good-marriage/</guid>
		<description><![CDATA[Recently our team has been engaged in developing a highly scalable batch processing system, which to be fair didn’t require much beyond a fairly simple User Interface with few screens. Given our choice of WPF as the technology to build the presentation layer, we decided to extend our curiosity in SketchFlow and put it to [...]]]></description>
			<content:encoded><![CDATA[<p>Recently our team has been engaged in developing a highly scalable batch processing system, which to be fair didn’t require much beyond a fairly simple User Interface with few screens. Given our choice of WPF as the technology to build the presentation layer, we decided to extend our curiosity in SketchFlow and put it to the test in a real live project.</p>
<p>So, off we set and created our prototype and when completed, sent it on to the stakeholders to cast their critical<a href="http://www.simonsegal.net/blog/wp-content/uploads/2009/09/nuts-bolts-rings.png" target="_blank"><img style="border-right-width: 0px; margin: 0px 0px 0px 5px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="nuts_bolts_rings" src="http://www.simonsegal.net/blog/wp-content/uploads/2009/09/nuts-bolts-rings-thumb.png" border="0" alt="nuts_bolts_rings" width="262" height="187" align="right" /></a> eye upon it and provide feedback using the SketchFlow players tools for capturing feedback. I must admit that I wasn’t convinced that our users / stakeholders where going to be particularly enamoured by the experience but I am happy to say that I was wrong- so incredibly wrong. Whilst developing the prototype I found myself continually applying my own biases toward the tool and they were such that I was developing an opinion that SketchFlow’s feedback mechanism was a little too simple and perhaps even ‘<strong><em>clunky’</em></strong> to provide them with an experience that they would consider productive or enjoyable. However, the feedback came through very swiftly and along with it an enormous endorsement of the process, tool and the whole experience.</p>
<p>These user / stakeholders are used to defining and or changing a proposed UI layout in well known visual design applications (unnamed) and feeding those design documents accompanied with text documents (for annotation) to the software team for consideration. These documents would bounce between parties until a finalised design had been settled upon.</p>
<p><a href="http://www.simonsegal.net/blog/wp-content/uploads/2009/09/symbol-thumbs-up-green.png" target="_blank"><img style="border-right-width: 0px; margin: 0px 5px 0px 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Symbol_thumbs_up_green" src="http://www.simonsegal.net/blog/wp-content/uploads/2009/09/symbol-thumbs-up-green-thumb.png" border="0" alt="Symbol_thumbs_up_green" width="101" height="125" align="left" /></a> This time, upon having been supplied feedback via SketchFlow, they are reporting a significant amount of saving in time dedicated to the process and they are attributing that time saving entirely to the ease of use and functionality of SketchFlow. Now it’s early days yet and I don’t want to get carried away until we get a few more iterations into the process, however I am feeling pretty excited when our users come back with such positive feedback in their experience of the whole development life cycle.</p>
<p>And there I was, ready to put the kybosh on the idea. I cant argue a case when the business stakeholders show you nothing but thumbs pointing in an upward direction.</p>
<p class="addtoany_share_save">
    <a name="a2a_dd" onmouseover="a2a_show_dropdown(this)" onmouseout="a2a_onMouseOut_delay()" href="http://www.addtoany.com/bookmark?sitename=Living%20in%20the%20Tech%20Avalanche%20Generation&amp;siteurl=http%3A%2F%2Fwww.simonsegal.net%2Fblog%2F&amp;linkname=SketchFlow%20and%20Agile%20Modelling.%20A%20good%20marriage%3F&amp;linkurl=http%3A%2F%2Fwww.simonsegal.net%2Fblog%2F2009%2F09%2F09%2Fsketchflow-and-agile-modelling-a-good-marriage%2F"><img src="http://www.simonsegal.net/blog/wp-content/plugins/add-to-any/share_save_171_16.gif" width="171" height="16" border="0" alt="Share/Save/Bookmark"/></a>
    <script type="text/javascript">
		a2a_linkname="SketchFlow and Agile Modelling. A good marriage?";
		a2a_linkurl="http://www.simonsegal.net/blog/2009/09/09/sketchflow-and-agile-modelling-a-good-marriage/";
				a2a_show_title=1;    </script>
    <script type="text/javascript" src="http://www.addtoany.com/menu/page.js"></script>

	</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=7cjHBo8oc7E:1FZU8uYbaGc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=7cjHBo8oc7E:1FZU8uYbaGc:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=7cjHBo8oc7E:1FZU8uYbaGc:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=7cjHBo8oc7E:1FZU8uYbaGc:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=7cjHBo8oc7E:1FZU8uYbaGc:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=7cjHBo8oc7E:1FZU8uYbaGc:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=7cjHBo8oc7E:1FZU8uYbaGc:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=7cjHBo8oc7E:1FZU8uYbaGc:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=7cjHBo8oc7E:1FZU8uYbaGc:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=7cjHBo8oc7E:1FZU8uYbaGc:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=7cjHBo8oc7E:1FZU8uYbaGc:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/simonsegal/rQlV/~4/7cjHBo8oc7E" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.simonsegal.net/blog/2009/09/09/sketchflow-and-agile-modelling-a-good-marriage/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.simonsegal.net/blog/2009/09/09/sketchflow-and-agile-modelling-a-good-marriage/</feedburner:origLink></item>
		<item>
		<title>Announcing Doing .Net Days [Day #2]</title>
		<link>http://feedproxy.google.com/~r/simonsegal/rQlV/~3/5MrvNg14dGg/</link>
		<comments>http://www.simonsegal.net/blog/2009/09/03/announcing-doing-net-days-day-2/#comments</comments>
		<pubDate>Thu, 03 Sep 2009 01:53:43 +0000</pubDate>
		<dc:creator>Simon Segal</dc:creator>
		
		<category><![CDATA[doing .Net Days]]></category>

		<guid isPermaLink="false">http://www.simonsegal.net/blog/?p=562</guid>
		<description><![CDATA[Recently I kicked off &#8220;doing .Net days&#8221;, a community training program for those interested in .NET development topics. The inaugural session took place in August and now it&#8217;s time to announce the next session, which is planned for November the 7th 2009. The topic for &#8220;day 2&#8243; will be &#8220;Using the Entity Framework with Domain [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I kicked off &#8220;doing .Net days&#8221;, a community training program for those interested in .NET development topics. The inaugural session took place in August and now it&#8217;s time to announce the next session, which is planned for November the 7th 2009. The topic for &#8220;day 2&#8243; will be &#8220;Using the Entity Framework with Domain Drive Design&#8221; and will incorporate a discussion and demonstration of Repositories, Fetching Strategies and Specifications.</p>
<p>If you would like to register for the <a href="http://www.simonsegal.net/blog/training/" target="_blank">event</a> please send me an email <a href="mailto:simon.segal@simonsegal.net">here</a>. There are only 10 seats available so get in quick. Whilst the program is offered at no charge, a $5 dollar donation from attendees will go along way to defray the cost of the community centre room which is decked out with PC&#8217;s for each attendee. The venue is the Point Cook Community Learning Centre in the Western Suburbs of Melbourne Australia.</p>
<p><strong><span style="text-decoration: underline;">UPDATE:</span></strong></p>
<p>Check the comments to see how many seats are still available.</p>
<p class="addtoany_share_save">
    <a name="a2a_dd" onmouseover="a2a_show_dropdown(this)" onmouseout="a2a_onMouseOut_delay()" href="http://www.addtoany.com/bookmark?sitename=Living%20in%20the%20Tech%20Avalanche%20Generation&amp;siteurl=http%3A%2F%2Fwww.simonsegal.net%2Fblog%2F&amp;linkname=Announcing%20Doing%20.Net%20Days%20%5BDay%20%232%5D&amp;linkurl=http%3A%2F%2Fwww.simonsegal.net%2Fblog%2F2009%2F09%2F03%2Fannouncing-doing-net-days-day-2%2F"><img src="http://www.simonsegal.net/blog/wp-content/plugins/add-to-any/share_save_171_16.gif" width="171" height="16" border="0" alt="Share/Save/Bookmark"/></a>
    <script type="text/javascript">
		a2a_linkname="Announcing Doing .Net Days [Day #2]";
		a2a_linkurl="http://www.simonsegal.net/blog/2009/09/03/announcing-doing-net-days-day-2/";
				a2a_show_title=1;    </script>
    <script type="text/javascript" src="http://www.addtoany.com/menu/page.js"></script>

	</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=5MrvNg14dGg:D8XPp-g7vrg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=5MrvNg14dGg:D8XPp-g7vrg:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=5MrvNg14dGg:D8XPp-g7vrg:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=5MrvNg14dGg:D8XPp-g7vrg:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=5MrvNg14dGg:D8XPp-g7vrg:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=5MrvNg14dGg:D8XPp-g7vrg:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=5MrvNg14dGg:D8XPp-g7vrg:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=5MrvNg14dGg:D8XPp-g7vrg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=5MrvNg14dGg:D8XPp-g7vrg:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=5MrvNg14dGg:D8XPp-g7vrg:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=5MrvNg14dGg:D8XPp-g7vrg:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/simonsegal/rQlV/~4/5MrvNg14dGg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.simonsegal.net/blog/2009/09/03/announcing-doing-net-days-day-2/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.simonsegal.net/blog/2009/09/03/announcing-doing-net-days-day-2/</feedburner:origLink></item>
		<item>
		<title>The code dreaming developer syndrome – is it real?</title>
		<link>http://feedproxy.google.com/~r/simonsegal/rQlV/~3/65OqiRACsaY/</link>
		<comments>http://www.simonsegal.net/blog/2009/09/01/the-code-dreaming-developer-syndrome-is-it-real/#comments</comments>
		<pubDate>Tue, 01 Sep 2009 08:50:10 +0000</pubDate>
		<dc:creator>Simon Segal</dc:creator>
		
		<category><![CDATA[developers]]></category>

		<guid isPermaLink="false">http://www.simonsegal.net/blog/2009/09/01/the-code-dreaming-developer-syndrome-is-it-real/</guid>
		<description><![CDATA[ Ok, so it happened to me again, another unsettled night of sleep punctuated with moments of awakening that included the same piece of code running through my head. What was the code you ask? The code was nothing special by any stretch of the imagination – just the same two interfaces over and over [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.simonsegal.net/blog/wp-content/uploads/2009/09/idog-icat.png" target="_blank"><img style="border-right-width: 0px; margin: 0px 5px 0px 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="IDog_ICat" src="http://www.simonsegal.net/blog/wp-content/uploads/2009/09/idog-icat-thumb.png" border="0" alt="IDog_ICat" width="205" height="190" align="left" /></a> Ok, so it happened to me again, another unsettled night of sleep punctuated with moments of awakening that included the same piece of code running through my head. What was the code you ask? The code was nothing special by any stretch of the imagination – just the same two interfaces over and over again, first at 1am then 2am, 3.15am and on it went at hourly intervals.</p>
<p>This is not the first time this has happened to me, in fact I have dreamt code a dozen or so times before and it’s always during unsettled nights where I would awake several times with the same code reverberating in my head. I have asked colleagues about this a few times and have found that one or two of them have also experienced this phenomenon and a bit of <a href="http://www.c2.com/cgi/wiki?WeirdDeveloperDreams" target="_blank">research</a> seems to indicate that I am not alone (which I expected). What about you – do you dream code?</p>
<p class="addtoany_share_save">
    <a name="a2a_dd" onmouseover="a2a_show_dropdown(this)" onmouseout="a2a_onMouseOut_delay()" href="http://www.addtoany.com/bookmark?sitename=Living%20in%20the%20Tech%20Avalanche%20Generation&amp;siteurl=http%3A%2F%2Fwww.simonsegal.net%2Fblog%2F&amp;linkname=The%20code%20dreaming%20developer%20syndrome%20%26ndash%3B%20is%20it%20real%3F&amp;linkurl=http%3A%2F%2Fwww.simonsegal.net%2Fblog%2F2009%2F09%2F01%2Fthe-code-dreaming-developer-syndrome-is-it-real%2F"><img src="http://www.simonsegal.net/blog/wp-content/plugins/add-to-any/share_save_171_16.gif" width="171" height="16" border="0" alt="Share/Save/Bookmark"/></a>
    <script type="text/javascript">
		a2a_linkname="The code dreaming developer syndrome &ndash; is it real?";
		a2a_linkurl="http://www.simonsegal.net/blog/2009/09/01/the-code-dreaming-developer-syndrome-is-it-real/";
				a2a_show_title=1;    </script>
    <script type="text/javascript" src="http://www.addtoany.com/menu/page.js"></script>

	</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=65OqiRACsaY:zh_lHq0C9kg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=65OqiRACsaY:zh_lHq0C9kg:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=65OqiRACsaY:zh_lHq0C9kg:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=65OqiRACsaY:zh_lHq0C9kg:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=65OqiRACsaY:zh_lHq0C9kg:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=65OqiRACsaY:zh_lHq0C9kg:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=65OqiRACsaY:zh_lHq0C9kg:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=65OqiRACsaY:zh_lHq0C9kg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=65OqiRACsaY:zh_lHq0C9kg:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=65OqiRACsaY:zh_lHq0C9kg:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=65OqiRACsaY:zh_lHq0C9kg:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/simonsegal/rQlV/~4/65OqiRACsaY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.simonsegal.net/blog/2009/09/01/the-code-dreaming-developer-syndrome-is-it-real/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.simonsegal.net/blog/2009/09/01/the-code-dreaming-developer-syndrome-is-it-real/</feedburner:origLink></item>
		<item>
		<title>Flexibility and Scalability with IronPython Plug-ins and NServiceBus</title>
		<link>http://feedproxy.google.com/~r/simonsegal/rQlV/~3/lQ6sCjXPVsU/</link>
		<comments>http://www.simonsegal.net/blog/2009/08/28/flexibility-and-scalability-with-ironpython-plug-ins-and-nservicebus/#comments</comments>
		<pubDate>Fri, 28 Aug 2009 11:11:22 +0000</pubDate>
		<dc:creator>Simon Segal</dc:creator>
		
		<category><![CDATA[IronPython]]></category>

		<category><![CDATA[NServiceBus]]></category>

		<category><![CDATA[SOA]]></category>

		<guid isPermaLink="false">http://www.simonsegal.net/blog/2009/08/28/flexibility-and-scalability-with-ironpython-plug-ins-and-nservicebus/</guid>
		<description><![CDATA[Well it hasn’t taken long to get some excellent bang for buck from IronPython. The entire team with whom I currently work are all furiously learning Python courtesy of an almost Googlesque free learning time and I have already documented my learning path with respect to Python here before.
As I said at the top of [...]]]></description>
			<content:encoded><![CDATA[<p>Well it hasn’t taken long to get some excellent bang for buck from IronPython. The entire team with whom I currently work are all furiously learning Python courtesy of an almost <em><strong>Googlesque</strong></em> <a href="http://softwaremaven.innerbrane.com/2007/09/innovation-and-employee-free-time.html" target="_blank">free learning time</a> and I have already <a href="http://www.simonsegal.net/blog/2009/08/05/the-ironpython-standard-libraries-dilemma-a-learning-strategy/" target="_blank">documented</a> my learning path with respect to Python here before.</p>
<p>As I said at the top of this post, we are already reaping some benefit and there is certainly not an Python guru amongst us (yet). Most recently we were asked for a fairly trivial application (as far as complexity goes) but one that was very valuable to the business nonetheless. Without going into the gory details, what was requested was a desktop application that digitally processed documents (imaging) and produced the output fast, and I mean really fast. The last part of the request was for a design that would allow the document list to be compiled from almost any source, database, xml, Microsoft Office files, txt, etc etc. Let’s deal with each of these concerns in order of their being mentioned.</p>
<h3><span style="text-decoration: underline;">Steroidal Processing Speed</span></h3>
<p>This part was really not that hard to design and the choice was a simple one, in one word, <a href="http://www.nservicebus.com" target="_blank">NServiceBus</a>. What was needed essentially was many workers all doing the same work on a given set of files and this of course mapped brilliantly to one way messaging using <a href="http://www.nservicebus.com" target="_blank">NServiceBus</a> and it’s distributor to manage balancing the load amongst the workers. By spreading out the work across any number of worker nodes, our project managers could scale up and down according to their needs to adhere to a given SLA. If you want to read more about the Distributor in NServiceBus please check out Ayende’s <a href="http://ayende.com/Blog/archive/2008/03/24/NServiceBus-Distributor-Review.aspx" target="_blank">review</a>.</p>
<p><a href="http://www.simonsegal.net/blog/wp-content/uploads/2009/08/ip-nsb-arch2.png" target="_blank"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="ip_nsb_arch2" src="http://www.simonsegal.net/blog/wp-content/uploads/2009/08/ip-nsb-arch2-thumb.png" border="0" alt="ip_nsb_arch2" width="449" height="294" /></a></p>
<h3><span style="text-decoration: underline;">Convention to the Rescue</span></h3>
<p>As I said earlier, we were asked to provide a method of very quickly adding or “<strong><em>plugging in</em></strong>” new ways to access data that would produce the list of files for processing  and furthermore this needed to work without needing to recompile any part of the application. Given these conditions and the convention that our messages were always derived from data that included a list of files to be processed, it was pretty clear that IronPython was a perfect fit.</p>
<p><a href="http://www.simonsegal.net/blog/wp-content/uploads/2009/08/ip-nsb-ui.png" target="_blank"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="IronPython Plugin UI" src="http://www.simonsegal.net/blog/wp-content/uploads/2009/08/ip-nsb-ui-thumb.png" border="0" alt="IronPython Plugin UI" width="480" height="307" /></a></p>
<p>The UI itself was built using C# with the exception that the list box contents would be populated by an IronPython script and the same script would call-back into the C# code with the list of results (file paths). Having IronPython scripts call-back into managed code is trivial, you just need to pass a function from the executing managed assembly and have that function stored as a variable on the executing Script Scope. Then you just call the function. For example:</p>
<div>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
<span style="color: #0000ff;">public</span> <span style="color: #0000ff;">void</span> callback()
{
    Debug.WriteLine(<span style="color: #006080;">&#8220;Test Callback method got called&#8221;</span>);
}

<span style="color: #0000ff;">public</span> <span style="color: #0000ff;">string</span> funcback(<span style="color: #0000ff;">string</span> calledwith)
{
    Console.WriteLine(<span style="color: #006080;">&#8220;Test Callback function got called with &#8220;</span> +
        calledwith);
    <span style="color: #0000ff;">return</span> calledwith;
}</pre>
</div>
<div>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #0000ff;">private</span> <span style="color: #0000ff;">void</span> SetDefaultScopeVariables(ScriptScope scope)
{
    scope.SetVariable(<span style="color: #006080;">&#8220;test_callback_method&#8221;</span>,
        <span style="color: #0000ff;">new</span> Action(callback));
    scope.SetVariable(<span style="color: #006080;">&#8220;test_callback_function&#8221;</span>,
        <span style="color: #0000ff;">new</span> Func&lt;<span style="color: #0000ff;">string</span>, <span style="color: #0000ff;">string</span>&gt;(funcback));
}</pre>
</div>
<div></div>
<div>Call the function call-back from the code from IronPython.</div>
<p><a href="http://www.simonsegal.net/blog/wp-content/uploads/2009/08/ip-nsb-callback-nsb.png" target="_blank"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="ip_nsb_callback_nsb" src="http://www.simonsegal.net/blog/wp-content/uploads/2009/08/ip-nsb-callback-nsb-thumb.png" border="0" alt="ip_nsb_callback_nsb" width="413" height="199" /></a></p>
<p>What the sketch of the UI (above) points out (<strong><em><span style="color: #ff0000;">see the red arrow</span></em></strong>), is that by dropping scripts into the application we were able to load up any number of ways in reading data to produce the list of files that would be used in creating our messages (sent via the distributor). So by simply dropping in a new IronPython script, another item would be loaded into the list box, offering a new method of accessing data requiring processing. Every scripted plug-in would provide an input, a description and it’s own particular method of accessing data (which could be anything).</p>
<p>On a side note, the UI sketch was produced using <a title="a good look at sketchflow" href="http://electricbeach.org/?p=145" target="_blank">SketchFlow</a> in <a href="http://www.microsoft.com/expression/" target="_blank">Expression Blend 3</a> which looks quite promising.</p>
<p class="addtoany_share_save">
    <a name="a2a_dd" onmouseover="a2a_show_dropdown(this)" onmouseout="a2a_onMouseOut_delay()" href="http://www.addtoany.com/bookmark?sitename=Living%20in%20the%20Tech%20Avalanche%20Generation&amp;siteurl=http%3A%2F%2Fwww.simonsegal.net%2Fblog%2F&amp;linkname=Flexibility%20and%20Scalability%20with%20IronPython%20Plug-ins%20and%20NServiceBus&amp;linkurl=http%3A%2F%2Fwww.simonsegal.net%2Fblog%2F2009%2F08%2F28%2Fflexibility-and-scalability-with-ironpython-plug-ins-and-nservicebus%2F"><img src="http://www.simonsegal.net/blog/wp-content/plugins/add-to-any/share_save_171_16.gif" width="171" height="16" border="0" alt="Share/Save/Bookmark"/></a>
    <script type="text/javascript">
		a2a_linkname="Flexibility and Scalability with IronPython Plug-ins and NServiceBus";
		a2a_linkurl="http://www.simonsegal.net/blog/2009/08/28/flexibility-and-scalability-with-ironpython-plug-ins-and-nservicebus/";
				a2a_show_title=1;    </script>
    <script type="text/javascript" src="http://www.addtoany.com/menu/page.js"></script>

	</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=lQ6sCjXPVsU:XW5CzNytVGk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=lQ6sCjXPVsU:XW5CzNytVGk:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=lQ6sCjXPVsU:XW5CzNytVGk:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=lQ6sCjXPVsU:XW5CzNytVGk:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=lQ6sCjXPVsU:XW5CzNytVGk:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=lQ6sCjXPVsU:XW5CzNytVGk:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=lQ6sCjXPVsU:XW5CzNytVGk:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=lQ6sCjXPVsU:XW5CzNytVGk:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=lQ6sCjXPVsU:XW5CzNytVGk:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=lQ6sCjXPVsU:XW5CzNytVGk:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=lQ6sCjXPVsU:XW5CzNytVGk:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/simonsegal/rQlV/~4/lQ6sCjXPVsU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.simonsegal.net/blog/2009/08/28/flexibility-and-scalability-with-ironpython-plug-ins-and-nservicebus/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.simonsegal.net/blog/2009/08/28/flexibility-and-scalability-with-ironpython-plug-ins-and-nservicebus/</feedburner:origLink></item>
		<item>
		<title>Learning the M family of languages – I want to believe!</title>
		<link>http://feedproxy.google.com/~r/simonsegal/rQlV/~3/kWYDMiDYlkQ/</link>
		<comments>http://www.simonsegal.net/blog/2009/08/18/learning-the-m-family-of-languages-i-want-to-believe/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 13:08:24 +0000</pubDate>
		<dc:creator>Simon Segal</dc:creator>
		
		<category><![CDATA[M]]></category>

		<category><![CDATA[MGrammar]]></category>

		<category><![CDATA[Oslo]]></category>

		<guid isPermaLink="false">http://www.simonsegal.net/blog/2009/08/18/learning-the-m-family-of-languages-i-want-to-believe/</guid>
		<description><![CDATA[
I have an itch. A modelling domain specific language itch. I must say that my interest in new languages has been reinvigorated of late and this has seen a flurry of activity around the DLR, IronRuby, IronPython and now most recently the M family of languages via my curiosity in what Oslo has to offer. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.simonsegal.net/blog/wp-content/uploads/2009/08/oslom.png" target="_blank"><img style="border-bottom: 0px; border-left: 0px; margin: 0px 5px 0px 0px; display: inline; border-top: 0px; border-right: 0px" title="oslom" src="http://www.simonsegal.net/blog/wp-content/uploads/2009/08/oslom-thumb.png" border="0" alt="oslom" width="148" height="130" align="left" /></a></p>
<p>I have an itch. A <span style="text-decoration: line-through;">modelling</span> domain specific language itch. I must say that my interest in new languages has been reinvigorated of late and this has seen a flurry of activity around the <a href="http://www.simonsegal.net/blog/tag/dlr/" target="_blank">DLR</a>, <a href="http://www.simonsegal.net/blog/tag/ironruby/" target="_blank">IronRuby</a>, <a href="http://www.simonsegal.net/blog/tag/ironpython/" target="_blank">IronPython</a> and now most recently the <strong>M</strong> family of languages via my <em><strong>curiosity</strong></em> in what Oslo has to offer. I haven’t yet delved nearly as far as I intend into M and Oslo, however from what I have seen I must admit I am <strong><em>interested</em></strong> in the possibilities that (small) DSL’s might offer, particularly in the vertical I happen to work in.</p>
<h3><span style="text-decoration: underline;">HOWEVER</span></h3>
<p>My grandfather had a great saying for when he or other people seemed to find themselves in a state of confusion, he called it “<strong><em>oogle boogled</em></strong>” and I have to say that after Doug Purdy’s <a href="http://www.douglaspurdy.com/2009/08/17/on-oslo/" target="_blank">latest post</a> I am feeling a bit that way right now. My read on things is that Microsoft seem to be placing “M” and Oslo adjacent to a war cry of  “<em><strong>DATA, DATA, DATA, DATA</strong></em>” and hence the announcement that:</p>
<blockquote><p>“the modelling platform is aligned in a deep and fundamental way with the data programmability stack (ADO.NET, EF/EDM, Astoria, etc”</p></blockquote>
<p>Doug also goes on to announce that the teams have come closer (much) together, with:</p>
<blockquote><p>“we made a decision to merge the Data Programmability team (EDM, EF, Astoria, XML, ADO.NET, and tools/designers) and the “Oslo” team (“Quadrant”, Repository, “M”) together”</p></blockquote>
<h3><span style="text-decoration: underline;">What Interested me in the first place?</span></h3>
<p>The piece that interested me mostly about Oslo was <strong><em>MGrammar</em></strong> and building textual DSL’s. The reason was simple, I work in a industry where we have a throng of ‘Data Managers’, where I (and others) are engaged in building tools that help these guys manage data. These ‘Data Managers’ are by definition pretty data savvy and tech literate. The potential for the DSL’s in this space largely revolves around tool aids and even the ability to code gen workflow and deployment instructions. So in short I look forward to seeing what the possibilities are with writing DSL’s that produce navigable models and from there it’s a land of unknown promise. Of course to the Eclipse community this is nothing new, but for an old Visual Studio hack like me, it’s a brave new world.</p>
<p>My concern is that if the focus swings deep enough into the “<em><strong>DATA DATA DATA DATA</strong></em>” mantra, somehow the potential for what excited me about the Oslo initiative will perhaps be diminished in it’s significance. I am certainly not stating this to be case, only that it’s a concern of a dilatant, (me), on his way to becoming enlightened. Perhaps misunderstanding on my part and perhaps lost in the articulation on theirs?</p>
<p class="addtoany_share_save">
    <a name="a2a_dd" onmouseover="a2a_show_dropdown(this)" onmouseout="a2a_onMouseOut_delay()" href="http://www.addtoany.com/bookmark?sitename=Living%20in%20the%20Tech%20Avalanche%20Generation&amp;siteurl=http%3A%2F%2Fwww.simonsegal.net%2Fblog%2F&amp;linkname=Learning%20the%20M%20family%20of%20languages%20%26ndash%3B%20I%20want%20to%20believe%21&amp;linkurl=http%3A%2F%2Fwww.simonsegal.net%2Fblog%2F2009%2F08%2F18%2Flearning-the-m-family-of-languages-i-want-to-believe%2F"><img src="http://www.simonsegal.net/blog/wp-content/plugins/add-to-any/share_save_171_16.gif" width="171" height="16" border="0" alt="Share/Save/Bookmark"/></a>
    <script type="text/javascript">
		a2a_linkname="Learning the M family of languages &ndash; I want to believe!";
		a2a_linkurl="http://www.simonsegal.net/blog/2009/08/18/learning-the-m-family-of-languages-i-want-to-believe/";
				a2a_show_title=1;    </script>
    <script type="text/javascript" src="http://www.addtoany.com/menu/page.js"></script>

	</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=kWYDMiDYlkQ:yPnCG_nanxM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=kWYDMiDYlkQ:yPnCG_nanxM:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=kWYDMiDYlkQ:yPnCG_nanxM:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=kWYDMiDYlkQ:yPnCG_nanxM:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=kWYDMiDYlkQ:yPnCG_nanxM:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=kWYDMiDYlkQ:yPnCG_nanxM:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=kWYDMiDYlkQ:yPnCG_nanxM:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=kWYDMiDYlkQ:yPnCG_nanxM:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=kWYDMiDYlkQ:yPnCG_nanxM:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=kWYDMiDYlkQ:yPnCG_nanxM:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=kWYDMiDYlkQ:yPnCG_nanxM:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/simonsegal/rQlV/~4/kWYDMiDYlkQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.simonsegal.net/blog/2009/08/18/learning-the-m-family-of-languages-i-want-to-believe/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.simonsegal.net/blog/2009/08/18/learning-the-m-family-of-languages-i-want-to-believe/</feedburner:origLink></item>
		<item>
		<title>Training Announcement – Advanced SOA and Domain Driven Design</title>
		<link>http://feedproxy.google.com/~r/simonsegal/rQlV/~3/sImgaEwd66o/</link>
		<comments>http://www.simonsegal.net/blog/2009/08/16/training-announcement-advanced-soa-and-domain-driven-design/#comments</comments>
		<pubDate>Sun, 16 Aug 2009 00:39:24 +0000</pubDate>
		<dc:creator>Simon Segal</dc:creator>
		
		<category><![CDATA[NServiceBus]]></category>

		<category><![CDATA[SOA]]></category>

		<category><![CDATA[Training]]></category>

		<guid isPermaLink="false">http://www.simonsegal.net/blog/2009/08/16/training-announcement-advanced-soa-and-domain-driven-design/</guid>
		<description><![CDATA[Techavalanche is currently planning to host a training event not to be missed. The event is “Advanced Distributed Systems Design using SOA &#38; DDD” and the course author and presenter is Udi Dahan of nServiceBus fame.
Interest in the event is growing quickly and we hope to be in a position to lock down the date [...]]]></description>
			<content:encoded><![CDATA[<p>Techavalanche is currently planning to host a <a href="http://www.simonsegal.net/blog/guests-on-demand/">training event</a> not to be missed. The event is “<a href="http://www.udidahan.com/training/">Advanced Distributed Systems Design using SOA &amp; DDD</a>” and the course author and presenter is <a href="http://www.udidahan.com">Udi Dahan</a> of <a href="http://www.nservicebus.com/">nServiceBus</a> fame.</p>
<p>Interest in the event is growing quickly and we hope to be in a position to lock down the date very soon. We are getting close to having the numbers for a definite date of the week of October 26, therefore if you are interested in taking part, now is the time to start thinking about aligning the stars and putting your ducks in a row (so to speak).</p>
<p>If you are interested in attending the event, please contact <a href="mailto:simon.segal@iinet.net.au">Techavalanche</a> to enquire with your details and register your interest on the <a href="http://www.doodle.com/gd4msqs2e9suu9ta">poll</a> and we can make sure you don’t miss out on what should be a week to remember.</p>
<p class="addtoany_share_save">
    <a name="a2a_dd" onmouseover="a2a_show_dropdown(this)" onmouseout="a2a_onMouseOut_delay()" href="http://www.addtoany.com/bookmark?sitename=Living%20in%20the%20Tech%20Avalanche%20Generation&amp;siteurl=http%3A%2F%2Fwww.simonsegal.net%2Fblog%2F&amp;linkname=Training%20Announcement%20%26ndash%3B%20Advanced%20SOA%20and%20Domain%20Driven%20Design&amp;linkurl=http%3A%2F%2Fwww.simonsegal.net%2Fblog%2F2009%2F08%2F16%2Ftraining-announcement-advanced-soa-and-domain-driven-design%2F"><img src="http://www.simonsegal.net/blog/wp-content/plugins/add-to-any/share_save_171_16.gif" width="171" height="16" border="0" alt="Share/Save/Bookmark"/></a>
    <script type="text/javascript">
		a2a_linkname="Training Announcement &ndash; Advanced SOA and Domain Driven Design";
		a2a_linkurl="http://www.simonsegal.net/blog/2009/08/16/training-announcement-advanced-soa-and-domain-driven-design/";
				a2a_show_title=1;    </script>
    <script type="text/javascript" src="http://www.addtoany.com/menu/page.js"></script>

	</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=sImgaEwd66o:-nBiOpd0u4M:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=sImgaEwd66o:-nBiOpd0u4M:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=sImgaEwd66o:-nBiOpd0u4M:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=sImgaEwd66o:-nBiOpd0u4M:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=sImgaEwd66o:-nBiOpd0u4M:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=sImgaEwd66o:-nBiOpd0u4M:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=sImgaEwd66o:-nBiOpd0u4M:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=sImgaEwd66o:-nBiOpd0u4M:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=sImgaEwd66o:-nBiOpd0u4M:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=sImgaEwd66o:-nBiOpd0u4M:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=sImgaEwd66o:-nBiOpd0u4M:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/simonsegal/rQlV/~4/sImgaEwd66o" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.simonsegal.net/blog/2009/08/16/training-announcement-advanced-soa-and-domain-driven-design/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.simonsegal.net/blog/2009/08/16/training-announcement-advanced-soa-and-domain-driven-design/</feedburner:origLink></item>
		<item>
		<title>C# classes for Mixins and Multiple Inheritance with IronPython</title>
		<link>http://feedproxy.google.com/~r/simonsegal/rQlV/~3/EMuv2BuYzj8/</link>
		<comments>http://www.simonsegal.net/blog/2009/08/10/c-classes-for-mixins-and-multiple-inheritance-with-ironpython/#comments</comments>
		<pubDate>Mon, 10 Aug 2009 12:29:27 +0000</pubDate>
		<dc:creator>Simon Segal</dc:creator>
		
		<category><![CDATA[C#]]></category>

		<category><![CDATA[IronPython]]></category>

		<guid isPermaLink="false">http://www.simonsegal.net/blog/2009/08/10/c-classes-for-mixins-and-multiple-inheritance-with-ironpython/</guid>
		<description><![CDATA[Question: Does IronPython support Multiple Inheritance / Mixins?
Ans: Yes!
Question: Can I use my C# classes from IronPython (in the IP runtime)?
Ans: Yes!
Question So, I should be able to use my C# classes in a multiple inheritance scenario from IronPython?
Ans: Yes!
Making it all work
If you create a class in managed C# you are free to pass [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Question</strong>: Does IronPython support Multiple Inheritance / Mixins?</p>
<p><strong><em>Ans</em></strong>: Yes!</p>
<p><strong>Question</strong>: Can I use my C# classes from IronPython (in the IP runtime)?</p>
<p><strong><em>Ans</em></strong>: Yes!</p>
<p><strong>Question</strong> So, I should be able to use my C# classes in a multiple inheritance scenario from IronPython?</p>
<p><strong><em>Ans</em></strong>: Yes!</p>
<h3><span style="text-decoration: underline;">Making it all work</span></h3>
<p>If you create a class in managed C# you are free to pass it along for use to the IronPython runtime and thus access it using IronPython. Let’s take the following class created in C#:</p>
<div>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #0000ff;">public</span> <span style="color: #0000ff;">class</span> Person
{
    <span style="color: #0000ff;">public</span> <span style="color: #0000ff;">string</span> Name;
}</pre>
</div>
<p>Using my IronPython <a href="http://www.simonsegal.net/blog/2009/07/01/an-ironpython-repl-console-in-a-wpf-user-control/" target="_blank">WPF interactive console control</a>, I can interactively create new classes with IronPython and use my C# Person class as the base class in an inheritance object graph. Here’s the code as typed at the interpreter:</p>
<p><a href="http://www.simonsegal.net/blog/wp-content/uploads/2009/08/multi-inheritance-using-csh1.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="multi_inheritance_using_csh" src="http://www.simonsegal.net/blog/wp-content/uploads/2009/08/multi-inheritance-using-csh-thumb1.png" border="0" alt="multi_inheritance_using_csh" width="469" height="632" /></a></p>
<p>As you can see, first up I imported the relevant namespace (module) where the C# Person class is defined. The first class derived from Person is Employee and then I have derived WarehouseManager from Employee which leaves our Inheritance tree like this:</p>
<ul>
<li>Person
<ul>
<li>Employee
<ul>
<li>WarehouseManager</li>
</ul>
</li>
</ul>
</li>
</ul>
<p>You can also see that both the derived classes have access to the Name property of the C# Person class which proves that the Person class has been included in the inheritance of the Employee and subsequently WarehouseManager classes.</p>
<p>So that’s some plain old inheritance using C# classes. Now lets take a quick look at multiple inheritance using the same C# class.</p>
<p><a href="http://www.simonsegal.net/blog/wp-content/uploads/2009/08/mutliple-inheritance-tipas.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="mutliple_inheritance_tipas" src="http://www.simonsegal.net/blog/wp-content/uploads/2009/08/mutliple-inheritance-tipas-thumb.png" border="0" alt="mutliple_inheritance_tipas" width="449" height="657" /></a></p>
<h3><span style="text-decoration: underline;">When should I use this feature?</span></h3>
<p>Probably never according to some people, yet for every objector there seems to be fan. Languages that do support multiple inheritance, often come with a disclaimer for programmers to avoid their usage and Python would appear to be no exception in this case. The above is a good example of why multiple inheritance isn’t necessarily a good thing, given that a manager is presumably an employee and at the very least a person. Nonetheless it demonstrates the intent and this post isn’t so much about the ‘why’ but mostly for now it’s about the how. I will follow up soon with more about the ‘why’ and ‘when’ in a subsequent post.</p>
<p>Carefully managed, I can see it’s potential uses could be enticing. Yes, yes I know “composition over inheritance” etc…There is never one shoe fits all!</p>
<h3><span style="text-decoration: underline;">Just in case you where wondering</span></h3>
<p>If you were thinking of doing something like this in C#:</p>
<div>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #0000ff;">public</span> <span style="color: #0000ff;">class</span> WidgetA
{
    <span style="color: #008000;">//&#8230;.etc</span>
}

<span style="color: #0000ff;">public</span> <span style="color: #0000ff;">class</span> WidgetB
{
    <span style="color: #008000;">//&#8230;.etc</span>
}</pre>
</div>
<p>Followed up by:</p>
<p><a href="http://www.simonsegal.net/blog/wp-content/uploads/2009/08/widgetabc-ironpython1.png"><img style="border-right-width: 0px; margin: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="widgetA-B-C_ironpython" src="http://www.simonsegal.net/blog/wp-content/uploads/2009/08/widgetabc-ironpython-thumb1.png" border="0" alt="widgetA-B-C_ironpython" width="460" height="352" /></a></p>
<p>You will see that we cant in fact use two classes created in a CLI compliant language. This will effectively stop crazy stuff like this:</p>
<div id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:c4e24b77-1e6d-4b70-b63c-ee50293627ff" class="wlWriterSmartContent" style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px">
<pre style="background-color: #ffffff; overflow: auto"><span style="color: #0000ff;">class</span><span style="color: #000000;"> MutantUi(Form, Button):
    </span><span style="color: #0000ff;">def</span><span style="color: #000000;"> SetTitles(self):
        self.Text </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #800000;">&#8220;</span><span style="color: #800000;">What happens here</span><span style="color: #800000;">&#8220;</span></pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></p>
</div>
<p>But I am completely free to do this:</p>
<div id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:72aa9220-3ea5-468a-96d4-2745f91437db" class="wlWriterSmartContent" style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px">
<pre style="background-color: #ffffff; overflow: auto"><span style="color: #0000ff;">from</span><span style="color: #000000;"> Org.TechA.Wpf.ControlsHarness </span><span style="color: #0000ff;">import</span><span style="color: #000000;"> </span><span style="color: #000000;">*</span><span style="color: #000000;">

</span><span style="color: #0000ff;">class</span><span style="color: #000000;"> PythonMixin(object):
    </span><span style="color: #0000ff;">def</span><span style="color: #000000;"> method(self):
        </span><span style="color: #0000ff;">print</span><span style="color: #000000;"> </span><span style="color: #800000;">&#8216;</span><span style="color: #800000;">method</span><span style="color: #800000;">&#8216;</span><span style="color: #000000;">

</span><span style="color: #0000ff;">class</span><span style="color: #000000;"> Mutant(PythonMixin, Person):
    </span><span style="color: #0000ff;">def</span><span style="color: #000000;"> MutantMethod(self):
        </span><span style="color: #0000ff;">print</span><span style="color: #000000;"> </span><span style="color: #800000;">&#8216;</span><span style="color: #800000;">mutant method</span><span style="color: #800000;">&#8216;</span><span style="color: #000000;">

 m </span><span style="color: #000000;">=</span><span style="color: #000000;"> Mutant()
 m.method()
 m.Name </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #800000;">&#8220;</span><span style="color: #800000;">Simon</span><span style="color: #800000;">&#8220;</span><span style="color: #000000;">
 </span><span style="color: #0000ff;">print</span><span style="color: #000000;"> m.Name
 m.MutantMethod()
 </span></pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></p>
</div>
<p>So there you have it, Multiple inheritance / mixins with C# (well kinda)!</p>
<p class="addtoany_share_save">
    <a name="a2a_dd" onmouseover="a2a_show_dropdown(this)" onmouseout="a2a_onMouseOut_delay()" href="http://www.addtoany.com/bookmark?sitename=Living%20in%20the%20Tech%20Avalanche%20Generation&amp;siteurl=http%3A%2F%2Fwww.simonsegal.net%2Fblog%2F&amp;linkname=C%23%20classes%20for%20Mixins%20and%20Multiple%20Inheritance%20with%20IronPython&amp;linkurl=http%3A%2F%2Fwww.simonsegal.net%2Fblog%2F2009%2F08%2F10%2Fc-classes-for-mixins-and-multiple-inheritance-with-ironpython%2F"><img src="http://www.simonsegal.net/blog/wp-content/plugins/add-to-any/share_save_171_16.gif" width="171" height="16" border="0" alt="Share/Save/Bookmark"/></a>
    <script type="text/javascript">
		a2a_linkname="C# classes for Mixins and Multiple Inheritance with IronPython";
		a2a_linkurl="http://www.simonsegal.net/blog/2009/08/10/c-classes-for-mixins-and-multiple-inheritance-with-ironpython/";
				a2a_show_title=1;    </script>
    <script type="text/javascript" src="http://www.addtoany.com/menu/page.js"></script>

	</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=EMuv2BuYzj8:WIcYtQKnIVA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=EMuv2BuYzj8:WIcYtQKnIVA:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=EMuv2BuYzj8:WIcYtQKnIVA:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=EMuv2BuYzj8:WIcYtQKnIVA:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=EMuv2BuYzj8:WIcYtQKnIVA:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=EMuv2BuYzj8:WIcYtQKnIVA:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=EMuv2BuYzj8:WIcYtQKnIVA:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=EMuv2BuYzj8:WIcYtQKnIVA:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=EMuv2BuYzj8:WIcYtQKnIVA:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=EMuv2BuYzj8:WIcYtQKnIVA:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=EMuv2BuYzj8:WIcYtQKnIVA:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/simonsegal/rQlV/~4/EMuv2BuYzj8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.simonsegal.net/blog/2009/08/10/c-classes-for-mixins-and-multiple-inheritance-with-ironpython/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.simonsegal.net/blog/2009/08/10/c-classes-for-mixins-and-multiple-inheritance-with-ironpython/</feedburner:origLink></item>
		<item>
		<title>Doing .Net Days has a logo.</title>
		<link>http://feedproxy.google.com/~r/simonsegal/rQlV/~3/qeCKG18wdIg/</link>
		<comments>http://www.simonsegal.net/blog/2009/08/09/doing-net-days-has-a-logo/#comments</comments>
		<pubDate>Sun, 09 Aug 2009 02:39:35 +0000</pubDate>
		<dc:creator>Simon Segal</dc:creator>
		
		<category><![CDATA[doing .Net Days]]></category>

		<guid isPermaLink="false">http://www.simonsegal.net/blog/2009/08/09/doing-net-days-has-a-logo/</guid>
		<description><![CDATA[Thanks to the kindly offered help of BOUNCE (check out his work), “doing .Net days” has a logo! If you didn&#8217;t know, “doing .Net days” is a monthly community training event run by TechAvalanche once a month.
Doing .Net Days will focus on a variety of programming topics, mostly as they relate to programming on the [...]]]></description>
			<content:encoded><![CDATA[<p>Thanks to the kindly offered help of <strong>BOUNCE</strong> (<a href="http://www.flickr.com/photos/bounce_world">check out his work</a>), “doing .Net <a href="http://www.simonsegal.net/blog/wp-content/uploads/2009/08/logos-four.png"><img style="border-right-width: 0px; margin: 0px 5px 0px 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="LOGOS_FOUR" src="http://www.simonsegal.net/blog/wp-content/uploads/2009/08/logos-four-thumb.png" border="0" alt="LOGOS_FOUR" width="154" height="107" align="left" /></a>days” has a logo! If you didn&#8217;t know, “doing .Net days” is a monthly community training event run by TechAvalanche once a month.</p>
<p>Doing .Net Days will focus on a variety of programming topics, mostly as they relate to programming on the .NET platform and covering technologies that touch both the CLR and DLR.</p>
<p>Doing .NET Days will also give a great deal of it’s ‘Air Time’ to topics that feature heavily in the Alt.Net space. Open Source frameworks and tools will also be covered extensively and if you have <a href="http://www.simonsegal.net/blog/training/" target="_blank">stopped by here</a> before you would know that our very first event will include a discussion and demonstration of <a href="http://www.nservicebus.com/" target="_blank">nServiceBus</a>, a framework (fast growing in popularity) designed to make building distributed systems easier.</p>
<p class="addtoany_share_save">
    <a name="a2a_dd" onmouseover="a2a_show_dropdown(this)" onmouseout="a2a_onMouseOut_delay()" href="http://www.addtoany.com/bookmark?sitename=Living%20in%20the%20Tech%20Avalanche%20Generation&amp;siteurl=http%3A%2F%2Fwww.simonsegal.net%2Fblog%2F&amp;linkname=Doing%20.Net%20Days%20has%20a%20logo.&amp;linkurl=http%3A%2F%2Fwww.simonsegal.net%2Fblog%2F2009%2F08%2F09%2Fdoing-net-days-has-a-logo%2F"><img src="http://www.simonsegal.net/blog/wp-content/plugins/add-to-any/share_save_171_16.gif" width="171" height="16" border="0" alt="Share/Save/Bookmark"/></a>
    <script type="text/javascript">
		a2a_linkname="Doing .Net Days has a logo.";
		a2a_linkurl="http://www.simonsegal.net/blog/2009/08/09/doing-net-days-has-a-logo/";
				a2a_show_title=1;    </script>
    <script type="text/javascript" src="http://www.addtoany.com/menu/page.js"></script>

	</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=qeCKG18wdIg:_ke2Iau4jfM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=qeCKG18wdIg:_ke2Iau4jfM:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=qeCKG18wdIg:_ke2Iau4jfM:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=qeCKG18wdIg:_ke2Iau4jfM:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=qeCKG18wdIg:_ke2Iau4jfM:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=qeCKG18wdIg:_ke2Iau4jfM:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=qeCKG18wdIg:_ke2Iau4jfM:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=qeCKG18wdIg:_ke2Iau4jfM:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=qeCKG18wdIg:_ke2Iau4jfM:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=qeCKG18wdIg:_ke2Iau4jfM:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=qeCKG18wdIg:_ke2Iau4jfM:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/simonsegal/rQlV/~4/qeCKG18wdIg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.simonsegal.net/blog/2009/08/09/doing-net-days-has-a-logo/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.simonsegal.net/blog/2009/08/09/doing-net-days-has-a-logo/</feedburner:origLink></item>
		<item>
		<title>The IronPython standard libraries dilemma – [a learning strategy]</title>
		<link>http://feedproxy.google.com/~r/simonsegal/rQlV/~3/cZ62DecXk7I/</link>
		<comments>http://www.simonsegal.net/blog/2009/08/05/the-ironpython-standard-libraries-dilemma-a-learning-strategy/#comments</comments>
		<pubDate>Tue, 04 Aug 2009 14:17:11 +0000</pubDate>
		<dc:creator>Simon Segal</dc:creator>
		
		<category><![CDATA[DLR]]></category>

		<category><![CDATA[IronPython]]></category>

		<category><![CDATA[IronRuby]]></category>

		<category><![CDATA[Languages]]></category>

		<guid isPermaLink="false">http://www.simonsegal.net/blog/2009/08/05/the-ironpython-standard-libraries-dilemma-a-learning-strategy/</guid>
		<description><![CDATA[The choices facing any programmer wanting to start working with IronPython or IronRuby for that matter, contain some interesting questions. Working with Dynamic languages in .NET prompts us to consider whether to use Python / Ruby native standard library method and functions or directly work against the BCL? If your programming in a statically typed [...]]]></description>
			<content:encoded><![CDATA[<p>The choices facing any programmer wanting to start working with IronPython or IronRuby for that matter, contain some interesting questions. Working with Dynamic languages in .NET prompts us to consider whether to use Python / Ruby native standard library method and functions or directly work against the BCL? If your programming in a statically typed language on top of the CLR, then it’s just different syntax but the same platform libraries. If you want to try your hand with IronPython or IronRuby you need to consider that both these languages have evolved on different platforms. For example, should I consider using Python standard library functions to interpolate some strings or should I use the BCL? Consider these two approaches:</p>
<h3><span style="text-decoration: underline;"><strong>Classic Python Version</strong></span></h3>
<div id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:8be7aaf7-0d8f-4f62-96ea-f1010532f102" class="wlWriterEditableSmartContent" style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px">
<pre style="background-color:#F2F2F2;overflow: auto;"><span style="color: #0000ff;">print</span><span style="color: #000000;"> </span><span style="color: #800000;">&#8220;</span><span style="color: #800000;">should I use python functions or .Net?</span><span style="color: #800000;">&#8220;</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;">
                    </span><span style="color: #800000;">&#8220;</span><span style="color: #800000;">Ans = %(yes)s</span><span style="color: #800000;">&#8220;</span><span style="color: #000000;"> </span><span style="color: #000000;">%</span><span style="color: #000000;"> {</span><span style="color: #800000;">&#8216;</span><span style="color: #800000;">yes</span><span style="color: #800000;">&#8216;</span><span style="color: #000000;">: </span><span style="color: #800000;">&#8216;</span><span style="color: #800000;">yes</span><span style="color: #800000;">&#8216;</span><span style="color: #000000;">}</span></pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></p>
</div>
<h3><span style="text-decoration: underline;"><strong>BCL Centric Version</strong></span></h3>
<div id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:f3ae5b61-92f1-49b3-8951-23707481f6b9" class="wlWriterEditableSmartContent" style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px">
<pre style="background-color:#F2F2F2;overflow: auto;"><span style="color: #0000ff;">print</span><span style="color: #000000;"> String.Format(</span><span style="color: #800000;">&#8220;</span><span style="color: #800000;">should I use python functions</span><span style="color: #800000;">&#8220;</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;">
    </span><span style="color: #800000;">&#8220;</span><span style="color: #800000;">or .NET? Ans = {0}</span><span style="color: #800000;">&#8220;</span><span style="color: #000000;">, </span><span style="color: #800000;">&#8220;</span><span style="color: #800000;">BCL Functions</span><span style="color: #800000;">&#8220;</span><span style="color: #000000;">)</span></pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></p>
</div>
<p>So that was pretty trivial. What about File access?</p>
<p><span style="text-decoration: underline;"><strong>Classic Python Version</strong></span></p>
<div id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:6b5a0e4f-5768-4b71-86bb-d98ab2258d95" class="wlWriterEditableSmartContent" style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px">
<pre style="background-color:#F2F2F2;overflow: auto;"><span style="color: #000000;"> rdrp </span><span style="color: #000000;">=</span><span style="color: #000000;"> open(</span><span style="color: #800000;">r&#8221;</span><span style="color: #800000;">c:\Document1.txt</span><span style="color: #800000;">&#8220;</span><span style="color: #000000;">)
 rdrp.read()</span></pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></p>
</div>
<p><span style="text-decoration: underline;"><strong></strong></span></p>
<p><span style="text-decoration: underline;"><strong>BCL Centric Version</strong></span></p>
<div id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:3f0cf14f-ecf2-4b92-8984-f5b2851aae52" class="wlWriterEditableSmartContent" style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px">
<pre style="background-color:#F2F2F2;overflow: auto;"><span style="color: #000000;"> rdr </span><span style="color: #000000;">=</span><span style="color: #000000;"> StreamReader(</span><span style="color: #800000;">r&#8221;</span><span style="color: #800000;">c:\Document1.txt</span><span style="color: #800000;">&#8220;</span><span style="color: #000000;">)
 </span><span style="color: #0000ff;">print</span><span style="color: #000000;"> rdr.ReadToEnd()</span></pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></p>
</div>
<p>Any clearer on a choice? The pragmatist in me says use the BCL and the purist says use the python standard libraries. So how heavy should our BCL wielding hand be? This leads me nicely to the next question, how exactly should we go about learning a Dynamic .NET Language? Surely this process will help us make up our minds about when to use the BCL and when not to? Something tells me that the answer lies pragmatically somewhere in the middle ground? The kind of meat and potato stuff like that demonstrated above is likely going to have me opt for the classic Python approach as my default position, however I am not going to put myself to the trouble of working with databases for example without the help of ADO.Net. To help myself form my own opinions I decided that the best learning path for me was as follows:</p>
<ol>
<li>Read the Python 2.5 (CPython) documentations PDF Tutorial and re-type it’s code examples and follow with my own experimenting.
<ul>
<li>This allowed me to get a fairly good overall feeling for the language.</li>
</ul>
</li>
<li>Read <a href="http://www.manning.com/foord/">IronPython in Action</a> to get a good overall point of relevance to .NET and see how the power of .NET as a platform would impact the Python experience and visa versa.</li>
<li>Read <a href="http://oreilly.com/catalog/9780596001889/" target="_blank">Python is a Nutshell</a> and get a grasp on Python’s roots and how the language is best put to use on it’s original platform (the C implementation).</li>
</ol>
<p>Some people will surely think that points 2 and 3 should be reversed? Perhaps, but my rationale for taking this approach is that Python is not likely to become a daily instrument in my work and I want to understand as much as possible about it in the .NET world first. I do believe however that to truly understand the power of Python I will need to learn deeply about its roots and oddly I suppose that step in the process will come last.</p>
<p class="addtoany_share_save">
    <a name="a2a_dd" onmouseover="a2a_show_dropdown(this)" onmouseout="a2a_onMouseOut_delay()" href="http://www.addtoany.com/bookmark?sitename=Living%20in%20the%20Tech%20Avalanche%20Generation&amp;siteurl=http%3A%2F%2Fwww.simonsegal.net%2Fblog%2F&amp;linkname=The%20IronPython%20standard%20libraries%20dilemma%20%26ndash%3B%20%5Ba%20learning%20strategy%5D&amp;linkurl=http%3A%2F%2Fwww.simonsegal.net%2Fblog%2F2009%2F08%2F05%2Fthe-ironpython-standard-libraries-dilemma-a-learning-strategy%2F"><img src="http://www.simonsegal.net/blog/wp-content/plugins/add-to-any/share_save_171_16.gif" width="171" height="16" border="0" alt="Share/Save/Bookmark"/></a>
    <script type="text/javascript">
		a2a_linkname="The IronPython standard libraries dilemma &ndash; [a learning strategy]";
		a2a_linkurl="http://www.simonsegal.net/blog/2009/08/05/the-ironpython-standard-libraries-dilemma-a-learning-strategy/";
				a2a_show_title=1;    </script>
    <script type="text/javascript" src="http://www.addtoany.com/menu/page.js"></script>

	</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=cZ62DecXk7I:OndZOvhjvds:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=cZ62DecXk7I:OndZOvhjvds:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=cZ62DecXk7I:OndZOvhjvds:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=cZ62DecXk7I:OndZOvhjvds:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=cZ62DecXk7I:OndZOvhjvds:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=cZ62DecXk7I:OndZOvhjvds:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=cZ62DecXk7I:OndZOvhjvds:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=cZ62DecXk7I:OndZOvhjvds:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=cZ62DecXk7I:OndZOvhjvds:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=cZ62DecXk7I:OndZOvhjvds:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=cZ62DecXk7I:OndZOvhjvds:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/simonsegal/rQlV/~4/cZ62DecXk7I" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.simonsegal.net/blog/2009/08/05/the-ironpython-standard-libraries-dilemma-a-learning-strategy/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.simonsegal.net/blog/2009/08/05/the-ironpython-standard-libraries-dilemma-a-learning-strategy/</feedburner:origLink></item>
		<item>
		<title>Interested in a course with Udi Dahan in Australia - October 2009?</title>
		<link>http://feedproxy.google.com/~r/simonsegal/rQlV/~3/3atK8cXxtp0/</link>
		<comments>http://www.simonsegal.net/blog/2009/08/03/interested-in-a-course-with-udi-dahan-in-australia-october-2009/#comments</comments>
		<pubDate>Mon, 03 Aug 2009 11:51:27 +0000</pubDate>
		<dc:creator>Simon Segal</dc:creator>
		
		<category><![CDATA[NServiceBus]]></category>

		<category><![CDATA[SOA]]></category>

		<category><![CDATA[doing .Net Days]]></category>

		<guid isPermaLink="false">http://www.simonsegal.net/blog/2009/08/03/interested-in-a-course-with-udi-dahan-in-australia-october-2009/</guid>
		<description><![CDATA[ There is work afoot to bring Udi back to Australia once again to conduct training on NServiceBus and DDD. I would love to hear from anyone who would be interested in attending such an event. 
For more information please see this poll and register your interest. Also feel free to contact me @here. For [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.simonsegal.net/blog/wp-content/uploads/2009/08/uditrainingthumb1.jpg" mce_href="http://www.simonsegal.net/blog/wp-content/uploads/2009/08/uditrainingthumb1.jpg" target="_blank"><img style="border: 0px none ; margin: 0px 5px 0px 0px; display: inline;" mce_style="border-bottom: 0px; border-left: 0px; margin: 0px 5px 0px 0px; display: inline; border-top: 0px; border-right: 0px" title="uditraining-thumb" alt="uditraining-thumb" src="http://www.simonsegal.net/blog/wp-content/uploads/2009/08/uditrainingthumb-thumb1.jpg" mce_src="http://www.simonsegal.net/blog/wp-content/uploads/2009/08/uditrainingthumb-thumb1.jpg" align="left" border="0" height="93" width="143"></a> There is work afoot to bring Udi back to Australia once again to conduct training on NServiceBus and DDD. I would love to hear from anyone who would be interested in attending such an event. </p>
<p>For more information please <a href="http://www.doodle.com/gd4msqs2e9suu9ta" mce_href="http://www.doodle.com/gd4msqs2e9suu9ta" target="_blank">see this poll</a> and register your interest. Also feel free to contact me <a href="mailto:simon.segal@iinet.net.au" mce_href="mailto:simon.segal@iinet.net.au" target="_blank">@here</a>. For more information on the course content <a href="http://www.udidahan.com/training/" mce_href="http://www.udidahan.com/training/" target="_blank">check this link out</a>.</p>
<p class="addtoany_share_save">
    <a name="a2a_dd" onmouseover="a2a_show_dropdown(this)" onmouseout="a2a_onMouseOut_delay()" href="http://www.addtoany.com/bookmark?sitename=Living%20in%20the%20Tech%20Avalanche%20Generation&amp;siteurl=http%3A%2F%2Fwww.simonsegal.net%2Fblog%2F&amp;linkname=Interested%20in%20a%20course%20with%20Udi%20Dahan%20in%20Australia%20-%20October%202009%3F&amp;linkurl=http%3A%2F%2Fwww.simonsegal.net%2Fblog%2F2009%2F08%2F03%2Finterested-in-a-course-with-udi-dahan-in-australia-october-2009%2F"><img src="http://www.simonsegal.net/blog/wp-content/plugins/add-to-any/share_save_171_16.gif" width="171" height="16" border="0" alt="Share/Save/Bookmark"/></a>
    <script type="text/javascript">
		a2a_linkname="Interested in a course with Udi Dahan in Australia - October 2009?";
		a2a_linkurl="http://www.simonsegal.net/blog/2009/08/03/interested-in-a-course-with-udi-dahan-in-australia-october-2009/";
				a2a_show_title=1;    </script>
    <script type="text/javascript" src="http://www.addtoany.com/menu/page.js"></script>

	</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=3atK8cXxtp0:J3ObHgYRLdc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=3atK8cXxtp0:J3ObHgYRLdc:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=3atK8cXxtp0:J3ObHgYRLdc:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=3atK8cXxtp0:J3ObHgYRLdc:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=3atK8cXxtp0:J3ObHgYRLdc:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=3atK8cXxtp0:J3ObHgYRLdc:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=3atK8cXxtp0:J3ObHgYRLdc:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=3atK8cXxtp0:J3ObHgYRLdc:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=3atK8cXxtp0:J3ObHgYRLdc:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=3atK8cXxtp0:J3ObHgYRLdc:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=3atK8cXxtp0:J3ObHgYRLdc:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/simonsegal/rQlV/~4/3atK8cXxtp0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.simonsegal.net/blog/2009/08/03/interested-in-a-course-with-udi-dahan-in-australia-october-2009/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.simonsegal.net/blog/2009/08/03/interested-in-a-course-with-udi-dahan-in-australia-october-2009/</feedburner:origLink></item>
		<item>
		<title>Entity Framework 4.0 and Fetching Strategies</title>
		<link>http://feedproxy.google.com/~r/simonsegal/rQlV/~3/Zf5hJHd3CWA/</link>
		<comments>http://www.simonsegal.net/blog/2009/07/29/entity-framework-40-and-fetching-strategies/#comments</comments>
		<pubDate>Wed, 29 Jul 2009 11:20:41 +0000</pubDate>
		<dc:creator>Simon Segal</dc:creator>
		
		<category><![CDATA[DDD]]></category>

		<category><![CDATA[Design Patterns]]></category>

		<category><![CDATA[Entity Framework]]></category>

		<guid isPermaLink="false">http://www.simonsegal.net/blog/2009/07/29/entity-framework-40-and-fetching-strategies/</guid>
		<description><![CDATA[I have spent a fair amount of time already trying to improve my experience with the Entity Framework with versions 1.0, 2.0 and 3.0. Well that’s a bit of joke really because there was and never will be versions 2.0 or 3.0 for the Entity Framework with the decision to take the next version straight [...]]]></description>
			<content:encoded><![CDATA[<p>I have spent a fair amount of time already trying to improve my experience with the Entity Framework with versions 1.0, 2.0 and 3.0. Well that’s a bit of joke really because there was and never will be versions 2.0 or 3.0 for the Entity Framework with the decision to take the next version straight to Version 4.0 to align with the .Net Framework Version. Nonetheless I have previously spent quite a bit of time working at being more explicit with how to fetch data with the Entity Framework.</p>
<p>Fetching Strategies are a key concept when considering tuning your data access code in Event Driven Architectures. By using ‘roles’ to explicitly fetch data either eagerly, lazily or some combination thereof, we can build fetching strategies to load accordingly when a role has been specified. The role can be reasoned as a business event of sorts. Udi has <a href="http://www.udidahan.com/2007/04/23/fetching-strategy-design/" target="_blank">written extensively</a> on this and developed a method for using fetching strategies <a href="http://www.udidahan.com/2007/09/16/fetching-strategy-nhibernate-implementation-available/" target="_blank">with NHibernate</a> and if you haven’t yet checked out what he’s had to say to date on the subject I suggest you <a href="http://www.udidahan.com/?s=fetching+strategies" target="_blank">take a look</a>.</p>
<p>With Entity Framework 4.0 I wanted to refine my approach taken with EF 1.0 previously. Fetching Strategies are a key component in the framework (which I call <strong><em>NFetchSpec4Ef</em></strong>) and helps me work in a manner that fit’s with my use of Domain Driven Design.</p>
<h3><span style="text-decoration: underline;">Demonstrate your intentions</span></h3>
<p>Before we get to the strategies themselves we need some way to state our intent with regards to fetching data and so this leads us to Fetching Intentions.</p>
<div>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #0000ff;">public</span> <span style="color: #0000ff;">class</span> EagerFetchingIntention
{
    <span style="color: #0000ff;">private</span> <span style="color: #0000ff;">static</span> EagerFetchingIntention _factory_intent;
    <span style="color: #0000ff;">private</span> <span style="color: #0000ff;">readonly</span> <span style="color: #0000ff;">string</span> _fetchAssociate;

    <span style="color: #0000ff;">public</span> <span style="color: #0000ff;">string</span> FetchAssociate
    {
        get { <span style="color: #0000ff;">return</span> _fetchAssociate; }
    }

    <span style="color: #0000ff;">internal</span> EagerFetchingIntention(<span style="color: #0000ff;">string</span> fetch)
    {
        _fetchAssociate = fetch;
    }

    <span style="color: #0000ff;">private</span> EagerFetchingIntention() { }

    <span style="color: #0000ff;">public</span> <span style="color: #0000ff;">static</span> EagerFetchingIntention
            CreateInstance&lt;TRootEntity, TFetchEntity&gt;
            (Expression&lt;Func&lt;TRootEntity, TFetchEntity&gt;&gt; fetch)
    {
<span style="color: #0000ff;">        if</span>(fetch == <span style="color: #0000ff;">null</span>)
            <span style="color: #0000ff;">return</span> <span style="color: #0000ff;">new</span> EagerFetchingIntention(string.empty);

        <span style="color: #0000ff;">int</span> dot = fetch.Body.ToString().IndexOf(<span style="color: #006080;">&#8220;.&#8221;</span>) + 1;
        <span style="color: #0000ff;">string</span> includes = fetch.Body.ToString().Remove(0, dot);

        _factory_intent =
            <span style="color: #0000ff;">new</span> EagerFetchingIntention(includes);

        <span style="color: #0000ff;">return</span> _factory_intent;
    }
}</pre>
</div>
<p>We can chain intentions together with a fluent interface provided by an <strong><em>.And()</em></strong>extension method.</p>
<div>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #0000ff;">public</span> <span style="color: #0000ff;">static</span> <span style="color: #0000ff;">class</span> EagerFetchingIntentionExtensions
{
    <span style="color: #0000ff;">public</span> <span style="color: #0000ff;">static</span> EagerFetchingIntention And(
                <span style="color: #0000ff;">this</span> EagerFetchingIntention original,
                EagerFetchingIntention addTo)
    {
        EagerFetchingIntention compound_intention;

        compound_intention =
            <span style="color: #0000ff;">new</span> EagerFetchingIntention(
                original.FetchAssociate +
                <span style="color: #006080;">&#8220;.&#8221;</span> + addTo.FetchAssociate);

        <span style="color: #0000ff;">return</span> compound_intention;
    }
}</pre>
</div>
<h3><span style="text-decoration: underline;">Fetching Strategies Refactored</span></h3>
<p>Like all parts of <strong><em>NFetchSpec4Ef</em></strong>, Fetching Strategies needed to be rethought as part of addressing the 4.0 changes to the Entity Framework and in particular it’s new support for POCO entities and (somewhat) implicit lazy loading. So what do Fetching Strategies look like now? <a href="http://#" target="_blank">Fetching Intentions</a> remained (as seen above) but generally speaking the API changed somewhat.</p>
<div>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #0000ff;">public</span> <span style="color: #0000ff;">interface</span> IFetchingStrategy
{
    IList&lt;EagerFetchingIntention&gt; Intentions { get; }
    IEnumerable&lt;<span style="color: #0000ff;">string</span>&gt; Includes { get; }
    <span style="color: #0000ff;">void</span> AddIntentions(EagerFetchingIntention[] intentions);
    <span style="color: #0000ff;">bool</span> ShouldLazyLoad { get; }
    <span style="color: #0000ff;">bool</span> HasInstructions { get; }
}

<span style="color: #0000ff;">public</span> <span style="color: #0000ff;">interface</span> IFetchingStrategy&lt;TRole&gt; : IFetchingStrategy { }</pre>
</div>
<p>These two interfaces form the basis of Fetching Strategies in <strong><em>NFetchSpec4Ef</em></strong>. In the next version of <strong><em>NFetchSpec4Ef, </em></strong>the implementation no longer required implementing these interfaces directly when creating a new strategy, rather we inherit from a super class that has already done this for us. You might also notice that the aspects to this interface for non-public consumption have been hidden through explicit implementation.</p>
<div>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #0000ff;">public</span> <span style="color: #0000ff;">class</span> FetchingStrategy : IFetchingStrategy
{
    <span style="color: #0000ff;">private</span> <span style="color: #0000ff;">readonly</span> IList&lt;EagerFetchingIntention&gt; _intentions;
    <span style="color: #0000ff;">private</span> <span style="color: #0000ff;">readonly</span> <span style="color: #0000ff;">bool</span> _includeDeferedLoading = <span style="color: #0000ff;">default</span>(<span style="color: #0000ff;">bool</span>); 

    <span style="color: #0000ff;">public</span> FetchingStrategy(<span style="color: #0000ff;">bool</span> useDeferedLoading)
    {
        _includeDeferedLoading = useDeferedLoading;
        _intentions = <span style="color: #0000ff;">new</span> List&lt;EagerFetchingIntention&gt;();
    }

    <span style="color: #0000ff;">private</span> FetchingStrategy() { }

    <span style="color: #0000ff;">public</span> <span style="color: #0000ff;">void</span> AddIntentions(EagerFetchingIntention[] intentions)
    {
        <span style="color: #0000ff;">if</span> ((intentions == <span style="color: #0000ff;">null</span>) || (intentions.Count() &lt; 1))
            <span style="color: #0000ff;">return</span>;
        intentions.ToList().ForEach(i =&gt; _intentions.Add(i));
    }

    <span style="color: #0000ff;">public</span> IEnumerable&lt;<span style="color: #0000ff;">string</span>&gt; Includes
    {
        get
        {
            <span style="color: #0000ff;">if</span>(((IFetchingStrategy)<span style="color: #0000ff;">this</span>).HasInstructions == <span style="color: #0000ff;">false</span>)
                <span style="color: #0000ff;">return</span> <span style="color: #0000ff;">new</span> List&lt;<span style="color: #0000ff;">string</span>&gt;().AsEnumerable();

            IEnumerable&lt;String&gt; includes =
                (from intents <span style="color: #0000ff;">in</span> _intentions
                select intents.FetchAssociate).AsEnumerable();
            <span style="color: #0000ff;">return</span> includes;
        }
    }

    IList&lt;EagerFetchingIntention&gt; IFetchingStrategy.Intentions
    {
        get { <span style="color: #0000ff;">return</span> _intentions; }
    }

    <span style="color: #0000ff;">bool</span> IFetchingStrategy.ShouldLazyLoad
    {
        get { <span style="color: #0000ff;">return</span> _includeDeferedLoading; }
    }

    <span style="color: #0000ff;">bool</span> IFetchingStrategy.HasInstructions
    {
        get { <span style="color: #0000ff;">return</span> _intentions.Count &gt; 0 || _includeDeferedLoading; }
    }
}</pre>
</div>
<p>Our goal includes notifying our infrastructure of our fetching intent by being explicit through the use of roles which have been defined as Interfaces. The infrastructure is able now to employ IoC / DI to locate the most appropriate Fetching Strategy from a container. This frees us to swap out fetching details for specific business events, after all, in some situations such as “<strong><em>IMakeCustomerPreferred</em></strong>” (see below), I might want to eager fetch all my customers orders and order lines in one go. Here’s the base class implementation of IFetchingStrategy&lt;T&gt; for role based fetching strategies,  followed by a <strong><em>custom</em></strong> Fetching Strategy:</p>
<div>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #0000ff;">public</span> <span style="color: #0000ff;">abstract</span> <span style="color: #0000ff;">class</span> FetchingStrategyForRoles&lt;TRole&gt; :
        FetchingStrategy, IFetchingStrategy&lt;TRole&gt;
{
    <span style="color: #0000ff;">public</span> FetchingStrategyForRoles(<span style="color: #0000ff;">bool</span> useDeferedLoading) :
        <span style="color: #0000ff;">base</span>(useDeferedLoading) { SetupIntentions(); }

    <span style="color: #0000ff;">public</span> <span style="color: #0000ff;">abstract</span> <span style="color: #0000ff;">void</span> SetupIntentions();
}</pre>
</div>
<div>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #0000ff;">class</span> CustomerPreferedFetchingStratey :
        FetchingStrategyForRoles&lt;IMakeCustomerPrefered&gt;
{
    <span style="color: #0000ff;">public</span> CustomerPreferedFetchingStratey()
        : <span style="color: #0000ff;">base</span>(<span style="color: #0000ff;">false</span>) { }

    <span style="color: #0000ff;">public</span> <span style="color: #0000ff;">override</span> <span style="color: #0000ff;">void</span> SetupIntentions()
    {
        var orders_intention =
            EagerFetchingIntention
            .CreateInstance&lt;Customer, IList&lt;Order&gt;&gt;(c =&gt; c.Orders);
        var orderlines_intention =
            EagerFetchingIntention
            .CreateInstance&lt;Order, IList&lt;OrderLine&gt;&gt;(o =&gt; o.OrderLines);

        var iFetch = <span style="color: #0000ff;">this</span> <span style="color: #0000ff;">as</span> IFetchingStrategy;

        iFetch.AddIntentions(<span style="color: #0000ff;">new</span> EagerFetchingIntention[]
            {
                orders_intention,
                orders_intention.And(orderlines_intention)
            });
    }
}</pre>
</div>
<div>This custom strategy will produce two “includes” strings for ObjectQuery&lt;T&gt; to work with, <strong><em>“Orders”</em></strong> and <strong><em>“Orders.OrderLines”</em></strong>. From the consumers point of view we would be writing code that looked something like this:</div>
<div>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">var repo =
    <span style="color: #0000ff;">new</span> EntitiesRepository&lt;NorthwindEntities, Customer&gt;
        (<span style="color: #0000ff;">new</span> NorthwindEntities());

repo.Get&lt;IMakeCustomerPreferred&gt;();</pre>
</div>
<p>We leave the container (IoC) to deal with locating the right fetching strategy based on the role of <strong><em>IMakeCustomerPrefered</em></strong>. The dependency injection happens inside of the Repository.</p>
<p>The next part of <em><strong>NFetchSpec4Ef</strong></em> to discuss will be how Specifications fit in and what they offer to Repositories.</p>
<p class="addtoany_share_save">
    <a name="a2a_dd" onmouseover="a2a_show_dropdown(this)" onmouseout="a2a_onMouseOut_delay()" href="http://www.addtoany.com/bookmark?sitename=Living%20in%20the%20Tech%20Avalanche%20Generation&amp;siteurl=http%3A%2F%2Fwww.simonsegal.net%2Fblog%2F&amp;linkname=Entity%20Framework%204.0%20and%20Fetching%20Strategies&amp;linkurl=http%3A%2F%2Fwww.simonsegal.net%2Fblog%2F2009%2F07%2F29%2Fentity-framework-40-and-fetching-strategies%2F"><img src="http://www.simonsegal.net/blog/wp-content/plugins/add-to-any/share_save_171_16.gif" width="171" height="16" border="0" alt="Share/Save/Bookmark"/></a>
    <script type="text/javascript">
		a2a_linkname="Entity Framework 4.0 and Fetching Strategies";
		a2a_linkurl="http://www.simonsegal.net/blog/2009/07/29/entity-framework-40-and-fetching-strategies/";
				a2a_show_title=1;    </script>
    <script type="text/javascript" src="http://www.addtoany.com/menu/page.js"></script>

	</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=Zf5hJHd3CWA:NjeDRUR0JEE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=Zf5hJHd3CWA:NjeDRUR0JEE:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=Zf5hJHd3CWA:NjeDRUR0JEE:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=Zf5hJHd3CWA:NjeDRUR0JEE:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=Zf5hJHd3CWA:NjeDRUR0JEE:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=Zf5hJHd3CWA:NjeDRUR0JEE:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=Zf5hJHd3CWA:NjeDRUR0JEE:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=Zf5hJHd3CWA:NjeDRUR0JEE:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=Zf5hJHd3CWA:NjeDRUR0JEE:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=Zf5hJHd3CWA:NjeDRUR0JEE:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=Zf5hJHd3CWA:NjeDRUR0JEE:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/simonsegal/rQlV/~4/Zf5hJHd3CWA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.simonsegal.net/blog/2009/07/29/entity-framework-40-and-fetching-strategies/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.simonsegal.net/blog/2009/07/29/entity-framework-40-and-fetching-strategies/</feedburner:origLink></item>
		<item>
		<title>Entity Framework 4.0 Improvements</title>
		<link>http://feedproxy.google.com/~r/simonsegal/rQlV/~3/8j82z_4QZt4/</link>
		<comments>http://www.simonsegal.net/blog/2009/07/27/entity-framework-40-improvements/#comments</comments>
		<pubDate>Mon, 27 Jul 2009 04:55:51 +0000</pubDate>
		<dc:creator>Simon Segal</dc:creator>
		
		<category><![CDATA[Entity Framework]]></category>

		<category><![CDATA[NHibernate]]></category>

		<category><![CDATA[ORM]]></category>

		<guid isPermaLink="false">http://www.simonsegal.net/blog/2009/07/27/entity-framework-40-improvements/</guid>
		<description><![CDATA[First up, let me just say that I’m quite pleased that my needs with respect to declaring my fetching intentions (eager and / or lazy), no longer will require the  assistance of PostSharp to get the job done. PostSharp is a great tool but I really shouldn’t have had to use it to achieve working [...]]]></description>
			<content:encoded><![CDATA[<p>First up, let me just say that I’m quite pleased that my needs with respect to declaring my fetching intentions (eager and / or lazy), no longer will require the  assistance of <a href="http://www.postsharp.org/" target="_blank"></a><a href="http://www.simonsegal.net/blog/wp-content/uploads/2009/07/hammer-and-nail2211x300.jpg"><img style="border-right-width: 0px; margin: 0px 5px 0px 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="hammer_and_nail2-211x300" src="http://www.simonsegal.net/blog/wp-content/uploads/2009/07/hammer-and-nail2211x300-thumb.jpg" border="0" alt="hammer_and_nail2-211x300" width="173" height="244" align="left" /></a>PostSharp to get the job done. PostSharp is a great tool but I really shouldn’t have had to use it to achieve working the way I wanted to, therefore POCO is a welcome addition even if it does force me into some things such as choosing ICollection for 1..M navigable relationships within my Domain Model (only if you want to use change tracking proxies).</p>
<p>I am not going to regurgitate the changes here, for a complete list of the changes and new features see the <a href="http://blogs.msdn.com/adonet/" target="_blank">ADO.Net Team blog</a>.</p>
<p>There seem to be several points along an axis of how POCO you can choose to be with Entity Framework 4.0. At this stage I have the feeling that I will fall into the camp that probably wont use the proxies for change tracking but I will reserve judgement on that and perhaps that decision will be best left as a case by case assessment for some.</p>
<p>The thing I like the most is the fact I can (as already stated) remove the smoke and mirrors from <a href="http://www.simonsegal.net/blog/2009/06/05/entity-framework-repository-and-fetching-strategies-code-update/">my past efforts</a> to get (somewhat) transparent lazy loading and streamline my whole approach. I say ‘<em><strong>somewhat</strong></em>’ transparent due to the fact that DeferedLoading is still ultimately ‘opt in’ and hence if you wanted to be pedantic you could make a case that this is still explicit. See below.</p>
<div id="codeSnippetWrapper">
<pre id="codeSnippet" style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">context.ContextOptions.DeferredLoadingEnabled = true</pre>
</div>
<p>I will follow up from this post will several more by examining  each constituent part in the new version of <a href="http://www.simonsegal.net/blog/2009/06/05/entity-framework-repository-and-fetching-strategies-code-update/" target="_blank">NFetchSpec</a> for the Entity Framework version 4.0. <strong><em>NFetchSpec4Ef</em></strong>, provides a reusable approach to implementing Repositories, Fetching Strategies and Specifications. Fetching Strategies provide a unified way of declaring your intent when instructing the Entity Framework to fetch data. Specifications enables a functional approach to supplying dynamic query predicates and stays true to the patterns original intent, that being to provide a means to testing that an entity satisfies a given set of conditions. Repositories speak for themselves.</p>
<p class="addtoany_share_save">
    <a name="a2a_dd" onmouseover="a2a_show_dropdown(this)" onmouseout="a2a_onMouseOut_delay()" href="http://www.addtoany.com/bookmark?sitename=Living%20in%20the%20Tech%20Avalanche%20Generation&amp;siteurl=http%3A%2F%2Fwww.simonsegal.net%2Fblog%2F&amp;linkname=Entity%20Framework%204.0%20Improvements&amp;linkurl=http%3A%2F%2Fwww.simonsegal.net%2Fblog%2F2009%2F07%2F27%2Fentity-framework-40-improvements%2F"><img src="http://www.simonsegal.net/blog/wp-content/plugins/add-to-any/share_save_171_16.gif" width="171" height="16" border="0" alt="Share/Save/Bookmark"/></a>
    <script type="text/javascript">
		a2a_linkname="Entity Framework 4.0 Improvements";
		a2a_linkurl="http://www.simonsegal.net/blog/2009/07/27/entity-framework-40-improvements/";
				a2a_show_title=1;    </script>
    <script type="text/javascript" src="http://www.addtoany.com/menu/page.js"></script>

	</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=8j82z_4QZt4:JiLEMgvUC-A:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=8j82z_4QZt4:JiLEMgvUC-A:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=8j82z_4QZt4:JiLEMgvUC-A:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=8j82z_4QZt4:JiLEMgvUC-A:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=8j82z_4QZt4:JiLEMgvUC-A:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=8j82z_4QZt4:JiLEMgvUC-A:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=8j82z_4QZt4:JiLEMgvUC-A:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=8j82z_4QZt4:JiLEMgvUC-A:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=8j82z_4QZt4:JiLEMgvUC-A:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=8j82z_4QZt4:JiLEMgvUC-A:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=8j82z_4QZt4:JiLEMgvUC-A:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/simonsegal/rQlV/~4/8j82z_4QZt4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.simonsegal.net/blog/2009/07/27/entity-framework-40-improvements/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.simonsegal.net/blog/2009/07/27/entity-framework-40-improvements/</feedburner:origLink></item>
		<item>
		<title>Doing .Net Days is full for August 2009</title>
		<link>http://feedproxy.google.com/~r/simonsegal/rQlV/~3/CbWq7I5Py74/</link>
		<comments>http://www.simonsegal.net/blog/2009/07/20/doing-net-days-is-full-for-august-2009/#comments</comments>
		<pubDate>Mon, 20 Jul 2009 13:45:12 +0000</pubDate>
		<dc:creator>Simon Segal</dc:creator>
		
		<category><![CDATA[Courses]]></category>

		<category><![CDATA[doing .Net Days]]></category>

		<guid isPermaLink="false">http://www.simonsegal.net/blog/2009/07/20/doing-net-days-is-full-for-august-2009/</guid>
		<description><![CDATA[Thanks to everyone who has registered for the very first “doing .Net days” event. All seats for August are now filled, I will however post a notice if any positions re-open.
Looking forward to seeing everyone there.

    
    
		a2a_linkname="Doing .Net Days is full for August 2009";
		a2a_linkurl="http://www.simonsegal.net/blog/2009/07/20/doing-net-days-is-full-for-august-2009/";
				a2a_show_title=1;    
 [...]]]></description>
			<content:encoded><![CDATA[<p>Thanks to everyone who has registered for the very first “doing .Net days” event. All seats for August are now filled, I will however post a notice if any positions re-open.</p>
<p>Looking forward to seeing everyone there.</p>
<p class="addtoany_share_save">
    <a name="a2a_dd" onmouseover="a2a_show_dropdown(this)" onmouseout="a2a_onMouseOut_delay()" href="http://www.addtoany.com/bookmark?sitename=Living%20in%20the%20Tech%20Avalanche%20Generation&amp;siteurl=http%3A%2F%2Fwww.simonsegal.net%2Fblog%2F&amp;linkname=Doing%20.Net%20Days%20is%20full%20for%20August%202009&amp;linkurl=http%3A%2F%2Fwww.simonsegal.net%2Fblog%2F2009%2F07%2F20%2Fdoing-net-days-is-full-for-august-2009%2F"><img src="http://www.simonsegal.net/blog/wp-content/plugins/add-to-any/share_save_171_16.gif" width="171" height="16" border="0" alt="Share/Save/Bookmark"/></a>
    <script type="text/javascript">
		a2a_linkname="Doing .Net Days is full for August 2009";
		a2a_linkurl="http://www.simonsegal.net/blog/2009/07/20/doing-net-days-is-full-for-august-2009/";
				a2a_show_title=1;    </script>
    <script type="text/javascript" src="http://www.addtoany.com/menu/page.js"></script>

	</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=CbWq7I5Py74:b999pKmcfrE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=CbWq7I5Py74:b999pKmcfrE:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=CbWq7I5Py74:b999pKmcfrE:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=CbWq7I5Py74:b999pKmcfrE:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=CbWq7I5Py74:b999pKmcfrE:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=CbWq7I5Py74:b999pKmcfrE:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=CbWq7I5Py74:b999pKmcfrE:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=CbWq7I5Py74:b999pKmcfrE:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=CbWq7I5Py74:b999pKmcfrE:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=CbWq7I5Py74:b999pKmcfrE:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=CbWq7I5Py74:b999pKmcfrE:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/simonsegal/rQlV/~4/CbWq7I5Py74" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.simonsegal.net/blog/2009/07/20/doing-net-days-is-full-for-august-2009/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.simonsegal.net/blog/2009/07/20/doing-net-days-is-full-for-august-2009/</feedburner:origLink></item>
		<item>
		<title>Doing .NET Days – Latest</title>
		<link>http://feedproxy.google.com/~r/simonsegal/rQlV/~3/IG9sVpCI7RE/</link>
		<comments>http://www.simonsegal.net/blog/2009/07/15/doing-net-days-latest/#comments</comments>
		<pubDate>Wed, 15 Jul 2009 10:13:01 +0000</pubDate>
		<dc:creator>Simon Segal</dc:creator>
		
		<category><![CDATA[LINQ]]></category>

		<category><![CDATA[NServiceBus]]></category>

		<category><![CDATA[doing .Net Days]]></category>

		<guid isPermaLink="false">http://www.simonsegal.net/blog/2009/07/15/doing-net-days-latest/</guid>
		<description><![CDATA[The inaugural “doing .NET days” is filling up fast but there are a few spots left. If you are interested in learning more about LINQ and it’s different flavours and getting an introductory look at nServiceBus (a mighty powerful Framework for Distributed Systems development), then please grab one of the few remaining spots before they [...]]]></description>
			<content:encoded><![CDATA[<p>The inaugural “doing .NET days” is filling up fast but there are a few spots left. If you are interested in learning more about LINQ and it’s different flavours and getting an introductory look at <a href="http://www.nservicebus.com/" target="_blank">nServiceBus</a> (a mighty powerful Framework for Distributed Systems development), then please grab one of the few remaining spots before they disappear.</p>
<p>You can find more details about the event <a href="http://www.simonsegal.net/blog/2009/07/08/announcing-doing-net-days-day-1-net-training/" target="_blank">here</a> and <a href="http://www.simonsegal.net/blog/training/" target="_blank">here</a>.</p>
<p class="addtoany_share_save">
    <a name="a2a_dd" onmouseover="a2a_show_dropdown(this)" onmouseout="a2a_onMouseOut_delay()" href="http://www.addtoany.com/bookmark?sitename=Living%20in%20the%20Tech%20Avalanche%20Generation&amp;siteurl=http%3A%2F%2Fwww.simonsegal.net%2Fblog%2F&amp;linkname=Doing%20.NET%20Days%20%26ndash%3B%20Latest&amp;linkurl=http%3A%2F%2Fwww.simonsegal.net%2Fblog%2F2009%2F07%2F15%2Fdoing-net-days-latest%2F"><img src="http://www.simonsegal.net/blog/wp-content/plugins/add-to-any/share_save_171_16.gif" width="171" height="16" border="0" alt="Share/Save/Bookmark"/></a>
    <script type="text/javascript">
		a2a_linkname="Doing .NET Days &ndash; Latest";
		a2a_linkurl="http://www.simonsegal.net/blog/2009/07/15/doing-net-days-latest/";
				a2a_show_title=1;    </script>
    <script type="text/javascript" src="http://www.addtoany.com/menu/page.js"></script>

	</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=IG9sVpCI7RE:LHzDRUSb3kg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=IG9sVpCI7RE:LHzDRUSb3kg:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=IG9sVpCI7RE:LHzDRUSb3kg:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=IG9sVpCI7RE:LHzDRUSb3kg:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=IG9sVpCI7RE:LHzDRUSb3kg:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=IG9sVpCI7RE:LHzDRUSb3kg:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=IG9sVpCI7RE:LHzDRUSb3kg:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=IG9sVpCI7RE:LHzDRUSb3kg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=IG9sVpCI7RE:LHzDRUSb3kg:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/simonsegal/rQlV?a=IG9sVpCI7RE:LHzDRUSb3kg:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/simonsegal/rQlV?i=IG9sVpCI7RE:LHzDRUSb3kg:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/simonsegal/rQlV/~4/IG9sVpCI7RE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.simonsegal.net/blog/2009/07/15/doing-net-days-latest/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.simonsegal.net/blog/2009/07/15/doing-net-days-latest/</feedburner:origLink></item>
	</channel>
</rss><!-- Dynamic Page Served (once) in 0.900 seconds --><!-- Cached page served by WP-Cache -->
