<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>Domain Driven Design</title>
        <link>http://geekswithblogs.net/Podwysocki/category/7458.aspx</link>
        <description>Domain Driven Design</description>
        <language>en-US</language>
        <copyright>Matthew Podwysocki</copyright>
        <managingEditor>matthew.podwysocki@gmail.com</managingEditor>
        <generator>Subtext Version 0.0.0.0</generator>
        <item>
            <title>Thinking Inside the Box and Premature Optimization</title>
            <link>http://geekswithblogs.net/Podwysocki/archive/2008/02/26/119982.aspx</link>
            <description>At the last &lt;a href="http://altnet.ent0.com/"&gt;DC ALT.NET&lt;/a&gt; meeting, there was a good discussion regarding premature optimization.  Anything that involves this brings me to a rather &lt;a href="http://en.wikipedia.org/wiki/Optimization_%28computer_science%29#Quotes"&gt;famous quote&lt;/a&gt; by a great computer scientist, &lt;a href="http://en.wikipedia.org/wiki/Donald_Knuth"&gt;Donald Knuth&lt;/a&gt; which states:&lt;br /&gt;
&lt;br /&gt;
&lt;div style="margin-left: 40px;"&gt;"We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil."&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;span style="font-weight: bold;"&gt;Don't Think Five Steps Ahead&lt;/span&gt;&lt;br /&gt;
 
&lt;div style="margin-left: 40px;"&gt; &lt;/div&gt;
The context of the conversation revolved around how when you learn a new language, you have a tendency to think inside the box and try not to prematurely optimize the code, instead, just meet the original intent of what you were trying to do as quickly and efficiently as possible and make it conform to the specification.  For example, one person there was a .NET guy who knew nothing of Java until put on a project recently where it was exclusively used.  This forced him to think more clearly about the problem and not just throw design patterns, caching solutions and so on.  When we are familiar with a language and all of its nuances, it sometimes gets the better of us, and we start throwing frameworks in there that have done things for us in the past just because they seemed appropriate then.  It rang very true for me as well when I did my first Ruby on Rails application and I saw that I didn't need to bring in X framework or Y framework and my solution did just fine without it.   In fact, I thought it was a stronger piece because I didn't clutter it with frameworks and instead solved the direct domain problem at hand first.&lt;br /&gt;
&lt;br /&gt;
It kind of reminds me of a conversation I once had with a developer which went like this:&lt;br /&gt;
&lt;br /&gt;
&lt;div style="margin-left: 40px;"&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;Me&lt;/span&gt;&lt;span style="font-style: italic;"&gt;: Why did you use x for this piece?&lt;/span&gt;&lt;br style="font-style: italic;" /&gt;
&lt;span style="font-weight: bold; font-style: italic;"&gt;Him&lt;/span&gt;&lt;span style="font-style: italic;"&gt;:  Because it's always worked for me in the past.&lt;/span&gt;&lt;br style="font-style: italic;" /&gt;
&lt;span style="font-weight: bold; font-style: italic;"&gt;Me&lt;/span&gt;&lt;span style="font-style: italic;"&gt;:  What problem does it solve?  Did you have that problem this time around?&lt;/span&gt;&lt;br style="font-style: italic;" /&gt;
&lt;span style="font-weight: bold; font-style: italic;"&gt;Him&lt;/span&gt;&lt;span style="font-style: italic;"&gt;:  Well, no, I was just thinking five steps ahead&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;br /&gt;
So, basically what we can infer from this conversation is that the pain point just hadn't been hit yet.  Instead, reflexively, we have a tendency to throw these things in there because at one point, for one particular project, we felt that pain.  That's not to say that optimization is a bad thing, but once we start doing it, we need concrete measures for what the optimization is trying to fix and how well it does it.  Another part to consider is how easy is it to read.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-weight: bold;"&gt;ADD with DDD&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Some of the guidance for this can be traced back to Domain Driven Design.  With this, you pay more attention to the model, the ubiquitous language and so on, and the frameworks in turn will come into play.  Instead, many people put their frameworks first and try to get the domain model to fit around it.  They are distracted by shiny things with their ADD to put the domain model first and then the frameworks.  I know I've been guilty of it in the past and it's been a learning adventure when I was earlier in my career.&lt;br /&gt;
&lt;br /&gt;
I'll be back next with a real technology post on IoC, Unity and all that, so stay tuned.  Until next time...&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.dotnetkicks.com/kick/?url=http://geekswithblogs.net/Podwysocki/archive/2008/02/26/119982.aspx"&gt;&lt;img border="0" src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://geekswithblogs.net/Podwysocki/archive/2008/02/26/119982.aspx" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=119982"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=119982" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/Podwysocki/aggbug/119982.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Matthew Podwysocki</dc:creator>
            <guid>http://geekswithblogs.net/Podwysocki/archive/2008/02/26/119982.aspx</guid>
            <pubDate>Tue, 26 Feb 2008 18:57:16 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/Podwysocki/comments/119982.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/Podwysocki/archive/2008/02/26/119982.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/Podwysocki/comments/commentRss/119982.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/Podwysocki/services/trackbacks/119982.aspx</trackback:ping>
        </item>
        <item>
            <title>Aspect Oriented Programming with .NET with Windsor</title>
            <link>http://geekswithblogs.net/Podwysocki/archive/2008/01/23/118842.aspx</link>
            <description>&lt;span style="font-weight: bold;"&gt;Update: Fixed some code issue and added a bit more discussion&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
With our &lt;a href="http://tech.groups.yahoo.com/group/dcaltnet/"&gt;DC ALT.NET&lt;/a&gt; group, we've discussed &lt;a href="http://en.wikipedia.org/wiki/Inversion_of_control"&gt;IoC&lt;/a&gt; quite often as part of the discussion.  Some are pretty new to the concepts of using Dependency Injection with these IoC containers.  Instead, you'd find people with overloaded constructors all over the place and mocking out the dependencies in the unit tests and so on.&lt;br /&gt;
&lt;br /&gt;
Anyhow, I have two favorite IoC containers, being &lt;a href="http://codebetter.com/blogs/jeremy.miller"&gt;Jeremy Miller's&lt;/a&gt; &lt;a href="http://structuremap.sourceforge.net/"&gt;StructureMap&lt;/a&gt; and &lt;a href="http://castleproject.org/container/index.html"&gt;Castle Windsor&lt;/a&gt;.  If you unfamiliar how to use Castle Windsor, there is a nice set of tutorials &lt;a href="http://wiki.bittercoder.com/Default.aspx?Page=ContainerTutorials&amp;amp;AspxAutoDetectCookieSupport=1"&gt;here&lt;/a&gt;.  I'd have to say StructureMap is the lightest weight of all of them and I like the &lt;a href="http://codebetter.com/blogs/jeremy.miller/archive/2007/02/20/Preview-of-StructureMap_2700_s-new-Configuration-DSL.aspx"&gt;fluent interfaces for configuration&lt;/a&gt;, but when I need other things as well, like &lt;a href="http://en.wikipedia.org/wiki/Aspect_oriented_programming"&gt;AOP&lt;/a&gt;, I switch to Castle Windsor.  Which brings us to today's post.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-weight: bold;"&gt;Why AOP?&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
With object oriented programming, we try to break down things into small, distinct parts with as little overlap as possible through Separation of Concerns (SoC).  However, some of these concerns defy any sort of encapsulation by having cross-cutting concerns.  Some of these include logging, transactions, security among other things.  &lt;br /&gt;
&lt;br /&gt;
So, what options do we have for AOP in the .NET world?  Well, we have three that are mainstream and supported at this point:&lt;br /&gt;
&lt;ul&gt;
    &lt;li&gt;Castle Windsor&lt;/li&gt;
    &lt;li&gt;Spring.NET&lt;/li&gt;
    &lt;li&gt;PostSharp&lt;/li&gt;
