<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/"><channel><title>Domain-Driven Design</title><link>http://blogs.interknowlogy.com/timmccarthy/category/122.aspx</link><description>Domain-Driven Design</description><dc:language>en-US</dc:language><generator>.Text Version 0.95.2004.111</generator><item><dc:creator>Tim McCarthy</dc:creator><title>My 11/6/2007 .NET Developers Group Presentation</title><link>http://blogs.interknowlogy.com/timmccarthy/archive/2007/11/07/22445.aspx</link><pubDate>Wed, 07 Nov 2007 12:50:00 GMT</pubDate><guid>http://blogs.interknowlogy.com/timmccarthy/archive/2007/11/07/22445.aspx</guid><description>&lt;p&gt;Here are the &lt;A href="http://blogs.interknowlogy.com/downloads/timmccarthy/itarc2007/Building%20an%20Offline%20Smart%20Client%20using%20Domain-Driven%20Design%20Principles.zip" target="_blank"&gt;slides&lt;/a&gt; and here is the &lt;a href="http://www.codeplex.com/dddpds/SourceControl/ListDownloadableCommits.aspx" target="_blank"&gt;code&lt;/a&gt; from my presentation yesterday.  Thanks to everyone who attended, I thoroughly I enjoyed discussing my upcoming book with you guys!&lt;/p&gt;
&lt;p&gt;By the way, here is the link to my book on the Wiley web site:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.wiley.com/WileyCDA/WileyTitle/productCd-0470147563.html"&gt;http://www.wiley.com/WileyCDA/WileyTitle/productCd-0470147563.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;&lt;img src ="http://blogs.interknowlogy.com/timmccarthy/aggbug/22445.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Tim McCarthy</dc:creator><title>Slides and Code from my ITARC 2007 Presentation</title><link>http://blogs.interknowlogy.com/timmccarthy/archive/2007/10/16/22277.aspx</link><pubDate>Tue, 16 Oct 2007 21:25:00 GMT</pubDate><guid>http://blogs.interknowlogy.com/timmccarthy/archive/2007/10/16/22277.aspx</guid><description>&lt;P&gt;Here are the &lt;A href="http://blogs.interknowlogy.com/downloads/timmccarthy/itarc2007/Building%20an%20Offline%20Smart%20Client%20using%20Domain-Driven%20Design%20Principles.zip" target=_blank&gt;slides&lt;/A&gt; and here is the &lt;A href="http://www.codeplex.com/dddpds/SourceControl/ListDownloadableCommits.aspx" target=_blank&gt;code&lt;/A&gt; from my presentation today.&amp;nbsp; Once again, a big thank you to all who attended, you were all very helpful to me!&lt;/P&gt;
&lt;P&gt;As&amp;nbsp;I said before my book should be out in April of 2008&amp;#8230;it sure is a lot of work doing a book all by myself&amp;nbsp; :)&lt;/P&gt;&lt;img src ="http://blogs.interknowlogy.com/timmccarthy/aggbug/22277.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Tim McCarthy</dc:creator><title>I am writing a book on Domain-Driven Design</title><link>http://blogs.interknowlogy.com/timmccarthy/archive/2007/03/06/12180.aspx</link><pubDate>Tue, 06 Mar 2007 23:07:00 GMT</pubDate><guid>http://blogs.interknowlogy.com/timmccarthy/archive/2007/03/06/12180.aspx</guid><description>&lt;p&gt;I have been talking to people about this for a while, so I figured I&amp;#8217;d blog about it too.  Actually, I promised my friends over at the &lt;a href="http://tech.groups.yahoo.com/group/domaindrivendesign/" target="_blank"&gt;Domain-Driven Design Yahoo group&lt;/a&gt; that I would!  The full title of the book is .NET Domain-Driven Design with C#: Problem-Design-Solution, and it will be published by Wiley Publishing, Inc.&lt;/p&gt;
&lt;p&gt;The idea behind the book is that it will be a case-study book&amp;#8230;a real-world application that uses Domain-Driven Design (DDD) concepts.  After reading other bloggers&amp;#8217; posts, and hearing people ask for real-world examples on the DDD Yahoo group, I have decided to write a book that addresses this exact topic.  The book is due to be completed at the end of the year, and will probably be out in early 2008.&lt;/p&gt;
&lt;p&gt;My plan is to put some of the issues I run into on this blog and/or the DDD Yahoo group and see what other people have to say about their solutions to similar problems.&lt;/p&gt;&lt;img src ="http://blogs.interknowlogy.com/timmccarthy/aggbug/12180.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Tim McCarthy</dc:creator><title>A Composite Specification Pattern Implementation in .NET 2.0</title><link>http://blogs.interknowlogy.com/timmccarthy/archive/2007/01/22/10863.aspx</link><pubDate>Mon, 22 Jan 2007 16:15:00 GMT</pubDate><guid>http://blogs.interknowlogy.com/timmccarthy/archive/2007/01/22/10863.aspx</guid><description>&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-ALIGN: center" align=center&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;U&gt;&lt;FONT face="Times New Roman"&gt;.NET 2.0 Composite Specification Pattern Implementation&lt;?xml:namespace prefix = o /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/U&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face="Times New Roman"&gt;According to &lt;A href="http://www.martinfowler.com/" target=_blank&gt;Fowler&lt;/A&gt; and &lt;A href="http://domainlanguage.com/about/ericevans.html" target=_blank&gt;Evans&lt;/A&gt;, the idea of using Specifications is to separate the statement of how to match a candidate, from the candidate object that it is matched against.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The main motivation pattern is to be able to select a list of objects from another list using various criteria in a very flexible, robust way.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;A nice side benefit of using Specifications is that they can be used for object validation/constraints as well as for building objects to order (like in a &lt;/FONT&gt;&lt;A href="http://en.wikipedia.org/wiki/Factory_pattern" target=_blank&gt;Factory&lt;/A&gt;&lt;FONT face="Times New Roman"&gt;).&amp;nbsp; I was first introduced to this pattern from reading Eric Evans&amp;#8217; excellent book, &lt;A href="http://domaindrivendesign.org/books/index.html#DDD" target=_blank&gt;Domain-Driven Design&lt;/A&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face="Times New Roman"&gt;I have implemented the&amp;nbsp;&lt;/FONT&gt;&lt;A href="http://www.martinfowler.com/apsupp/spec.pdf" target=_blank&gt;Specification pattern&lt;/A&gt;&lt;FONT face="Times New Roman"&gt; using the&amp;nbsp;&lt;/FONT&gt;&lt;A href="http://en.wikipedia.org/wiki/Composite_pattern" target=_blank&gt;Composite pattern&lt;/A&gt;&lt;FONT face="Times New Roman"&gt; in order to provide the ability to combine Specifications in various ways.&amp;nbsp; I really needed this in a project, and I was surprised that I could not find any .NET implementations out in the blogoshpere, so I went ahead and wrote my own, with a little help from Reflection and Generics.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face="Times New Roman"&gt;Here is the basic diagram of the top-level classes:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;A href="http://blogs.interknowlogy.com/downloads/timmccarthy/images/CompositeSpecificationClassDiagram.jpg" target=_blank&gt;&lt;IMG height=558 alt=LeafNodesClassDiagram hspace=0 src="/downloads/timmccarthy/images/CompositeSpecificationClassDiagram.jpg" width=640 border=0&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman"&gt;&lt;/FONT&gt;&lt;/o:p&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face="Times New Roman"&gt;For the AndSpecification and OrSpecification classes, they both take two ISpecification instances in their constructors, which represent the classes to be AND&amp;#8217;ed or OR&amp;#8217;ed together.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face="Times New Roman"&gt;Here is a diagram of the Leaf-node classes of the Composite:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;A href="http://blogs.interknowlogy.com/downloads/timmccarthy/images/LeafNodesClassDiagram.jpg" target=_blank&gt;&lt;IMG height=558 alt=LeafNodesClassDiagram hspace=0 src="/downloads/timmccarthy/images/LeafNodesClassDiagram.jpg" width=640 border=0&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face="Times New Roman"&gt;As you can see in this diagram, every Leaf is actually a Composite, which makes it very easy to combine Specifications.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Below is a code example of how to combine specifications and use them:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: gray; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;///&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: gray; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SUMMARY&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: gray; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;///&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;A test for IsSatisfiedBy (TCandidate)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: gray; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;///&lt;/SUMMARY&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;[&lt;SPAN style="COLOR: teal"&gt;TestMethod&lt;/SPAN&gt;()]&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;public&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; &lt;SPAN style="COLOR: blue"&gt;void&lt;/SPAN&gt; CustomerIsSatisfiedByEqualAndStartsWithTest()&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: teal"&gt;TestCustomer&lt;/SPAN&gt; candidate = &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;TestCustomer&lt;/SPAN&gt;();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;candidate.FirstName = &lt;SPAN style="COLOR: maroon"&gt;"Tim"&lt;/SPAN&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;candidate.LastName = &lt;SPAN style="COLOR: maroon"&gt;"McCarthy"&lt;/SPAN&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;bool&lt;/SPAN&gt; expected = &lt;SPAN style="COLOR: blue"&gt;true&lt;/SPAN&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;bool&lt;/SPAN&gt; actual = &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;EqualSpecification&lt;/SPAN&gt;&amp;lt;&lt;SPAN style="COLOR: teal"&gt;TestCustomer&lt;/SPAN&gt;, &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt;&amp;gt;(&lt;SPAN style="COLOR: maroon"&gt;"FirstName"&lt;/SPAN&gt;, &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: maroon"&gt;"Tim"&lt;/SPAN&gt;).And(&lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;StartsWithSpecification&lt;/SPAN&gt;&amp;lt;&lt;SPAN style="COLOR: teal"&gt;TestCustomer&lt;/SPAN&gt;, &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt;&amp;gt;(&lt;SPAN style="COLOR: maroon"&gt;"LastName"&lt;/SPAN&gt;, &lt;SPAN style="COLOR: maroon"&gt;"M"&lt;/SPAN&gt;)).IsSatisfiedBy(candidate);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: teal"&gt;Assert&lt;/SPAN&gt;.AreEqual(expected, actual, &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="COLOR: maroon"&gt;"The CompositeSpecification did not return the expected value."&lt;/SPAN&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="mso-no-proof: yes"&gt;&lt;FONT face="Times New Roman"&gt;In this example, an EqualSpecification is combined with a StartsWithSpecification to perform two tests on the candidate object, which happens to be a TestCustomer type.&amp;nbsp;&amp;nbsp;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="mso-no-proof: yes"&gt;&lt;FONT face="Times New Roman"&gt;The first test specifies that the FirstName property of the TestCustomer instance (the candidate) is equal to &amp;#8220;Tim&amp;#8221;.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The second test specifies that the LastName property of the TestCustomer instance (the candidate) starts with the character &amp;#8220;M&amp;#8221;.&amp;nbsp;&amp;nbsp;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="mso-no-proof: yes"&gt;&lt;FONT face="Times New Roman"&gt;The power of this is that the tests by themselves are very granular and easy to understand, yet also very easy to combine and execute, as evidenced by how the code sample combined two specifications on one line of code.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="mso-no-proof: yes"&gt;&lt;FONT face="Times New Roman"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="mso-no-proof: yes"&gt;&lt;FONT face="Times New Roman"&gt;The code for the implementation (as well as a sample application) can be found &lt;A href="http://blogs.interknowlogy.com/downloads/timmccarthy/DDDTalkOC/Code.zip"&gt;here&lt;/A&gt;.&amp;nbsp; Enjoy!&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="mso-no-proof: yes"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="mso-no-proof: yes"&gt;[5/22/2007:&amp;nbsp; I moved the code for this project over to CodePlex.&amp;nbsp; It can now be accessed here:&amp;nbsp; &lt;A href="http://www.codeplex.com/spec"&gt;http://www.codeplex.com/spec&lt;/A&gt;]&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="mso-no-proof: yes"&gt;&lt;/SPAN&gt;&lt;SPAN style="mso-no-proof: yes"&gt;&lt;FONT face="Times New Roman"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="mso-no-proof: yes"&gt;&lt;FONT face="Times New Roman"&gt;I definitely welcome any feedback on this code as well.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;img src ="http://blogs.interknowlogy.com/timmccarthy/aggbug/10863.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Tim McCarthy</dc:creator><title>My talk on Domain Driven Design for the OC C#/VB.NET/Architecture User Groups</title><link>http://blogs.interknowlogy.com/timmccarthy/archive/2006/12/13/9534.aspx</link><pubDate>Wed, 13 Dec 2006 08:51:00 GMT</pubDate><guid>http://blogs.interknowlogy.com/timmccarthy/archive/2006/12/13/9534.aspx</guid><description>&lt;p&gt;First off, I have to say that I had a great audience, very intuitive and sharp!  I am posting my slides and code again (even though I just gave this talk last week in San Diego) since I went through and added a bunch of stuff to it.  &lt;/p&gt;
&lt;p&gt;Here are my latest &lt;A href="http://blogs.interknowlogy.com/downloads/timmccarthy/DDDTalkOC/DDD.zip" target="_blank"&gt;slides&lt;/a&gt; and &lt;A href="http://blogs.interknowlogy.com/downloads/timmccarthy/DDDTalkOC/Code.zip" target="_blank"&gt;code&lt;/a&gt;.  As promised, in the code contains a full-blown .NET implementation of the Composite Specification pattern using .NET Generics.&lt;/p&gt;
&lt;p&gt;Enjoy!&lt;/p&gt;&lt;img src ="http://blogs.interknowlogy.com/timmccarthy/aggbug/9534.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Tim McCarthy</dc:creator><title>My talk on Domain Driven Design for San Diego .NET Developers Group</title><link>http://blogs.interknowlogy.com/timmccarthy/archive/2006/12/06/9351.aspx</link><pubDate>Wed, 06 Dec 2006 11:34:00 GMT</pubDate><guid>http://blogs.interknowlogy.com/timmccarthy/archive/2006/12/06/9351.aspx</guid><description>&lt;p&gt;That was a fun talk!  Here are my &lt;A href="http://blogs.interknowlogy.com/downloads/timmccarthy/DDDTalkSDDNDG/DDD.zip" target="_blank"&gt;slides&lt;/a&gt; and here is my &lt;A href="http://blogs.interknowlogy.com/downloads/timmccarthy/DDDTalkSDDNDG/Code.zip" target="_blank"&gt;code&lt;/a&gt;.  As promised, here is a diagram of the latest DDD framework that I have developed:&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;&lt;img height="748" alt="DomainObjectsClassDiagram" src="/downloads/timmccarthy/DDDTalkSDDNDG/DomainObjectsClassDiagram.jpg" width="1291" border="0" /&gt;&lt;img src ="http://blogs.interknowlogy.com/timmccarthy/aggbug/9351.aspx" width = "1" height = "1" /&gt;</description></item></channel></rss>