&lt;/ul&gt;
Today I'm going to briefly talk about &lt;a href="http://www.castleproject.org/container/documentation/v1rc3/usersguide/interceptors.html"&gt;Windsor Interceptors&lt;/a&gt;.  It's a powerful concept for being able to intercept calls while using Castle Windsor and quite easy to use.  Let's go through a quick sample.&lt;br /&gt;
&lt;br /&gt;
Castle Windsor has an interface that you must implement in order to write an interceptor called IInterceptor that looks like this:&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: rgb(0, 0, 255);"&gt;public interface&lt;/span&gt; &lt;span style="color: rgb(0, 128, 128);"&gt;IInterceptor&lt;/span&gt;&lt;br /&gt;
{&lt;br /&gt;
    &lt;span style="color: rgb(0, 0, 255);"&gt;void &lt;/span&gt;Intercept(&lt;span style="color: rgb(0, 128, 128);"&gt;IInvocation &lt;/span&gt;invocation);&lt;br /&gt;
} &lt;br /&gt;
&lt;br /&gt;
So, let's create one for a simple logging application:&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: rgb(0, 0, 255);"&gt; public class&lt;/span&gt; &lt;span style="color: rgb(0, 128, 128);"&gt;MeddlingInterceptor &lt;/span&gt;: &lt;span style="color: rgb(0, 128, 128);"&gt;IInterceptor&lt;/span&gt;&lt;br /&gt;
{&lt;br /&gt;
     &lt;span style="color: rgb(0, 0, 255);"&gt;public void&lt;/span&gt; Intercept(&lt;span style="color: rgb(0, 128, 128);"&gt;IInvocation &lt;/span&gt;invocation)&lt;br /&gt;
     {&lt;br /&gt;
          &lt;span style="color: rgb(0, 128, 128);"&gt;Logger&lt;/span&gt;.Write(&lt;span style="color: rgb(51, 153, 102);"&gt;"Entering method "&lt;/span&gt; + invocation.Method.Name + &lt;span style="color: rgb(51, 153, 102);"&gt;" with user "&lt;/span&gt; + &lt;span style="color: rgb(0, 128, 128);"&gt;Thread&lt;/span&gt;.CurrentPrincipal.Identity.Name);&lt;br /&gt;
&lt;br /&gt;
         &lt;span style="color: rgb(51, 153, 102);"&gt;// Maybe do some user validation&lt;/span&gt;&lt;br /&gt;
         invocation.Proceed();&lt;br /&gt;
         &lt;span style="color: rgb(51, 153, 102);"&gt;// Do some stuff afterwards if need be as well&lt;/span&gt;&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
And now let's configure it to use with our class we have already defined called EmployeeRepository.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: rgb(0, 0, 255);"&gt; public class&lt;/span&gt; &lt;span style="color: rgb(0, 128, 128);"&gt;EmployeeRepository &lt;/span&gt;: &lt;span style="color: rgb(0, 128, 128);"&gt;IEmployeeRepository&lt;/span&gt;&lt;br /&gt;
{&lt;br /&gt;
     &lt;span style="color: rgb(0, 0, 255);"&gt;public void&lt;/span&gt; Save(Employee employee)&lt;br /&gt;
     {&lt;br /&gt;
          &lt;span style="color: rgb(51, 153, 102);"&gt;// Calls database to save employee&lt;/span&gt;&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
And inside our config file is this lovely mess:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;component id=”meddlinginterceptor”&lt;br /&gt;
service=”Podwysocki.Interceptors.MeddlingInterceptor,&lt;br /&gt;
    Podwysocki.Interceptors”&lt;br /&gt;
type=”Podwysocki.Interceptors.MeddlingInterceptor,&lt;br /&gt;
    Podwysocki.Interceptors” /&amp;gt;  &lt;br /&gt;
&amp;lt;component id=”employeerepository”&lt;br /&gt;
service=”Podwysocki.Interceptors.IEmployeeRepository,&lt;br /&gt;
    Podwysocki.Interceptorsr”&lt;br /&gt;
type=”Podwysocki.Interceptors.IEmployeeRepository,&lt;br /&gt;
    Podwysocki.Interceptors”&amp;gt;&lt;br /&gt;
  &amp;lt;interceptors&amp;gt;&lt;br /&gt;
    &amp;lt;interceptor&amp;gt;${meddlinginterceptor}&amp;lt;/interceptor&amp;gt;&lt;br /&gt;
  &amp;lt;/interceptors&amp;gt;&lt;br /&gt;
&amp;lt;/component&amp;gt;   &lt;br /&gt;
&lt;br /&gt;
As you can see, I didn't have to change anything in my EmployeeRepository class at all in order for this to work.  It works rather seemlessly.  With the IInvocation interface, I can get the method name, the target, arguments and so on.  But, I also have the ability to reset any of those arguments as well.  &lt;br /&gt;
&lt;br /&gt;
Imagine I want to wrap transactions so that it doesn't appear in my code and just happens behind the scenes.  Well, I can do that too through a given interceptor as well.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: rgb(0, 0, 255);"&gt; public class&lt;/span&gt; &lt;span style="color: rgb(0, 128, 128);"&gt;TransactionInterceptor &lt;/span&gt;: &lt;span style="color: rgb(0, 128, 128);"&gt;IInterceptor&lt;/span&gt;&lt;br /&gt;
{&lt;br /&gt;
     &lt;span style="color: rgb(0, 0, 255);"&gt;public void&lt;/span&gt; Intercept(&lt;span style="color: rgb(0, 128, 128);"&gt;IInvocation &lt;/span&gt;invocation)&lt;br /&gt;
     {&lt;br /&gt;
          &lt;span style="color: rgb(0, 0, 255);"&gt;using&lt;/span&gt;(&lt;span style="color: rgb(0, 128, 128);"&gt;TransactionScope &lt;/span&gt;scope = &lt;span style="color: rgb(0, 0, 255);"&gt;new &lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt;TransactionScope&lt;/span&gt;())&lt;br /&gt;
          {&lt;span style="color: rgb(0, 128, 128);"&gt;&lt;/span&gt;&lt;br /&gt;
                &lt;span style="color: rgb(51, 153, 102);"&gt;// Maybe do some user validation&lt;/span&gt;&lt;br /&gt;
                invocation.Proceed();&lt;span style="color: rgb(51, 153, 102);"&gt;&lt;br /&gt;
          &lt;span style="color: rgb(0, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;/span&gt;      }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Now, do I recommend that?  Well, that's another story because O/RMs are probably a better way to go with handling that, but still this can be done.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-weight: bold;"&gt;AOP in Domain Driven Design???&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
In a &lt;a href="http://geekswithblogs.net/Podwysocki/archive/2008/01/13/118512.aspx"&gt;previous post&lt;/a&gt;, I covered the assertion that proper Domain Driven Design cannot be accomplished without AOP.  The assertion is that the domain model needs to stay as clean as possible, so that all other cross cutting concerns such as logging, transactions, security and whatnot do not belong in your model.  Instead, AOP needs to be implemented.  This of course has been hot topic on the &lt;a href="http://tech.groups.yahoo.com/group/domaindrivendesign/"&gt;Domain Driven Design&lt;/a&gt; mailing list.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://c2.com/cgi/wiki?RandyStafford"&gt;Randy Stafford&lt;/a&gt; had a great response on this thread and I thank him for it.  He seems to indicate that it's not really necessary for most things and I'd have to agree.  To read his responses, they are &lt;a href="http://tech.groups.yahoo.com/group/domaindrivendesign/message/6562"&gt;here&lt;/a&gt; and &lt;a href="http://tech.groups.yahoo.com/group/domaindrivendesign/message/6567"&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-weight: bold;"&gt;Conclusion&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
A lot of the Domain Driven Design stuff has me rereading Eric Evans book again looking for nuggets I missed the first time around, so it's definitely time to get back reading.  I've got way too many books on my pile! &lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.dotnetkicks.com/kick/?url=http://geekswithblogs.net/Podwysocki/archive/2008/01/23/118842.aspx"&gt;&lt;img border="0" src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://geekswithblogs.net/Podwysocki/archive/2008/01/23/118842.aspx" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=118842"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=118842" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/Podwysocki/aggbug/118842.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Matthew Podwysocki</dc:creator>
            <guid>http://geekswithblogs.net/Podwysocki/archive/2008/01/23/118842.aspx</guid>
            <pubDate>Thu, 24 Jan 2008 00:40:15 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/Podwysocki/comments/118842.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/Podwysocki/archive/2008/01/23/118842.aspx#feedback</comments>
            <slash:comments>6</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/Podwysocki/comments/commentRss/118842.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/Podwysocki/services/trackbacks/118842.aspx</trackback:ping>
        </item>
        <item>
            <title>New Book - .NET Domain-Driven Design with C#</title>
            <link>http://geekswithblogs.net/Podwysocki/archive/2008/01/14/118523.aspx</link>
            <description>No, I haven't written a book, well, not just yet.  Anyhow, so far in the Domain Driven Design world, we have a few references of how to do Domain Driven Design.  These books are an invaluable resource for doing DDD, but at the end of the day, they don't have as many end-to-end solutions.  The current books/bibles on DDD are:&lt;br /&gt;
&lt;ul&gt;
    &lt;li&gt;&lt;a href="http://www.amazon.com/Domain-Driven-Design-Tackling-Complexity-Software/dp/0321125215/ref=pd_bbs_sr_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1200319614&amp;amp;sr=8-1"&gt;Domain-Driven Design: Tackling Complexity in the Heart of Software (Evans)&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="http://www.amazon.com/Applying-Domain-Driven-Design-Patterns-Examples/dp/0321268202/ref=pd_bbs_sr_2?ie=UTF8&amp;amp;s=books&amp;amp;qid=1200319614&amp;amp;sr=8-2"&gt;Applying Domain-Driven Design and Patterns: With Examples in C# and .NET (Nilsson)&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="http://www.infoq.com/minibooks/domain-driven-design-quickly"&gt;Domain Driven Design Quickly (Avram) (Free book download)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
Some of these books are great, but left me wanting at a complete end to end solution.  Also, The discussion of Value Objects versus Entities was not very well covered in the Jimmy Nilsson book, which left me a bit frustrated.  So, there is definitely more material needed on the subject.&lt;br /&gt;
&lt;br /&gt;
Tim McCarthy has started a book called &lt;a href="http://www.wiley.com/WileyCDA/WileyTitle/productCd-0470147563.html"&gt;.NET Domain-Driven Design with C# : Problem - Design - Solution&lt;/a&gt; which is due out in April of this year.  This definitely looks promising as an end to end scenario of how to do DDD in the context of .NET solutions.  Tim has also been gracious enough to host the code example from his book on CodePlex, which can be found &lt;a href="http://www.codeplex.com/dddpds"&gt;here&lt;/a&gt;.  Slides are also available from his presentations on &lt;a href="http://blogs.interknowlogy.com/downloads/timmccarthy/itarc2007/Building%20an%20Offline%20Smart%20Client%20using%20Domain-Driven%20Design%20Principles.zip"&gt;"Building an Offline Smart Client using Domain Driven Design Principles"&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Here's the description of the book from the site:&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-style: italic;"&gt;This first technical title of its kind, this is a revolutionary book for the object oriented developer. It takes the reader through the intense process of building a real-world application using Domain-Driven Design principles implemented in C# 3.0 (.NET Framework 3.5). The reader is introduced to a business domain of a real-world Construction Administration application for an architecture firm. The application is ma critical, legacy MS Access application that has outgrown MS Access and is ready to become a full-fledged enterprise application. In each chapter, the relevant part of the domain is modeled out via diagrams and code. The application is built using C#, Windows Presentation Foundation, and other Microsoft technologies and best practices. The main focus of the book is on designing and implementing the domain model and all of the supporting patterns and framework that are built in support of the domain model. The emphasis is on these theories in action through the working application, not on the tools used. The main goal is to show how to take a set of requirements and user scenarios and apply Domain-Driven Design principles to the requirements in order to create a domain model that satisfies both the user requirements and the system requirements.  Various patterns are introduced along the way in order to aid with certain activities such as adapting the domain model to the user interface, synchronizing data between the client and the server, validation, mapping, etc. Although this particular application is a WPF application, most of the design patterns introduced and applied in the book can be used on other types of applications, such as web applications, web services, etc.&lt;/span&gt;&lt;br style="font-style: italic;" /&gt;
&lt;br style="font-style: italic;" /&gt;
&lt;span style="font-style: italic;"&gt;With the Problem-Design-Solution promise and approach, the chapters are broken down into their own modules where the intent is to take the reader through the process from beginning to end while building a complete project with each chapter module. Each chapter establishes the problem, what the reader wants to do, and why it is important, and then what factors and restrictions need to be taken into account. Next the chapter covers how the programmer will solve the problem with an adequate solution that will provide only the best results. Finally, the developer produces code and other materials to better realize the design and solution to the problem. This part of the chapter is where the reader gets hands-on practice at creating code that builds applications. &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Like I said above, it should be an interesting book when it comes out.  I'll do a review once it does as I'm hoping for the best!&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=118523"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=118523" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/Podwysocki/aggbug/118523.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Matthew Podwysocki</dc:creator>
            <guid>http://geekswithblogs.net/Podwysocki/archive/2008/01/14/118523.aspx</guid>
            <pubDate>Mon, 14 Jan 2008 14:19:21 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/Podwysocki/comments/118523.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/Podwysocki/archive/2008/01/14/118523.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/Podwysocki/comments/commentRss/118523.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/Podwysocki/services/trackbacks/118523.aspx</trackback:ping>
        </item>
        <item>
            <title>Domain Driven Design Cannot be Adequately Implemented without DI and AOP</title>
            <link>http://geekswithblogs.net/Podwysocki/archive/2008/01/13/118512.aspx</link>
            <description>There have been a lot of things lately that have been grabbing my attention with regards to &lt;a href="http://domaindrivendesign.org/"&gt;Domain Driven Design&lt;/a&gt; and definitely some things I've missed.  It's all about my continuous learning about this subject that's near and dear to my heart.  Back in 2006, Ramnivas Laddad gave a presentation entitled &lt;a href="http://www.parleys.com/display/PARLEYS/Domain+Driven+Design+with+AOP+and+DI"&gt;Domain Driven Design with AOP and DI&lt;/a&gt;.  In this talk, he asserts that you cannot implement Domain Driven Design without the help of &lt;a href="http://en.wikipedia.org/wiki/Aspect_oriented_programming"&gt;Aspect Oriented Programming&lt;/a&gt; and &lt;a href="http://en.wikipedia.org/wiki/Dependency_injection"&gt;Dependency Injection&lt;/a&gt;.  &lt;br /&gt;
&lt;br /&gt;
He states several problems with DDD as designed by many people.  He contends that our POCOs became only mere data collections when they should have not only the data, but the behaviors as well.  This in turn makes the domain model weak and most of the reliance came upon the service &lt;br /&gt;
&lt;br /&gt;
So, how do we get around those issues?  He contends that in order to have a rich domain object, you need collaboration with other objects.  This means that you need a web of objects that mirrors the domain model.  You also need DI at the domain level, and that using configuration nor factories may suffice for this, hence the DI needed.  Also, crosscutting domain concerns are not mapped well using objects alone.  AOP is needed to address these concerns.  This will cover the tracing, auditing, transaction management and so on. &lt;br /&gt;
&lt;br /&gt;
An indiciation you've already run into that is that your objects have a dependency on transaction management, and that all your business layer logic is exclusively in the service layer.  So, the session really covers that fine grained DI with AOP can help your domain objects gain back some of their smartness and that AOP can keep your domain clean as well.  This session is well worth a listen whether you agree or disagree.&lt;br /&gt;
&lt;br /&gt;
I agree with the assertion that AOP can keep the domain model clean and it's a high priority on my list to do so.  For those looking at AOP, there are a few .NET frameworks worth looking at:&lt;br /&gt;
&lt;ul&gt;
    &lt;li&gt;&lt;a href="http://www.postsharp.org/"&gt;PostSharp (my favorite of the group)&lt;br /&gt;
    &lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="http://www.springframework.net/"&gt;Spring.NET&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="http://www.castleproject.org/container/index.html"&gt;Windsor Interception&lt;br /&gt;
    &lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
I can honestly say I've only looked at PostSharp and Spring.NET for this, so I can't really speak for the others  I've found PostSharp quite easy to use with compile and runtime weaving.  I wish it were more native to the .NET framework as a whole, and I think it may be coming if Microsoft Research releases &lt;a href="http://research.microsoft.com/phoenix/"&gt;Phoenix&lt;/a&gt;.  A download is available on this site for you to give it a go.  &lt;br /&gt;
&lt;br /&gt;
Also, Ramnivas Laddad posted a session on &lt;a href="http://www.parleys.com/display/PARLEYS/Leveraging+Annotations+with+AOP"&gt;Leveraging Annotation with AOP&lt;/a&gt; that is also well worth a watch.&lt;br /&gt;
&lt;br /&gt;
Until next time, Develop, mentor and inspire!&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=118512"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=118512" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/Podwysocki/aggbug/118512.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Matthew Podwysocki</dc:creator>
            <guid>http://geekswithblogs.net/Podwysocki/archive/2008/01/13/118512.aspx</guid>
            <pubDate>Mon, 14 Jan 2008 04:23:07 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/Podwysocki/comments/118512.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/Podwysocki/archive/2008/01/13/118512.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/Podwysocki/comments/commentRss/118512.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/Podwysocki/services/trackbacks/118512.aspx</trackback:ping>
        </item>
        <item>
            <title>Object Mother Pattern versus Test Data Builder Pattern</title>
            <link>http://geekswithblogs.net/Podwysocki/archive/2008/01/08/118362.aspx</link>
            <description>When creating my unit tests, I've been a big believer in the &lt;a href="http://www.c2.com/cgi/wiki?ObjectMother"&gt;Object Mother &lt;/a&gt;pattern for creating state for my immutable value objects.  Basically, I need to put the objects in a valid state in the constructor.  Doing such is usually a pain, however.  Before the ObjectMother pattern, you had code similar to this to create an object in valid state, such as a medical claim.   Remember that we need hundreds of these to capture the variations in our model for our tests.&lt;br /&gt;
&lt;br /&gt;
Claim claim = new Claim(&lt;br /&gt;
     new DateTime(2008, 1, 1), &lt;br /&gt;
     new Provider("Robert", "Jones", &lt;br /&gt;
          new Address("1800 28th St, NW", "Washington", "DC")),&lt;br /&gt;
     new Recipient("James", "Smith",&lt;br /&gt;
          new Address("1210 14th St, SE", "Washington", "DC")),&lt;br /&gt;
     new ClaimLineCollection(&lt;br /&gt;
          new ClaimLine("00308-1")));&lt;br /&gt;
&lt;br style="font-weight: bold;" /&gt;
&lt;span style="font-weight: bold;"&gt;Object Mother&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, quite a mouthful for just one object in the correct state.  Instead, we could just mask it behind the Object Mother approach.  If you're unaware what the Object Mother pattern is, below is the basic idea.&lt;br /&gt;
&lt;br /&gt;
Object Mother starts with the factory pattern, by delivering prefabricated test-ready objects via a simple method call. It moves beyond the realm of the factory by&lt;br /&gt;
&lt;ol&gt;
    &lt;li&gt;facilitating the customization of created objects,&lt;/li&gt;
    &lt;li&gt;providing methods to update the objects during the tests, and&lt;/li&gt;
    &lt;li&gt;if necessary, deleting the object from the database at the completion of the test.&lt;/li&gt;
&lt;/ol&gt;
So, let's come up with an example of this for our problem up above:&lt;br /&gt;
&lt;br /&gt;
Claim claim = ClaimObjectMother.CreateFootSurgeryClaim();&lt;br /&gt;
&lt;br /&gt;
And we would encapsulate the code from above to pass in the appropriate values to that.  But, soon, you'll find that your Object Mother is becoming a God-class and becoming cluttered with every variation that we can for unit testing the claims in our domain.  This can add up to a lot.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-weight: bold;"&gt;Test Data Builder&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
So, what are the alternate approaches?  What about a &lt;a href="http://www.c2.com/cgi/wiki?TestDataBuilder"&gt;Test Data Builder&lt;/a&gt;?  And what is it anyways?  Well, it's just an extension of the &lt;a href="http://www.c2.com/cgi/wiki?BuilderPattern"&gt;Builder Pattern&lt;/a&gt; to create our test objects for testing our domain.  I got the inspiration after reading a &lt;a href="http://dotnet.org.za/cjlotz/archive/2007/01/09/using-a-dsl-to-create-a-fluent-interface-for-unit-testing-your-domain-model.aspx"&gt;post from Carel Lotz&lt;/a&gt; a while back.  Although he insists it's more of a DSL instead of the Builder Pattern.  And as you can note, this approach was combined with the Object Mother instead of using this as a complete alternate.&lt;br /&gt;
&lt;br /&gt;
Let's take a look at an example of this:&lt;br /&gt;
&lt;br /&gt;
public class ClaimBuilder&lt;br /&gt;
{&lt;br /&gt;
     private DateTime claimDate;&lt;br /&gt;
     private Provider provider = ProviderBuilder.StartRecording().Build();&lt;br /&gt;
     private Recipient recipient = RecipientBuilder.StartRecording().Build();&lt;br /&gt;
     private ClaimLineCollection claimLines = ClaimLinesBuilder.StartRecording.Build();&lt;br /&gt;
&lt;br /&gt;
     public static ClaimBuilder StartRecording()&lt;br /&gt;
     {&lt;br /&gt;
          return new ClaimBuilder();&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     public ClaimBuilder WithClaimDate(DateTime claimDate)&lt;br /&gt;
     {&lt;br /&gt;
          this.claimDate = claimDate;&lt;br /&gt;
          return this;&lt;br /&gt;
     }&lt;br /&gt;
     &lt;br /&gt;
     public ClaimBuilder WithProvider(Provider provider)&lt;br /&gt;
     {&lt;br /&gt;
          this.provider = provider;&lt;br /&gt;
          return this;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     public ClaimBuilder WithRecipient(Recipient recipient)&lt;br /&gt;
     {&lt;br /&gt;
          this.recipient = recipient;&lt;br /&gt;
          return this;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     public ClaimBuilder WithClaimLines(ClaimLineCollection claimLines)&lt;br /&gt;
     {&lt;br /&gt;
          this.claimLines = claimLines;&lt;br /&gt;
          return this;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     public Claim Build()&lt;br /&gt;
     {&lt;br /&gt;
          return new Claim(claimDate, provider, recipient, claimLines);&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
As you can see, the implementation of a Builder pattern is rather easy.  But, how easy is it to implement our test cases?&lt;br /&gt;
&lt;br /&gt;
Claim claim = ClaimBuilder.StartRecording()&lt;br /&gt;
     .WithClaimDate(new DateTime(2008, 1, 1))&lt;br /&gt;
     .WithProvider(ProviderBuilder.StartRecording()&lt;br /&gt;
          .WithName("Robert", "Jones")&lt;br /&gt;
          .WithAddress(AddressBuilder.StartRecording()&lt;br /&gt;
               .WithStreetAddress("1800 28th St, NW")&lt;br /&gt;
               .WithCity("Washington")&lt;br /&gt;
               .WithState("DC")&lt;br /&gt;
               .Build())&lt;br /&gt;
           .Build())&lt;br /&gt;
      .Build())&lt;br /&gt;
     .WithRecipient(RecipientBuilder.StartRecording()&lt;br /&gt;
          .WithName(James", "Smith")&lt;br /&gt;
          .WithAddress(AddressBuilder.StartRecording()&lt;br /&gt;
               .WithStreetAddress("1210 14th St, SE",)&lt;br /&gt;
               .WithCity("Washington")&lt;br /&gt;
               .WithState("DC")&lt;br /&gt;
               .Build())&lt;br /&gt;
           .Build())&lt;br /&gt;
      .Build())&lt;br /&gt;
     .WithClaimLines(ClaimLinesBuilder.StartRecording()&lt;br /&gt;
          .WithClaim("00308-1")&lt;br /&gt;
          .Build())&lt;br /&gt;
     .Build());&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-weight: bold;"&gt;Conclusion&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
You can shorten things up a bit with these builders to not be as verbose as I am right here.  I could not care about certain parts of my domain when building these objects and choose to fill in only things I need to in order to my tests to pass.  Overall, I think this helps the readability of the test data that I am using.  What's really powerful is having builders interact with other builders to create complete test cases for our domain.  I think I'm leaning towards this for my Entity objects as well.  I'll continue looking at this and trying to tweak it a bit.
&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.dotnetkicks.com/kick/?url=http://geekswithblogs.net/Podwysocki/archive/2008/01/08/118362.aspx"&gt;&lt;img border="0" src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://geekswithblogs.net/Podwysocki/archive/2008/01/08/118362.aspx" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=118362"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=118362" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/Podwysocki/aggbug/118362.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Matthew Podwysocki</dc:creator>
            <guid>http://geekswithblogs.net/Podwysocki/archive/2008/01/08/118362.aspx</guid>
            <pubDate>Tue, 08 Jan 2008 06:11:11 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/Podwysocki/comments/118362.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/Podwysocki/archive/2008/01/08/118362.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/Podwysocki/comments/commentRss/118362.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/Podwysocki/services/trackbacks/118362.aspx</trackback:ping>
        </item>
        <item>
            <title>.NET 3.5, Design by contract and Spec# Wrapup</title>
            <link>http://geekswithblogs.net/Podwysocki/archive/2008/01/07/118360.aspx</link>
            <description>&lt;span style="font-weight: bold;"&gt;Update: Adding Visual Studio Integration discussion&lt;br /&gt;
Update: Stay tuned for additional posts in this series as things permit&lt;br /&gt;
&lt;/span&gt; &lt;br /&gt;
Well, this is my last post in the series to wrap things up.  This will be updated as things come to mind, as they always do in a series like this.  There may have been unclear things that I will attempt to explain a little further, plus clarify and explore new things.&lt;br /&gt;
&lt;br /&gt;
Let's get caught up from the series:&lt;br /&gt;
&lt;a href="http://geekswithblogs.net/Podwysocki/archive/2007/12/10/117542.aspx"&gt;Part 1: Spec# introduction&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://geekswithblogs.net/Podwysocki/archive/2007/12/12/117613.aspx"&gt;Part 2: Method Contracts (Preconditions/Postconditions)&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://geekswithblogs.net/Podwysocki/archive/2007/12/16/117755.aspx"&gt;Part 3: Invariants&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://geekswithblogs.net/Podwysocki/archive/2007/12/28/118045.aspx"&gt;Part 4: Object Ownership/Assertions &amp;amp; Assumptions&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://geekswithblogs.net/Podwysocki/archive/2008/01/04/118226.aspx"&gt;Part 5: Frame Conditions/Inheritance/Boogie&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://geekswithblogs.net/Podwysocki/archive/2008/01/06/118311.aspx"&gt;Part 6: Implementing a non-null string collection in Spec#&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Now let's go over some topics I may have missed earlier:&lt;br /&gt;
&lt;ul&gt;
    &lt;li&gt;Constructor behavior&lt;/li&gt;
    &lt;li&gt;Pure methods&lt;/li&gt;
    &lt;li&gt;Immutables&lt;/li&gt;
    &lt;li&gt;Visual Studio Integration with C#&lt;/li&gt;
&lt;/ul&gt;
&lt;span style="font-weight: bold;"&gt;Constructor Behavior&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
When using non-null types in your Spec# code, you need to be careful about when your object is initialized.  In .NET, the order of the calling of constructors is non-deterministic, meaning that the base constructor may be called before the super class's.  In Spec#, if you have a non-null field declared, you must initialize it, so therefore you need to control the order in which the constructors are called.  Fortunately, Spec# gives you that capability, and allows you to call the base constructor at any time during the constructor of your superclass through the use of the &lt;span style="font-weight: bold;"&gt;base &lt;/span&gt;keyword.  Below is an example of that:&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: rgb(0, 0, 255);"&gt;public class&lt;/span&gt; &lt;span style="color: rgb(0, 128, 128);"&gt;NonNullStringCollection&lt;/span&gt;&lt;br /&gt;
{&lt;br /&gt;
     &lt;span style="color: rgb(0, 0, 255);"&gt;private &lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: rgb(0, 0, 255);"&gt;string!&lt;/span&gt;&amp;gt;! strings;&lt;br /&gt;
&lt;br /&gt;
     &lt;span style="color: rgb(0, 0, 255);"&gt;public &lt;/span&gt;NonNullStringCollection()&lt;br /&gt;
     {&lt;br /&gt;
          strings = &lt;span style="color: rgb(0, 0, 255);"&gt;new &lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: rgb(0, 0, 255);"&gt;string!&lt;/span&gt;&amp;gt;();&lt;br /&gt;
          &lt;span style="color: rgb(0, 128, 128);"&gt;Debug&lt;/span&gt;.WriteLine(&lt;span style="color: rgb(51, 153, 102);"&gt;"Before base constructor"&lt;/span&gt;);&lt;br /&gt;
          &lt;span style="color: rgb(0, 0, 255);"&gt;base&lt;/span&gt;(); &lt;span style="color: rgb(51, 153, 102);"&gt;// Must call this after initializing all non-null fields&lt;/span&gt;&lt;br /&gt;
          &lt;span style="color: rgb(0, 128, 128);"&gt;Debug&lt;/span&gt;.WriteLine(&lt;span style="color: rgb(51, 153, 102);"&gt;"After base constructor"&lt;/span&gt;);&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
So, unlike C# and others, we have the ability to control the flow of our constructors.  By this, it is pretty powerful as we need to do this.  How does it look like in IL where I'll highlight where it verifies the call of the constructor&lt;br /&gt;
.method public hidebysig specialname rtspecialname instance void .ctor() cil managed&lt;br /&gt;
{&lt;br /&gt;
    .maxstack 8&lt;br /&gt;
    L_0000: ldarg.0 &lt;br /&gt;
    L_0001: newobj instance void [mscorlib]System.Collections.Generic.List`1&amp;lt;string modopt([System.Compiler.Runtime]Microsoft.Contracts.NonNullType)&amp;gt;::.ctor()&lt;br /&gt;
    L_0006: stfld class [mscorlib]System.Collections.Generic.List`1&amp;lt;string modopt([System.Compiler.Runtime]Microsoft.Contracts.NonNullType)&amp;gt; modopt([System.Compiler.Runtime]Microsoft.Contracts.NonNullType) SpecSharpSample.NonNullStringCollection::data&lt;br /&gt;
    L_000b: ldstr "Before base constructor"&lt;br /&gt;
    L_0010: call void [System]System.Diagnostics.Debug::WriteLine(string)&lt;br /&gt;
    L_0015: ldarg.0 &lt;br /&gt;
&lt;span style="background-color: rgb(255, 255, 0);"&gt;    L_0016: call instance void [mscorlib]System.Object::.ctor()&lt;/span&gt;&lt;br /&gt;
    L_001b: ldstr "After base constructor"&lt;br /&gt;
    L_0020: call void [System]System.Diagnostics.Debug::WriteLine(string)&lt;br /&gt;
    L_0025: ret &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
If you look at the C# version through Reflector, you'll notice no difference whatsoever:&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: rgb(0, 0, 255);"&gt;public &lt;/span&gt;NonNullStringCollection()&lt;br /&gt;
{&lt;br /&gt;
    &lt;span style="color: rgb(0, 0, 255);"&gt;this&lt;/span&gt;.data = &lt;span style="color: rgb(0, 0, 255);"&gt;new &lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: rgb(0, 0, 255);"&gt;string modopt&lt;/span&gt;(&lt;span style="color: rgb(0, 128, 128);"&gt;NonNullType&lt;/span&gt;)&amp;gt;();&lt;br /&gt;
    &lt;span style="color: rgb(0, 128, 128);"&gt;Debug&lt;/span&gt;.WriteLine(&lt;span style="color: rgb(51, 153, 102);"&gt;"Before base constructor"&lt;/span&gt;);&lt;br /&gt;
    &lt;span style="color: rgb(0, 128, 128);"&gt;Debug&lt;/span&gt;.WriteLine(&lt;span style="color: rgb(51, 153, 102);"&gt;"After base constructor"&lt;/span&gt;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-weight: bold;"&gt;Pure Methods&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
If you want to call a method in a specification, then the method you call must be pure, which means it has no effect on the state of objects allocated at the time the method is called.  In order for a method to be considered pure, it must be marked with the &lt;span style="font-weight: bold;"&gt;PureAttribute&lt;/span&gt;, &lt;span style="font-weight: bold;"&gt;ConfinedAttribute &lt;/span&gt;or &lt;span style="font-weight: bold;"&gt;StateIndependentAttribute &lt;/span&gt;in the Microsoft.Contracts namespace.  In order to do this, it's rather easy:&lt;br /&gt;
&lt;br /&gt;
[&lt;span style="color: rgb(0, 128, 128);"&gt;Pure&lt;/span&gt;]&lt;br /&gt;
&lt;span style="color: rgb(0, 0, 255);"&gt;public void&lt;/span&gt; DoesNotModifyState() { ... }&lt;br /&gt;
&lt;br /&gt;
All three of the above attributes mark the method as pure.  It also declares what the method may read, so let's look at that below:&lt;br /&gt;
&lt;ul&gt;
    &lt;li&gt;&lt;span style="font-weight: bold;"&gt;PureAttribute &lt;/span&gt;- this method may read anything&lt;/li&gt;
    &lt;li&gt;&lt;span style="font-weight: bold;"&gt;ConfinedAttribute &lt;/span&gt;- this method can only read the state of the receiver object and its representation objects&lt;/li&gt;
    &lt;li&gt;&lt;span style="font-weight: bold;"&gt;StateIndependentAttribtue &lt;/span&gt;- this method does not read any mutable part of the heap.&lt;/li&gt;
&lt;/ul&gt;
Over time, it's the plan of the team to migrate to just a simple &lt;span style="font-weight: bold;"&gt;PureAttribute &lt;/span&gt;and I'm not sure as of this writing if that is done.  The default read permission is set to the &lt;span style="font-weight: bold;"&gt;ConfinedAttribute&lt;/span&gt;, so until the name change is complete, it's best to use that one.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-weight: bold;"&gt;Immutables&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Some objects in the .NET framework will remain "peer consistent" forever once their constructor has finished.  Recall back to the ownership and invariants discussion for that definition.  If a type is marked with the ImmutableAttribute, then the fields and such are not allowed to be modified once it has left the constructor.  To think about these, think of such objects as DateTime, Guid and other value objects, by the fact that you cannot modify them once they have been created.&lt;br /&gt;
&lt;br /&gt;
[&lt;span style="color: rgb(0, 128, 128);"&gt;Immutable&lt;/span&gt;]&lt;br /&gt;
&lt;span style="color: rgb(0, 0, 255);"&gt;public class&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt;Coordinate&lt;/span&gt;&lt;br /&gt;
{&lt;br /&gt;
     &lt;span style="color: rgb(0, 0, 255);"&gt;public &lt;/span&gt;Coordinate()&lt;br /&gt;
     {&lt;br /&gt;
          &lt;span style="color: rgb(0, 0, 255);"&gt;this&lt;/span&gt;.longitude = LongitudeMinValue;&lt;br /&gt;
          &lt;span style="color: rgb(0, 0, 255);"&gt;this&lt;/span&gt;.latitude = LatitudeMaxValue;&lt;br /&gt;
          &lt;span style="color: rgb(0, 0, 255);"&gt;base&lt;/span&gt;();&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     &lt;span style="color: rgb(0, 0, 255);"&gt;public &lt;/span&gt;Coordinate(&lt;span style="color: rgb(0, 0, 255);"&gt;double &lt;/span&gt;latitude, &lt;span style="color: rgb(0, 0, 255);"&gt;double &lt;/span&gt;longitude)&lt;br /&gt;
     {&lt;br /&gt;
          &lt;span style="color: rgb(0, 0, 255);"&gt;this&lt;/span&gt;.longitude = longitude;&lt;br /&gt;
          &lt;span style="color: rgb(0, 0, 255);"&gt;this&lt;/span&gt;.latitude = latitude;&lt;br /&gt;
          &lt;span style="color: rgb(0, 0, 255);"&gt;base&lt;/span&gt;();&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     &lt;span style="color: rgb(0, 0, 255);"&gt;public &lt;/span&gt;Coordinate Add(&lt;span style="color: rgb(0, 0, 255);"&gt;double &lt;/span&gt;latitude, &lt;span style="color: rgb(0, 0, 255);"&gt;double &lt;/span&gt;longitude)&lt;br /&gt;
     {&lt;br /&gt;
          &lt;span style="color: rgb(0, 0, 255);"&gt;return new&lt;/span&gt; Coordinate(&lt;span style="color: rgb(0, 0, 255);"&gt;this&lt;/span&gt;.latitude + latitude, longitude + &lt;span style="color: rgb(0, 0, 255);"&gt;this&lt;/span&gt;.longitude);&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
As you can note, I'm not changing this after I've finished constructing them.  I don't mean Value Objects in the DDD sense of the word, although it could possibly apply here as well when it comes to Entities versus Value Objects.  Anyhow, by default, these value objects are peer consistent.  The String class is immutable, so your program can always invoke methods on strings because since it is always immutable, it will always be peer consistent.&lt;br /&gt;
&lt;br /&gt;
In order to make your own objects immutable, you need to make sure it has no peers.  The static verifier, Boogie, checks to make sure no expose operations (&lt;span style="font-weight: bold;"&gt;expose &lt;/span&gt;keyword) is applied in the class as well.  Fields using the &lt;span style="font-weight: bold;"&gt;PeerAttribute &lt;/span&gt;are not allowed in immutable classes.  Also, there is no need to own an immutable object, since the reason for owning an object is to keep it peer consistent, and by default, immutable objects are peer consistent.&lt;br /&gt;
&lt;br /&gt;
There are three restrictions you must note when using an immutable object.&lt;br /&gt;
&lt;ul&gt;
    &lt;li&gt;A Constructor of an immutable class must end by calling its base constructor.&lt;/li&gt;
    &lt;li&gt;Can only be declared if the base class is also immutable&lt;/li&gt;
    &lt;li&gt;A class or interface that derives from an immutable type must also be declared immutable.&lt;/li&gt;
&lt;/ul&gt;
Let's wrap this up with pure methods.  An immutable class can only invoke pure methods on its fields due to the state of the object not being allowed to change.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-weight: bold;"&gt;Visual Studio Integration with C#&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
When you install Spec# for Visual Studio 2005, by default it will install the project templates for Spec#, which includes the standard stuff plus a few extras including:&lt;br /&gt;
&lt;ul&gt;
    &lt;li&gt;Class Library&lt;/li&gt;
    &lt;li&gt;Windows Application&lt;/li&gt;
    &lt;li&gt;Console Application&lt;/li&gt;
    &lt;li&gt;Sample Projects
    &lt;ul&gt;
        &lt;li&gt;ArrayList&lt;/li&gt;
        &lt;li&gt;Bag&lt;/li&gt;
        &lt;li&gt;Subclass with Invariant&lt;/li&gt;
        &lt;li&gt;Use Mscorlib contracts&lt;/li&gt;
    &lt;/ul&gt;
    &lt;/li&gt;
&lt;/ul&gt;
Now when you choose to use the Spec# templates, you give up a lot of the C# features that you have come to love.  This also hurts especially when using a tool such as Resharper to make me a productive developer.  You also give up auto-indentation as well, so if you want it, you do it yourself!&lt;br /&gt;
&lt;br /&gt;
But, on the positive side of things, you get the feedback from the static verifier to give you the red and green squigglies that display not only syntax errors, but also theorem prover errors coming from Boogie.  How cool is that?  Also, as I mentioned in a previous post, you get Intellisense to display the contracts of other classes as you highlight them.&lt;br /&gt;
&lt;br /&gt;
But, say for instance, you still want the rich environment of C# to do Spec#.  Well, you can do that, too.  In my first post in the series, I alluded to the fact that you could do Spec# in C# but to comment it out so that C# doesn't detect it, but Spec# will.&lt;br /&gt;
&lt;br /&gt;
To make a non-liar out of me, create a new C# project, and right click on the project and go to properties and you should see this following screen:&lt;br /&gt;
&lt;br /&gt;
&lt;img alt="C# with Spec# Contracts" src="http://geekswithblogs.net/images/geekswithblogs_net/Podwysocki/4686/r_SpecSharp_Contracts.png" /&gt;&lt;br /&gt;
&lt;br /&gt;
This screen allows you to do compile time checks on your code as you build it.  First, the project will build in C#, and then hand it off to Spec# for your post-compilation.  It's probably a similar process to what the BCL team did when they incorporated the Microsoft.Contracts namespace into System.Core.dll.&lt;br /&gt;
&lt;br /&gt;
To use these Spec# contracts in your C# code, it's as simple as commenting out your contracts with this:&lt;br /&gt;
/*^ Do Spec# thing here; ^*/&lt;br /&gt;
&lt;br /&gt;
Below is a quick example of this:&lt;br /&gt;
&lt;br style="color: rgb(0, 0, 255);" /&gt;
&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public class&lt;/span&gt; &lt;span style="color: rgb(0, 128, 128);"&gt;NonNullStringCollection&lt;/span&gt;&lt;br /&gt;
{&lt;br /&gt;
    &lt;span style="color: rgb(0, 0, 255);"&gt;private &lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt;&lt;span style="color: rgb(51, 153, 102);"&gt;/*^!^*/&lt;/span&gt;&amp;gt;&lt;span style="color: rgb(51, 153, 102);"&gt;/*^!^*/&lt;/span&gt; strings;&lt;br /&gt;
&lt;br /&gt;
    &lt;span style="color: rgb(0, 0, 255);"&gt;public &lt;/span&gt;NonNullStringCollection()&lt;br /&gt;
    {&lt;br /&gt;
        strings = new List&amp;lt;string/*^!^*/&amp;gt;();&lt;br /&gt;
        &lt;span style="color: rgb(51, 153, 102);"&gt;/*^base();^*/&lt;/span&gt;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    &lt;span style="color: rgb(0, 0, 255);"&gt;public void&lt;/span&gt; Add(&lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt;&lt;span style="color: rgb(51, 153, 102);"&gt;/*^!^*/&lt;/span&gt; value)&lt;br /&gt;
        &lt;span style="color: rgb(51, 153, 102);"&gt;/*^requires value != null;^*/&lt;/span&gt;&lt;br /&gt;
       &lt;span style="color: rgb(51, 153, 102);"&gt; /*^ensures Count == old(Count) + 1;^*/&lt;/span&gt;&lt;br /&gt;
    {&lt;br /&gt;
        strings.Add(value);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    &lt;span style="color: rgb(0, 0, 255);"&gt;public int&lt;/span&gt; Count&lt;br /&gt;
    {&lt;br /&gt;
        &lt;span style="color: rgb(0, 0, 255);"&gt;get&lt;/span&gt;&lt;br /&gt;
            &lt;span style="color: rgb(51, 153, 102);"&gt;/*^ensures result &amp;gt;= 0; ^*/&lt;/span&gt;&lt;br /&gt;
        {&lt;br /&gt;
            &lt;span style="color: rgb(0, 0, 255);"&gt;return &lt;/span&gt;strings.Count;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Let's look at the constructor to make sure our base constructor gets called last:&lt;br /&gt;
&lt;br /&gt;
    .method public hidebysig specialname rtspecialname instance void .ctor() cil managed&lt;br /&gt;
    {&lt;br /&gt;
        .maxstack 8&lt;br /&gt;
        L_0000: ldarg.0 &lt;br /&gt;
        L_0001: newobj instance void [mscorlib]System.Collections.Generic.List`1&amp;lt;string modopt([System.Compiler.Runtime]Microsoft.Contracts.NonNullType)&amp;gt;::.ctor()&lt;br /&gt;
        L_0006: stfld class [mscorlib]System.Collections.Generic.List`1&amp;lt;string modopt([System.Compiler.Runtime]Microsoft.Contracts.NonNullType)&amp;gt; modopt([System.Compiler.Runtime]Microsoft.Contracts.NonNullType) NonNullTypes.NonNullStringCollection::strings&lt;br /&gt;
        L_000b: ldarg.0 &lt;br /&gt;
&lt;span style="background-color: rgb(255, 255, 0);"&gt;        L_000c: call instance void [mscorlib]System.Object::.ctor()&lt;/span&gt;&lt;br /&gt;
        L_0011: ret &lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
If you try compiling without marking base(); in the constructor, you might notice it right at the top of the method call.  Also, let's take a look at the resulting C# created for the Add Method:&lt;br /&gt;
&lt;br /&gt;
[Requires("::!=(optional([System.Compiler.Runtime]Microsoft.Contracts.NonNullType,string),string){$1,null}", Filename=@"E:\Work\NonNullTypes\NonNullStringCollection.cs", StartLine=0x12, StartColumn=0x19, EndLine=0x12, EndColumn=0x26, SourceText="value != null"), Ensures(@"::==(i32,i32){this@NonNullTypes.NonNullStringCollection::get_Count{},::+(i32,i32){\old(this@NonNullTypes.NonNullStringCollection::get_Count{}),1}}", Filename=@"E:\Work\NonNullTypes\NonNullStringCollection.cs", StartLine=0x13, StartColumn=0x18, EndLine=0x13, EndColumn=0x2f, SourceText="Count == old(Count) + 1")]&lt;br /&gt;
public void Add(string modopt(NonNullType) value)&lt;br /&gt;
{&lt;br /&gt;
    int old(Count);&lt;br /&gt;
    try&lt;br /&gt;
    {&lt;br /&gt;
        if (value == null)&lt;br /&gt;
        {&lt;br /&gt;
            throw new ArgumentNullException("value");&lt;br /&gt;
        }&lt;br /&gt;
        if (value == null)&lt;br /&gt;
        {&lt;br /&gt;
            throw new RequiresException("Precondition 'value != null' violated from method 'NonNullTypes.NonNullStringCollection.Add(optional(Microsoft.Contracts.NonNullType) System.String)'");&lt;br /&gt;
        }&lt;br /&gt;
        old(Count) = this.Count;&lt;br /&gt;
    }&lt;br /&gt;
    catch (ContractMarkerException)&lt;br /&gt;
    {&lt;br /&gt;
        throw;&lt;br /&gt;
    }&lt;br /&gt;
    this.strings.Add(value);&lt;br /&gt;
    try&lt;br /&gt;
    {&lt;br /&gt;
        if (this.Count != (old(Count) + 1))&lt;br /&gt;
        {&lt;br /&gt;
            throw new EnsuresException("Postcondition 'Count == old(Count) + 1' violated from method 'NonNullTypes.NonNullStringCollection.Add(optional(Microsoft.Contracts.NonNullType) System.String)'");&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    catch (ContractMarkerException)&lt;br /&gt;
    {&lt;br /&gt;
        throw;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-weight: bold;"&gt;Conclusion&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
So, as you can note, there are plenty more opportunities to dig deeper and I hope you all get the bug to do so.  If I missed anything, let me know!  I would love to use such a thing in production, but it's not designed for such right now.  Also, the licensing states that it's for academic uses only at this point.  But, who knows what the future holds for this.  Design, mentor and inspire!&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.dotnetkicks.com/kick/?url=http://geekswithblogs.net/Podwysocki/archive/2008/01/07/118360.aspx"&gt;&lt;img border="0" alt="kick it on DotNetKicks.com" src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://geekswithblogs.net/Podwysocki/archive/2008/01/07/118360.aspx" /&gt;&lt;/a&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=118360"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=118360" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/Podwysocki/aggbug/118360.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Matthew Podwysocki</dc:creator>
            <guid>http://geekswithblogs.net/Podwysocki/archive/2008/01/07/118360.aspx</guid>
            <pubDate>Tue, 08 Jan 2008 04:07:47 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/Podwysocki/comments/118360.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/Podwysocki/archive/2008/01/07/118360.aspx#feedback</comments>
            <slash:comments>7</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/Podwysocki/comments/commentRss/118360.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/Podwysocki/services/trackbacks/118360.aspx</trackback:ping>
        </item>
        <item>
            <title>DC ALT.NET Meeting 1/15/2008</title>
            <link>http://geekswithblogs.net/Podwysocki/archive/2008/01/02/118175.aspx</link>
            <description>We are announcing our second meeting of &lt;a href="http://tech.groups.yahoo.com/group/dcaltnet/"&gt;DC ALT.NET&lt;/a&gt; on January 15th at 7PM.  &lt;br /&gt;
&lt;br /&gt;
The meeting this month will bring ALT.NET to &lt;a href="http://www.cmap-online.org"&gt;CMAP&lt;/a&gt;.  Are you a developer who always keeps an eye out for a better way? Do you look outside the mainstream to adopt the best practices of any development community, including Open Source, Agile, Java, and Ruby communities? Are you always looking for more elegant, more simple, more maintainable solutions? If so, then you might be an ALT.NET practitioner!&lt;br /&gt;
 &lt;br /&gt;
This group follows the &lt;a href="http://en.wikipedia.org/wiki/Open_Space_Technology"&gt;Open Space Technology&lt;/a&gt; model.  In Open Space, a facilitator explains the process and then participants are invited to co-create the agenda and host their own discussion groups. &lt;br /&gt;
 &lt;br /&gt;
This model follows the four basic principles:&lt;br /&gt;
&lt;ul&gt;
    &lt;li&gt;Whoever comes are the right people&lt;/li&gt;
    &lt;li&gt;Whatever happens is the only thing that could have&lt;/li&gt;
    &lt;li&gt;Whenever it starts is the right time&lt;/li&gt;
    &lt;li&gt;When it's over, it's over&lt;/li&gt;
&lt;/ul&gt;
Topics for discussion can include the following as well as others:&lt;br /&gt;
&lt;ul&gt;
    &lt;li&gt;Model View Controller Pattern (ASP.NET MVC/MonoRail)&lt;br /&gt;
    &lt;/li&gt;
    &lt;li&gt;Inversion of Control (IoC) containers and Dependency Injection (Spring.NET/Castle Windsor/StructureMap)&lt;/li&gt;
    &lt;li&gt;O/RM Tools (NHibernate/ActiveRecord/Entity Framework/LINQ)&lt;/li&gt;
    &lt;li&gt;Test Driven Development&lt;/li&gt;
    &lt;li&gt;Domain Driven Design&lt;/li&gt;
    &lt;li&gt;Behavior Driven Development&lt;/li&gt;
    &lt;li&gt;Design by Contract and Spec#&lt;/li&gt;
    &lt;li&gt;Enterprise Design Patterns in .NET&lt;/li&gt;
&lt;/ul&gt;
&lt;span style="font-weight: bold;"&gt;Time and Location:&lt;br /&gt;
&lt;/span&gt;Tuesday, January 15, 2008 7:00 PM&lt;br /&gt;
&lt;br /&gt;
SM Consulting&lt;br /&gt;
1306 Concourse Drive&lt;br /&gt;
Suite 200&lt;br /&gt;
Linthicum, MD 21090&lt;br /&gt;
&lt;br /&gt;
Come, participate, and make your voice heard!  Come meet passionate developers like yourself in the active discussion&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=118175"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=118175" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/Podwysocki/aggbug/118175.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Matthew Podwysocki</dc:creator>
            <guid>http://geekswithblogs.net/Podwysocki/archive/2008/01/02/118175.aspx</guid>
            <pubDate>Thu, 03 Jan 2008 04:31:32 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/Podwysocki/comments/118175.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/Podwysocki/archive/2008/01/02/118175.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/Podwysocki/comments/commentRss/118175.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/Podwysocki/services/trackbacks/118175.aspx</trackback:ping>
        </item>
        <item>
            <title>Making Myself Better for 2008</title>
            <link>http://geekswithblogs.net/Podwysocki/archive/2008/01/01/118129.aspx</link>
            <description>Last year was a very good year for me, but I'm always looking for ways to learn more and better myself for the next year.  After all, it is hard to top 2007, the year in which I buy a house, get married and have a great honeymoon in Italy.  So, somehow I need to top myself yet again!&lt;br /&gt;
&lt;br /&gt;
Anyhow, these are the things I'm looking to do this year to make me a better designer, developer, etc:&lt;br /&gt;
&lt;ul&gt;
    &lt;li&gt;General
    &lt;ul&gt;
        &lt;li&gt;Read a new book a month&lt;/li&gt;
        &lt;li&gt;Run a marathon (Well, only running 5 miles a day right now)&lt;/li&gt;
    &lt;/ul&gt;
    &lt;/li&gt;
    &lt;li&gt;General Development
    &lt;ul&gt;
        &lt;li&gt;Give more user group presentations (DC ALT.NET/CMAP/etc)&lt;br /&gt;
        &lt;/li&gt;
        &lt;li&gt;Master Ruby and Boo&lt;/li&gt;
        &lt;li&gt;Continue deep dive with MVC frameworks&lt;/li&gt;
        &lt;li&gt;Contribute more to open source&lt;/li&gt;
    &lt;/ul&gt;
    &lt;/li&gt;
    &lt;li&gt;ALT.NET
    &lt;ul&gt;
        &lt;li&gt;Organize an ALT.NET Code Camp Track&lt;/li&gt;
    &lt;/ul&gt;
    &lt;ul&gt;
        &lt;li&gt;Stay active in the &lt;a href="http://tech.groups.yahoo.com/group/dcaltnet/"&gt;DC ALT.NET&lt;/a&gt; community and the ALT.NET community as a whole&lt;/li&gt;
    &lt;/ul&gt;
    &lt;/li&gt;
    &lt;li&gt;Blogging
    &lt;ul&gt;
        &lt;li&gt;More posts with coding examples&lt;/li&gt;
        &lt;li&gt;More downloadable samples&lt;br /&gt;
        &lt;/li&gt;
        &lt;li&gt;Be more responsive to questions (sorry about that)&lt;/li&gt;
        &lt;li&gt;Explore BDD and DDD more&lt;/li&gt;
    &lt;/ul&gt;
    &lt;/li&gt;
&lt;/ul&gt;
Rather ambitious, I know, but it's always great to look back earlier on the year to see what changed over the year and what really happened.&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=118129"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=118129" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/Podwysocki/aggbug/118129.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Matthew Podwysocki</dc:creator>
            <guid>http://geekswithblogs.net/Podwysocki/archive/2008/01/01/118129.aspx</guid>
            <pubDate>Wed, 02 Jan 2008 03:25:59 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/Podwysocki/comments/118129.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/Podwysocki/archive/2008/01/01/118129.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/Podwysocki/comments/commentRss/118129.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/Podwysocki/services/trackbacks/118129.aspx</trackback:ping>
        </item>
        <item>
            <title>Starting Junior Programmers on the Right Agile Track Guidance</title>
            <link>http://geekswithblogs.net/Podwysocki/archive/2008/01/01/118125.aspx</link>
            <description>Part of my job is not only to design and implement solutions for my customers, but also to make my customer's developers stronger as well.  During these customer engagements, there are many times when junior developers are involved.  My job is to help those on the team to be stronger and then in turn help become leaders.&lt;br /&gt;
&lt;br style="font-weight: bold;" /&gt;
&lt;span style="font-weight: bold;"&gt;Where to start?&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Well, I could start with a stack of point technology books (ASP.NET, SharePoint, BizTalk, etc) that become obsolete right during their printing, so that's not where I start.  You find that many times, the books were written during the beta phase of the product and sure enough, things change, rapidly...  But, I will mention a few that earn my admiration that form a basis for a good development background.&lt;br /&gt;
&lt;br /&gt;
So, first things first, surveys are always in order to find out the comfort level with such things as:&lt;br /&gt;
&lt;ul&gt;
    &lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/Agile_software_development"&gt;Agile Software Development &lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/Scrum_(development)"&gt;Scrum&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/Domain_driven_design"&gt;Domain Driven Design&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/Test_Driven_Development"&gt;Test Driven Development&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/Object_oriented_design"&gt;Object Oriented Design&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/Design_pattern_%28computer_science%29"&gt;Enterprise Design Patterns&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/Trustworthy_Computing_Security_Development_Lifecycle"&gt;Secure Development Lifecycle&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;Point Technologies (ASP.NET/BizTalk/SharePoint/WCF/WPF/etc)&lt;br /&gt;
    &lt;/li&gt;
&lt;/ul&gt;
So, as you can see, it's quite a list of things to cover.  But, no matter, we can come up with a list of things to know and teach and how to do it.&lt;br /&gt;
&lt;br style="font-weight: bold;" /&gt;
&lt;span style="font-weight: bold;"&gt;Topics to Know&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
When it comes to making stronger Agile Object Oriented Designers/Programmers, it's important that they know a few topics inside and out.  They can be found easily on the net and some books that I will feature later on.  Some of these include:&lt;br /&gt;
&lt;ul&gt;
    &lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/Separation_of_concerns"&gt;Separation of Concerns&lt;br /&gt;
    &lt;/a&gt;Breaking a program into distinct features that overlap in functionality as little as possible.  A concern is any interest or focus in a program.  Concerns are synonymous with features or behaviors.&lt;br /&gt;
    &lt;br /&gt;
    &lt;/li&gt;
    &lt;li&gt;&lt;a href="http://www.objectmentor.com/resources/articles/lsp.pdf"&gt;Liskov Substitution Principle&lt;/a&gt;&lt;br /&gt;
    Subtypes must be substitutable for their base types&lt;br /&gt;
    &lt;br /&gt;
    &lt;/li&gt;
    &lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/Law_of_Demeter"&gt;Law of Demeter&lt;/a&gt;&lt;br /&gt;
    A given object should assume as little as possible about the structure or properties of anything else, including its subcomponents.&lt;br /&gt;
    &lt;br /&gt;
    &lt;/li&gt;
    &lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/Single_responsibility_principle"&gt;Single Responsibility Principle&lt;/a&gt;&lt;br /&gt;
    Every object should have a single responsibility, and that all its services should be narrowly aligned with that responsibility.&lt;br /&gt;
    &lt;br /&gt;
    &lt;/li&gt;
    &lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/Open/closed_principle"&gt;Open/Close Principle&lt;/a&gt;&lt;br /&gt;
    Software entities should be open for extension, but closed for modification.  The entity can allows its behavior to be modified without modifying the source code.&lt;br /&gt;
    &lt;br /&gt;
    &lt;/li&gt;
    &lt;li&gt;&lt;a href="http://www.objectmentor.com/resources/articles/isp.pdf"&gt;Interface Segregation Principle&lt;/a&gt;&lt;br /&gt;
    Modules that encapsulate high level policy should not depend upon modules that implement details. Rather, both kinds of modules should depend upon abstractions. Abstract classes should not depend upon concrete classes and concrete classes should depend upon abstract classes.  Clients should not be forced to depend on methods that they do not use.&lt;br /&gt;
    &lt;br /&gt;
    &lt;/li&gt;
    &lt;li&gt;&lt;a href="http://www.objectmentor.com/resources/articles/dip.pdf"&gt;Dependency Inversion Principle&lt;/a&gt;&lt;br /&gt;
    Virtual member functions of derived classes must expect no more than the corresponding member functions of the base class; and should promise no less. It also means that virtual member functions that are present in base classes must also be present in the derived classes; and they must do useful work.&lt;/li&gt;
&lt;/ul&gt;
&lt;span style="font-weight: bold;"&gt;Stocking the Library&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Knowing these fundamentals go a long way to making a stronger object oriented programmer.  Ok, so reading just an article or two doesn't always make things sink in.  Some books may be in order to help as well:  Let's walk through some fundamental books for solid developers.  Note that these do not include any point technologies, and instead focuses on gaining strong fundamental skills.  It's not enough to pick up an ASP.NET book, and boom, you're a solid developer.  So, let's go through some of them:&lt;br /&gt;
&lt;ul&gt;
    &lt;li&gt;Agile/Development Principles
    &lt;ul&gt;
        &lt;li&gt;&lt;a href="http://www.amazon.com/Code-Complete-Practical-Handbook-Construction/dp/0735619670/ref=pd_bbs_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1199233200&amp;amp;sr=1-1"&gt;Code Complete: A Practical Handbook of Software Construction (Steve McConnell)&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
    &lt;ul&gt;
        &lt;li&gt;&lt;a href="http://www.amazon.com/Software-Development-Principles-Patterns-Practices/dp/0135974445/ref=pd_bbs_sr_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1199233133&amp;amp;sr=1-1"&gt;Agile Software Development, Principles, Patterns, and Practices (Robert C. Martin)&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
    &lt;ul&gt;
        &lt;li&gt;&lt;a href="http://www.amazon.com/gp/product/0131857258/ref=pd_cp_b_1?pf_rd_p=317711001&amp;amp;pf_rd_s=center-41&amp;amp;pf_rd_t=201&amp;amp;pf_rd_i=0135974445&amp;amp;pf_rd_m=ATVPDKIKX0DER&amp;amp;pf_rd_r=0HG2ECVVCNYSHN1FR7YZ"&gt; Agile Principles, Patterns, and Practices in C# (Robert C. Martin)&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="http://www.amazon.com/Agile-Software-Development-SCRUM-Schwaber/dp/0130676349/ref=pd_bbs_sr_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1199233534&amp;amp;sr=1-1"&gt;Agile Software Development with SCRUM (Ken Schwaber)&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="http://www.amazon.com/User-Stories-Applied-Development-Addison-Wesley/dp/0321205685/ref=pd_sim_b_title_2"&gt;User Stories Applied: For Agile Software Development (Mike Cohn)&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="http://www.amazon.com/Practices-Agile-Developer-Pragmatic-Programmers/dp/097451408X/ref=pd_bbs_sr_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1199236912&amp;amp;sr=1-1"&gt;Practices of an Agile Developer: Working in the Real World (Andrew Hunt)&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
    &lt;/li&gt;
    &lt;li&gt;General Development
    &lt;ul&gt;
        &lt;li&gt;&lt;span class="sans"&gt;&lt;a href="http://www.amazon.com/Release-Production-Ready-Software-Pragmatic-Programmers/dp/0978739213/ref=pd_bbs_sr_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1199233841&amp;amp;sr=1-1"&gt;Release It!: Design and Deploy Production-Ready Software (Michael Nygard)&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
        &lt;li&gt;&lt;span class="sans"&gt;&lt;a href="http://www.amazon.com/Practical-Guide-Successful-Software-Projects/dp/0974514047/ref=pd_sim_b_title_1"&gt;Ship it! A Practical Guide to Successful Software Projects (Jared Richardson)&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
        &lt;li&gt;&lt;span class="sans"&gt;&lt;a href="http://www.amazon.com/Pragmatic-Programmer-Journeyman-Master/dp/020161622X/ref=pd_bbs_sr_2?ie=UTF8&amp;amp;s=books&amp;amp;qid=1199237108&amp;amp;sr=1-2"&gt;The Pragmatic Programmer: From Journeyman to Master (Andrew Hunt)&lt;/a&gt;&lt;br /&gt;
        &lt;/span&gt;&lt;/li&gt;
    &lt;/ul&gt;
    &lt;/li&gt;
    &lt;li&gt;Design Patterns
    &lt;ul&gt;
        &lt;li&gt;&lt;a href="http://www.amazon.com/Head-First-Object-Oriented-Analysis-Design/dp/0596008678/ref=pd_bbs_sr_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1199233726&amp;amp;sr=1-1"&gt;Head First Object-Oriented Analysis and Design (Brett McLaughlin)&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
    &lt;ul&gt;
        &lt;li&gt;&lt;a href="http://www.amazon.com/Enterprise-Application-Architecture-Addison-Wesley-Signature/dp/0321127420/ref=pd_sim_b_title_4"&gt;Patterns of Enterprise Application Architecture (Martin Fowler)&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
    &lt;ul&gt;
        &lt;li&gt;&lt;a href="http://www.amazon.com/Design-Patterns-Object-Oriented-Addison-Wesley-Professional/dp/0201633612/ref=pd_bbs_sr_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1199232867&amp;amp;sr=1-1"&gt;Design Patterns: Elements of Reusable Object-Oriented Software (GoF)&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
    &lt;ul&gt;
        &lt;li&gt;&lt;span class="sans"&gt;&lt;/span&gt;&lt;a href="http://www.amazon.com/gp/product/0596007124/ref=pd_cp_b_1?pf_rd_p=317711001&amp;amp;pf_rd_s=center-41&amp;amp;pf_rd_t=201&amp;amp;pf_rd_i=0131857258&amp;amp;pf_rd_m=ATVPDKIKX0DER&amp;amp;pf_rd_r=1K37N2EEDGV00EXDWS3N"&gt;Head First Design Patterns (Elisabeth Freeman)&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
    &lt;/li&gt;
    &lt;li&gt;Domain Driven Design
    &lt;ul&gt;
        &lt;li&gt;&lt;a href="http://www.amazon.com/Domain-Driven-Design-Tackling-Complexity-Software/dp/0321125215/ref=pd_bxgy_b_text_b"&gt;Domain-Driven Design: Tackling Complexity in the Heart of Software (Eric Evans)&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="http://www.amazon.com/gp/product/0321268202/ref=pd_cp_b_2?pf_rd_p=317711001&amp;amp;pf_rd_s=center-41&amp;amp;pf_rd_t=201&amp;amp;pf_rd_i=0131857258&amp;amp;pf_rd_m=ATVPDKIKX0DER&amp;amp;pf_rd_r=1K37N2EEDGV00EXDWS3N"&gt;Applying Domain-Driven Design and Patterns: With Examples in C# and .NET (Jimmy Nilsson)&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
    &lt;/li&gt;
    &lt;li&gt;Test Driven Development
    &lt;ul&gt;
        &lt;li&gt;&lt;a href="http://www.amazon.com/Test-Driven-Development-Addison-Wesley-Signature/dp/0321146530/ref=pd_bxgy_b_text_b"&gt;&lt;span class="sans"&gt;Test Driven Development: By Example (Kent Beck)&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;span class="sans"&gt;&lt;a href="http://www.amazon.com/xUnit-Test-Patterns-Refactoring-Addison-Wesley/dp/0131495054/ref=pd_sim_b_title_4"&gt;xUnit Test Patterns: Refactoring Test Code (Gerard Meszaros)&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
        &lt;li&gt;&lt;span class="sans"&gt;&lt;a href="http://www.amazon.com/Pragmatic-Unit-Testing-NUnit-2nd/dp/0977616673/ref=pd_bbs_sr_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1199237007&amp;amp;sr=1-1"&gt;Pragmatic Unit Testing in C# with NUnit, 2nd Edition (Andrew Hunt)&lt;/a&gt;&lt;br /&gt;
        &lt;/span&gt;&lt;/li&gt;
    &lt;/ul&gt;
    &lt;/li&gt;
    &lt;li&gt;&lt;span class="sans"&gt;Refactoring&lt;br /&gt;
    &lt;/span&gt;
    &lt;ul&gt;
        &lt;li&gt;&lt;span class="sans"&gt;&lt;a href="http://www.amazon.com/gp/product/0201485672/ref=pd_cp_b_2?pf_rd_p=317711001&amp;amp;pf_rd_s=center-41&amp;amp;pf_rd_t=201&amp;amp;pf_rd_i=0131495054&amp;amp;pf_rd_m=ATVPDKIKX0DER&amp;amp;pf_rd_r=1C6EE2KWZS34QERKHWY0"&gt;Refactoring: Improving the Design of Existing Code (Martin Fowler)&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
    &lt;/ul&gt;
    &lt;ul&gt;
        &lt;li&gt;&lt;span class="sans"&gt;&lt;a href="http://www.amazon.com/Refactoring-Patterns-Addison-Wesley-Signature-Kerievsky/dp/0321213351/ref=pd_sim_b_title_3"&gt;Refactoring to Patterns (Joshua Kerievsky)&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
    &lt;/ul&gt;
    &lt;span class="sans"&gt;&lt;/span&gt;     &lt;span class="sans"&gt;&lt;/span&gt;     &lt;/li&gt;
    &lt;li&gt;&lt;span class="sans"&gt;Secure Development Lifecycle&lt;br /&gt;
    &lt;/span&gt;
    &lt;ul&gt;
        &lt;li&gt;&lt;span class="sans"&gt;&lt;a href="http://www.amazon.com/Security-Development-Lifecycle-Michael-Howard/dp/0735622140/ref=pd_bbs_sr_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1199240336&amp;amp;sr=8-1"&gt;The Security Development Lifecycle (Michael Howard)&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
    &lt;/ul&gt;
    &lt;ul&gt;
        &lt;li&gt;&lt;span class="sans"&gt;&lt;a href="http://www.amazon.com/Writing-Secure-Second-Michael-Howard/dp/0735617228/ref=pd_sim_b_title_5"&gt;Writing Secure Code, Second Edition (Michael Howard)&lt;br /&gt;
        &lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
    &lt;/ul&gt;
    &lt;span class="sans"&gt;&lt;/span&gt;     &lt;/li&gt;
&lt;/ul&gt;
But what about technical books diving into point technologies, well, there are some of them that come highly recommended:&lt;br /&gt;
&lt;ul&gt;
    &lt;li&gt;C#/.NET Framework
    &lt;ul&gt;
        &lt;li&gt;&lt;a href="http://www.amazon.com/CLR-via-Second-Pro-Developer/dp/0735621632/ref=pd_bbs_sr_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1199236492&amp;amp;sr=8-1"&gt;CLR via C#, Second Edition (Jeffrey Richter)&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
    &lt;ul&gt;
        &lt;li&gt;&lt;a href="http://www.amazon.com/Framework-Design-Guidelines-Conventions-Development/dp/0321246756/ref=pd_bbs_2?ie=UTF8&amp;amp;s=books&amp;amp;qid=1199236492&amp;amp;sr=8-2"&gt;Framework Design Guidelines: Conventions, Idioms, and Patterns for Reusable .NET Libraries (Krzysztof Cwalina)&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
    &lt;/li&gt;
&lt;/ul&gt;
This by no means is an exhaustive list, but a way to get started.  By no means should they read all these books at once and should be tailored for those who need work in those related areas.  These books will get the junior developer starting to think abstractly in a more agile mindset.  But, how do you reinforce these behaviors in the development environment.  It's not enough to read a few articles, a few books and call it a day.  &lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-weight: bold;"&gt;Going to the next level&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
In order for those developers to get to that next level, paired programming is the key.  This can reinforce what they have learned in a nuturing environment and even those who are more senior programmers can still learn a thing or two.  One great way to get this kick started is to do Test Driven Development between programmers.  Have the first programmer write a unit test and have it fail.  Hand the keyboard off to the next programmer and have them make the unit test succeed.  Then work on refactoring and move onto the next.  Simple things like these go a long way.&lt;br /&gt;
&lt;br /&gt;
Mentoring is also important.  Have a mentor assigned to check how the junior developer is doing with learning these new concepts.  Follow-up from the mentors is important as you track their progress.  Make time to answer questions and challenge them.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-weight: bold;"&gt;What about Agile?&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Many organizations in the software development world don't work in an Agile mindset, so what are some of the ways to get there?  An Agile Coach is a great way to start an organization on the right step.  No, they aren't the Agile Police, nor should they be.  The Agile Coach brings quite a few things to an organization.  These can include:&lt;br /&gt;
&lt;ul&gt;
    &lt;li&gt;Ramping an organization up on agile processes and ways of thinking&lt;/li&gt;
    &lt;li&gt;Experience with the Agile Process&lt;/li&gt;
    &lt;li&gt;An effective agent of change&lt;/li&gt;
    &lt;li&gt;Environment assessment&lt;/li&gt;
    &lt;li&gt;Being a certified Scrum Master&lt;/li&gt;
&lt;/ul&gt;
Holding brown bag sessions is quite important in reinforcing learned ideas and learning new things.  Of course you must make it worth people's while to attend.  These can also get the junior developers more excited and involved and people can take turns creating these sessions and presenting.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-weight: bold;"&gt;Conclusion&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
I hope this post gets you in the mindset of changing organizations for the better, getting junior developers to become stronger ones and creating a more dynamic atmosphere.  This of course is only the beginning on a lifetime or learning and being challenged.  Develop, mentor and inspire! &lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.dotnetkicks.com/kick/?url=http://geekswithblogs.net/Podwysocki/archive/2008/01/01/118125.aspx"&gt;&lt;img border="0" src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://geekswithblogs.net/Podwysocki/archive/2008/01/01/118125.aspx" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=118125"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=118125" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/Podwysocki/aggbug/118125.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Matthew Podwysocki</dc:creator>
            <guid>http://geekswithblogs.net/Podwysocki/archive/2008/01/01/118125.aspx</guid>
            <pubDate>Wed, 02 Jan 2008 00:53:05 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/Podwysocki/comments/118125.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/Podwysocki/archive/2008/01/01/118125.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/Podwysocki/comments/commentRss/118125.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/Podwysocki/services/trackbacks/118125.aspx</trackback:ping>
        </item>
        <item>
            <title>Domain Driven Design Videos &amp; Podcasts &amp; Links</title>
            <link>http://geekswithblogs.net/Podwysocki/archive/2007/12/28/118036.aspx</link>
            <description>For those like me interested in &lt;a href="http://domaindrivendesign.org/"&gt;Domain Driven Design (DDD)&lt;/a&gt;, I have worked to compile a list of videos and podcasts to learn more about it.  For those unfamiliar with DDD, the idea was founded by Eric Evans in his 2004 book, &lt;a href="http://www.amazon.com/Domain-Driven-Design-Tackling-Complexity-Software/dp/0321125215"&gt;Domain-Driven Design: Tackling Complexity in the Heart of Software&lt;/a&gt;.  Jimmy Nilsson followed this with a very nice book using C# called &lt;a href="http://www.amazon.com/Applying-Domain-Driven-Design-Patterns-Examples/dp/0321268202/ref=tag_dpp_lp_edpp_ttl_ex"&gt;Applying Domain-Driven Design and Patterns: With Examples in C# and .NET&lt;/a&gt; that is well worth reading.  &lt;br /&gt;
&lt;br /&gt;
DDD was founded on two principles:&lt;br /&gt;
&lt;ul&gt;
    &lt;li&gt;For most software projects, the primary focus should be on the domain and domain logic (as opposed to being the particular technology used to implement the system)&lt;/li&gt;
    &lt;li&gt;Complex domain designs should be based on a model.&lt;/li&gt;
&lt;/ul&gt;
Also, DDD should use a common language for describing system requirements that works for both business analysts and software developers alike.  DDD also includes the design patterns such as the following:&lt;br /&gt;
&lt;ul&gt;
    &lt;li&gt;&lt;span style="font-weight: bold;"&gt;Entities&lt;/span&gt; - An object in the domain model that is not defined by its attributes, but rather by a thread of continuity and identity.&lt;br /&gt;
    &lt;/li&gt;
    &lt;li&gt;&lt;span style="font-weight: bold;"&gt;Value Objects&lt;/span&gt; - An object that has no conceptual identity. These objects describe a characteristic of a thing.&lt;br /&gt;
    &lt;/li&gt;
    &lt;li&gt;&lt;span style="font-weight: bold;"&gt;Repository&lt;/span&gt; - methods for retrieving domain objects should delegate to a specialized repository object such that alternative implementations may be easily interchanged.&lt;br /&gt;
    &lt;/li&gt;
    &lt;li&gt;&lt;span style="font-weight: bold;"&gt;Factory&lt;/span&gt; - methods for creating domain objects should delegate to a specialized factory object such that alternative implementations may be easily interchanged.&lt;br /&gt;
    &lt;/li&gt;
    &lt;li&gt;&lt;span style="font-weight: bold;"&gt;Service&lt;/span&gt; - when an operation does not conceptually belong to any object. Following the natural contours of the problem, you can implement these operations in services.&lt;/li&gt;
&lt;/ul&gt;
Ok, now that the introduction is out of the way, onto the links and videos:&lt;br /&gt;
&lt;ul&gt;
    &lt;li&gt;&lt;a href="http://www.infoq.com/interviews/domain-driven-design-eric-evans"&gt;Eric Evans on Domain Driven Design&lt;br /&gt;
    &lt;/a&gt;Ever since Eric Evans wrote the book Domain-Driven Design in 2004 he has been a significant voice advancing domain modeling and design concepts. In this interview with Floyd Marinescu he talks about some of the recent refinements in Domain-Driven Design and how people are advancing the field today.&lt;br /&gt;
    &lt;/li&gt;
    &lt;li&gt;&lt;a href="http://www.dotnetrocks.com/default.aspx?showNum=236"&gt;Eric Evans on .NET Rocks&lt;/a&gt;&lt;br /&gt;
    &lt;span style="left: 57px; top: 51px;" id="ctl00_ContentPlaceHolder1_lblShowDescription"&gt;Eric Evans offers his insights on good software development using Domain Driven Design techniques. &lt;/span&gt;&lt;br /&gt;
    &lt;br /&gt;
    &lt;/li&gt;
    &lt;li&gt;&lt;a href="http://www.infoq.com/presentations/strategic-design-evans"&gt;Eric Evans on DDD: Strategic Design&lt;/a&gt;&lt;br /&gt;
    This talk introduces two broad principles for strategic design. 'Context mapping' addresses the fact that different groups model differently. 'Core domain' distills a shared vision of the system's "core domain" and provides a systematic guide to when "good enough" is good enough versus when to push for excellence.&lt;br /&gt;
    &lt;br /&gt;
    &lt;/li&gt;
    &lt;li&gt;&lt;a href="http://www.infoq.com/presentations/model-to-work-evans"&gt;Eric Evans on DDD: Putting the Model to Work&lt;/a&gt;&lt;br /&gt;
    This talk will outline some of the foundations of domain-driven design:How models are chosen and evaluated;How multiple models coexist;How the patterns help avoid the common pitfalls, such as overly interconnected models;How developers and domain experts together in a DDD team engage in deeper exploration of their problem domain and make that understanding tangible as a practical software design.&lt;br /&gt;
    &lt;br /&gt;
    &lt;/li&gt;
    &lt;li&gt;&lt;a href="http://www4.java.no/javazone/2005/torrents/Eric.Evans-Domain.Driven.Design.avi.torrent"&gt;Eric Evans - Three Practical Steps Toward Domain-Driven Design (torrent)&lt;/a&gt;&lt;br /&gt;
    Eric Evans has a talk from JavaZone 2005 available via torrent with three practical steps toward DDD.&lt;br /&gt;
    &lt;br /&gt;
    &lt;/li&gt;
    &lt;li&gt;&lt;a href="http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design"&gt;Jimmy Nilsson on Domain Driven Design&lt;/a&gt;&lt;br /&gt;
    Jimmy Nilsson, author of 'Applying Domain-Driven Design', talks about the value proposition of Domain Driven Design and how DDD integrates with Agile. Jimmy also answers questions on OOD vs. DDD and the symbiotic relationship of domain specific relationships with DDD.&lt;br /&gt;
    &lt;br /&gt;
    &lt;/li&gt;
    &lt;li&gt;&lt;a href="http://www.se-radio.net/podcast/2006-03/episode-8-interview-eric-evans"&gt;Software Engineering Radio - Episode 8 - Eric Evans&lt;/a&gt;&lt;br /&gt;
    In this interview, Eric talks about the essential building blocks of domain-driven design as well as about a set of best practices on how to address complex projects. In a third part, he elaborates on the relationship of domain-driven design and MDSD/MDA.&lt;br /&gt;
    &lt;br /&gt;
    &lt;/li&gt;
    &lt;li&gt;&lt;a href="http://www.dotnetrocks.com/default.aspx?showID=194"&gt;.NET Rocks! - Jimmy Nilsson on Domain Driven Design&lt;/a&gt;&lt;br /&gt;
    In this episode, Jimmy Nilsson gets into Domain Driven Design, and how it relates to Test Driven Development, extreme programming, and the future of programming techniques in general.&lt;br /&gt;
    &lt;br /&gt;
    &lt;/li&gt;
    &lt;li&gt;&lt;a href="http://www.infoq.com/articles/aspects-of-domain-model-mgmt"&gt;Aspects of Domain Model Management &lt;/a&gt;(Not a video, but interesting)&lt;br /&gt;
    Using a domain model is rarely as easy as just creating the actual domain model classes and then using them. Soon enough one discovers that sizable amounts of infrastructure code will also be required in support of the domain model.&lt;br /&gt;
    &lt;br /&gt;
    &lt;/li&gt;
    &lt;li&gt;&lt;a href="http://groups.yahoo.com/group/domaindrivendesign/"&gt;Domain Driven Design Yahoo Group&lt;/a&gt;&lt;br /&gt;
    Most of your DDD related questions can be answered here.&lt;/li&gt;
&lt;/ul&gt;
So, as you can see, there is a lot to read and listen to.  I know for my long rides to and from work that they are quite good listens.  Develop, mentor and inspire! &lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.dotnetkicks.com/kick/?url=http://geekswithblogs.net/Podwysocki/archive/2007/12/28/118036.aspx"&gt;&lt;img border="0" alt="kick it on DotNetKicks.com" src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://geekswithblogs.net/Podwysocki/archive/2007/12/28/118036.aspx" /&gt;&lt;/a&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=118036"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=118036" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/Podwysocki/aggbug/118036.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Matthew Podwysocki</dc:creator>
            <guid>http://geekswithblogs.net/Podwysocki/archive/2007/12/28/118036.aspx</guid>
            <pubDate>Fri, 28 Dec 2007 17:06:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/Podwysocki/comments/118036.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/Podwysocki/archive/2007/12/28/118036.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/Podwysocki/comments/commentRss/118036.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/Podwysocki/services/trackbacks/118036.aspx</trackback:ping>
        </item>
    </channel>
</rss>