<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-32609450</id><updated>2025-01-20T18:51:34.754+00:00</updated><category term="DDD"/><category term="Unit Testing"/><category term="Design"/><category term="TDD"/><category term="BDD"/><category term="NHibernate"/><category term="ALT.NET"/><category term="Mocking"/><category term="TypeMock"/><category term="DDD Example"/><category term="Interaction Testing"/><category term="Team System"/><category term="AOP"/><category term="Agile"/><category term="Books"/><category term="REST"/><category term="WCF"/><category term="Dependency Injection"/><category term="AltNetUK"/><category term="E-VAN"/><category term="Entity Framework"/><category term="Integration Testing"/><category term="IoC"/><category term="Messaging"/><category term="Pex"/><category term="PostSharp"/><category term="SOA"/><category term="Acceptance Tests"/><category term="Biztalk"/><category term="Blogging"/><category term="Castle"/><category term="Enterprise Library"/><category term="IIS"/><category term="Linq"/><category term="Mass Transit"/><category term="Object Oriented Design"/><category term="Object-Object Mapping"/><category term="Ruby"/><category term="Silverlight"/><category term="Spec#"/><title type='text'>Colin Jack&#39;s Blog</title><subtitle type='html'>Technical blog.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://colinjack.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32609450/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://colinjack.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/32609450/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Colin Jack</name><uri>http://www.blogger.com/profile/01403166737046938219</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://4.bp.blogspot.com/_DTvjK44dn8U/ShfOBrJokwI/AAAAAAAAAJo/JUww9xRlJH0/S220/Pitlochry+043+cut.JPG'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>156</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-32609450.post-2445916448925384832</id><published>2009-10-26T22:45:00.002+00:00</published><updated>2009-10-26T22:57:48.262+00:00</updated><title type='text'>SOA Manifesto</title><content type='html'>&lt;p&gt;I&#39;ve just gotten through reading the &lt;a href=&quot;http://soa-manifesto.org/&quot;&gt;SOA Manifesto&lt;/a&gt; and reactions from (among others) &lt;a href=&quot;http://jim.webber.name/2009/10/24/95bf2681-9a7a-4f94-94d6-2156a3a46411.aspx&quot;&gt;Jim Webber&lt;/a&gt; and &lt;a href=&quot;http://www.innoq.com/blog/st/2009/10/comments_on_the_soa_manifesto.html&quot;&gt;Stefan Tilkov&lt;/a&gt; and I can&#39;t help feeling the whole thing is a missed opportunity. &lt;/p&gt;  &lt;p&gt;In particular you&#39;ll notice is that the manifesto doesn&#39;t deal with the &quot;what is a service&quot; issue and so fails to deal with the &lt;a href=&quot;http://martinfowler.com/bliki/ServiceOrientedAmbiguity.html&quot;&gt;Service Oriented Ambiguity&lt;/a&gt; issue. Although Martin Fowler covers multiple ways of viewing services in his post I think two are probably most relevant when considering the manifesto:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;strong&gt;Business Level SOA (B-SOA)&lt;/strong&gt; - Services for business capabilities/functions (think &lt;a href=&quot;http://www.infoq.com/minibooks/domain-driven-design-quickly&quot;&gt;Strategic Design in DDD&lt;/a&gt;, &lt;a href=&quot;http://www.infoq.com/minibooks/enterprise-soa&quot;&gt;Enterprise SOA&lt;/a&gt;). This approach focuses on bringing IT and the business together and in my view should lead to large and loosely coupled autonomous services. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Technical Level SOA (T-SOA)&lt;/strong&gt; - Services here are the individual endpoints. These end-points could be Web Services (RPC/WS-*), they could be resources (REST), they could be messaging endpoints, or they could be something else.Each B-SOA service exposes one or more T-SOA services. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&lt;a href=&quot;http://www.innoq.com/blog/st/2007/09/27/faq_entry_whats_this_rest_vs_soa_debate_about.html&quot;&gt;Stefan Tilkov&lt;/a&gt; has a good blog entry about the two which is worth a read, and with these two types of SOA in mind its worth looking at the values in the manifesto to see how each apply in each context (context is king).&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Values In Context&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Whether considering T-SOA or B-SOA I agree with the first and last values, favouring business value and &lt;a href=&quot;http://www.infoq.com/news/2008/09/EvolutionarySOA&quot;&gt;evolutionary refinement&lt;/a&gt; are difficult to argue with. Intrinsic interoperability also makes sense in either case, especially as it is so vague, which leaves us with three other values:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;strong&gt;Strategic goals&lt;/strong&gt; over project-specific benefits - At the B-SOA level this is certainly true but at the T-SOA level its a tradeoff as &lt;a href=&quot;http://www.innoq.com/blog/st/2009/10/comments_on_the_soa_manifesto.html&quot;&gt;Stefan points out&lt;/a&gt;. &lt;/li&gt;    &lt;li&gt;&lt;b&gt;Shared services&lt;/b&gt; over specific-purpose implementations - From a T-SOA angle this could be taken to refer to the argument that you should design your endpoints to be reusable in different contexts, such as when you go for an &lt;a href=&quot;http://www.infoq.com/news/2007/06/entity-services&quot;&gt;entity service&lt;/a&gt; based approach. However there are &lt;a href=&quot;http://www.udidahan.com/2009/06/07/the-fallacy-of-reuse/&quot;&gt;arguments against&lt;/a&gt; too much premature focus on reuse and use is far more important than reuse. I also think that reuse becomes less key if you view each T-SOA service as being within the context of a B-SOA service. In addition I&#39;m not really sure what this value means when considering the B-SOA services themselves, probably not much. &lt;/li&gt;    &lt;li&gt;&lt;b&gt;Flexibility&lt;/b&gt; over optimization - This one is very vague. You could read it about designing your T-SOA services to handle real variations in behaviour/data (patterns like &lt;a href=&quot;http://www.manning.com/rotem/&quot;&gt;Workflodize&lt;/a&gt; come to mind) and if so it is obviously entirely valid. However I think this is coming back to reuse again, specifically designing each T-SOA service to support reuse by making them more general purpose/agnostic. In addition at the T-SOA level optimisation does have to be considered because it is at this level that QOS becomes a consideration, but in many cases considering optimizations of individual T-SOA services won&#39;t involved sacrificing flexibility. So I&#39;m not sure how to take this one, in addition I&#39;m unclear as to what this statement means in terms of B-SOA, again probably not much. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;So although I can nod my head to most of the points in the manifesto someone with a completely different views on SOA could do exactly the same, and even if we did have the same views we&#39;d need to be clear which type of SOA we were considering when thinking about the manifesto. &lt;/p&gt;  &lt;p&gt;That&#39;s is a pity and I can&#39;t help feeling that maybe &lt;a href=&quot;http://martinfowler.com/bliki/ServiceOrientedAmbiguity.html&quot;&gt;Martin Fowler had it right in 2005&lt;/a&gt;:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;So what do we do? For a start we have to remember all the time about how many different (and mostly incompatible) ideas fall under the SOA camp. These do need to be properly described (and named) independently of SOA. I think SOA has turned into a semantics-free concept that can join &#39;components&#39; and &#39;architecture&#39;. It&#39;s beyond saving - so the concrete ideas that do have some substance need to get an independent life.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;With this in mind I actually think that &lt;a href=&quot;http://service-architecture.blogspot.com/2007/10/business-service-architecture-is-it.html&quot;&gt;Steve Jones could be right&lt;/a&gt;, the term SOA is overloaded and too often used just for T-SOA so maybe its time to separate out the notion of B-SOA completely by using a term like Business Service Architecture.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://colinjack.blogspot.com/feeds/2445916448925384832/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://colinjack.blogspot.com/2009/10/soa-manifesto.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32609450/posts/default/2445916448925384832'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32609450/posts/default/2445916448925384832'/><link rel='alternate' type='text/html' href='http://colinjack.blogspot.com/2009/10/soa-manifesto.html' title='SOA Manifesto'/><author><name>Colin Jack</name><uri>http://www.blogger.com/profile/01403166737046938219</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://4.bp.blogspot.com/_DTvjK44dn8U/ShfOBrJokwI/AAAAAAAAAJo/JUww9xRlJH0/S220/Pitlochry+043+cut.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32609450.post-4785884797443402941</id><published>2009-09-22T22:05:00.001+01:00</published><updated>2009-09-22T22:05:29.050+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Books"/><category scheme="http://www.blogger.com/atom/ns#" term="REST"/><title type='text'>RESTful Web Services Cookbook - Review of Rough Cut</title><content type='html'>&lt;p&gt;I&#39;ve just finished reading the rough cut of &lt;a href=&quot;http://www.restful-webservices-cookbook.org/&quot;&gt;RESTful Web Services Cookbook&lt;/a&gt; by &lt;a href=&quot;http://www.subbu.org/&quot;&gt;Subbu Allamaraju&lt;/a&gt; and &lt;a href=&quot;http://www.amundsen.com/blog/&quot;&gt;Mike Amundsen&lt;/a&gt; and thought I&#39;d write a very quick review. &lt;/p&gt;  &lt;p&gt;Ultimately the book fills a gap in the market by providing practical advice on designing high quality HTTP/REST solutions and I found the recipe approach really accessible. &lt;/p&gt;  &lt;p&gt;Its also an easy read so if you&#39;ve been toying with REST but haven&#39;t found it very easy to get your head around then I&#39;d definitely recommend having a look. I know that when I started learning REST I wasted large amounts of time reading unhelpful and downright misleading content so its good to have a book that should help you avoid falling into any obvious traps.&lt;/p&gt;  &lt;p&gt;In summary, highly recommended.&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://colinjack.blogspot.com/feeds/4785884797443402941/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://colinjack.blogspot.com/2009/09/restful-web-services-cookbook-review-of.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32609450/posts/default/4785884797443402941'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32609450/posts/default/4785884797443402941'/><link rel='alternate' type='text/html' href='http://colinjack.blogspot.com/2009/09/restful-web-services-cookbook-review-of.html' title='RESTful Web Services Cookbook - Review of Rough Cut'/><author><name>Colin Jack</name><uri>http://www.blogger.com/profile/01403166737046938219</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://4.bp.blogspot.com/_DTvjK44dn8U/ShfOBrJokwI/AAAAAAAAAJo/JUww9xRlJH0/S220/Pitlochry+043+cut.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32609450.post-4977436279526818527</id><published>2009-09-12T12:53:00.002+01:00</published><updated>2009-09-13T18:25:35.631+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="REST"/><category scheme="http://www.blogger.com/atom/ns#" term="WCF"/><title type='text'>WCF and REST</title><content type='html'>&lt;p&gt;I&#39;m on a project that was using WCF and we&#39;ve managed to make the transition to using REST (well, to be honest so far its just POX). &lt;/p&gt;&lt;p&gt;REST is a joy and I really find it such a pleasant experience compared to RPC let alone WS-*. &lt;/p&gt;&lt;p&gt;However WCF and REST just are not good bed fellows. Some of the problems are that it doesn&#39;t support linking out of the box, content negotiation isn&#39;t there, no support for common HTTP/REST patterns, it limits the design/granularity of your resource handlers (think MVC controllers), and the REST starter kit (at least when I looked at it) was appalling.&lt;/p&gt;&lt;p&gt;There are also lots of annoyances that you only discover when you come to use it and unfortunately, as &lt;a href=&quot;http://serialseb.blogspot.com/&quot;&gt;Seb&lt;/a&gt; discovered when he developed our REST framework on top of WCF, WCF lacks some key extension points meaning you end up having an extremely painful time getting the functionally you need.&lt;/p&gt;&lt;p&gt;The point of this post isn&#39;t to beat up on WCF, its just to make you aware of the issues. If all you want to be able to do is a bit of simple CRUD then you might find WCF to be a good solution, however just be aware that it isn&#39;t designed to scale out to handle more interesting problems or more RESTful solutions.&lt;/p&gt;&lt;p&gt;On the bright side the WCF team did contact me and Seb and we did give feedback which apparently will feed into a release post-WCF 4. My feeling is that if they don&#39;t make massive improvements then WCF will lose out on the REST battle, especially as there are some great REST frameworks appearing in .NET-land. &lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://colinjack.blogspot.com/feeds/4977436279526818527/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://colinjack.blogspot.com/2009/09/wcf-and-rest.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32609450/posts/default/4977436279526818527'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32609450/posts/default/4977436279526818527'/><link rel='alternate' type='text/html' href='http://colinjack.blogspot.com/2009/09/wcf-and-rest.html' title='WCF and REST'/><author><name>Colin Jack</name><uri>http://www.blogger.com/profile/01403166737046938219</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://4.bp.blogspot.com/_DTvjK44dn8U/ShfOBrJokwI/AAAAAAAAAJo/JUww9xRlJH0/S220/Pitlochry+043+cut.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32609450.post-1622418922054016137</id><published>2009-07-11T22:13:00.001+01:00</published><updated>2009-07-11T22:13:58.072+01:00</updated><title type='text'>E-VAN Blog and Videos</title><content type='html'>&lt;p&gt;Jan has already posted about it but we have a new &lt;a href=&quot;http://europevan.blogspot.com/&quot;&gt;E-VAN blog&lt;/a&gt; which includes links to the recording of the &lt;a href=&quot;http://europevan.blogspot.com/2009/07/recording-of-alan-dean-on-rest-e-van-06.html&quot;&gt;excellent presentation&lt;/a&gt; Alan Dean gave on REST and a &lt;a href=&quot;http://europevan.blogspot.com/2009/07/ian-robinson-and-jim-webber-on-20th.html&quot;&gt;link to the next one that Ian Robinson and Jim Webber are giving&lt;/a&gt; (please submit questions/topics for this one, it&#39;s going to be superb).&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://colinjack.blogspot.com/feeds/1622418922054016137/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://colinjack.blogspot.com/2009/07/e-van-blog-and-videos.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32609450/posts/default/1622418922054016137'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32609450/posts/default/1622418922054016137'/><link rel='alternate' type='text/html' href='http://colinjack.blogspot.com/2009/07/e-van-blog-and-videos.html' title='E-VAN Blog and Videos'/><author><name>Colin Jack</name><uri>http://www.blogger.com/profile/01403166737046938219</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://4.bp.blogspot.com/_DTvjK44dn8U/ShfOBrJokwI/AAAAAAAAAJo/JUww9xRlJH0/S220/Pitlochry+043+cut.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32609450.post-8545164987990607664</id><published>2009-06-24T21:10:00.003+01:00</published><updated>2009-07-05T18:22:20.833+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ALT.NET"/><category scheme="http://www.blogger.com/atom/ns#" term="E-VAN"/><title type='text'>E-VAN - Alan Dean talking on REST (6th July 2009)</title><content type='html'>&lt;p&gt;First off if you didn&#39;t watch &lt;a href=&quot;http://www.udidahan.com/?blog=true&quot;&gt;Udi Dahan&lt;/a&gt; talk on the SOA then you missed a treat, a real pro speaking on a topic that he and a very few others in the .NET space are way ahead of the rest of us on. Brilliant stuff and the &lt;a href=&quot;http://vimeo.com/5022174&quot;&gt;video is now online at Vimeo&lt;/a&gt;.&lt;/p&gt;&lt;h3&gt;&lt;strong&gt;Next E-VAN&lt;/strong&gt;&lt;/h3&gt;&lt;p&gt;We&#39;ve also now planned the next couple of E-VANs which will focus on REST, the first will be with Alan Dean where he will cover facts and fallacies related to REST.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://alandean.blogspot.com/&quot;&gt;Alan&lt;/a&gt; is a real authority on REST and he&#39;s got a great talk ready so this is a great chance to find out more about REST. In addition if you have any particular questions for Alan, or topics you&#39;d like to discuss in detail, then you can add them to the existing topic on the &lt;a href=&quot;http://groups.google.com/group/europevan/browse_thread/thread/8afe38a99d204e52#&quot;&gt;google group&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Start Time on Monday July 06 (7:00PM GMT)&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;In France/Germany/Belgium: 9:00PM&lt;br/&gt;In UK is: 8:00PM&lt;br/&gt;EST in the US is: 3:00PM (EST)&lt;br/&gt;PST in the US is: 12:00PM (Midday)&lt;br/&gt;&lt;br/&gt;The session will last around 90 minutes and on timings see this &lt;a href=&quot;http://www.timeanddate.com/worldclock/&quot;&gt;world clock site&lt;/a&gt; or more information.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Attendee URL&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://snipr.com/virtualaltnet&quot;&gt;http://snipr.com/virtualaltnet&lt;/a&gt; (Live Meeting) &lt;/p&gt;&lt;h3&gt;&lt;strong&gt;Future E-VANs&lt;/strong&gt;&lt;/h3&gt;&lt;p&gt;&lt;a href=&quot;http://www.innoq.com/blog/st/&quot;&gt;Stefan Tilkov&lt;/a&gt; has kindly agreed to do another E-VAN one on REST at the start of August. In addition we are going to see if we can organize another one for mid-July, creating a bit of a REST theme for the next month or so which we hope you&#39;ll enjoy.&lt;/p&gt;&lt;p&gt;We&#39;ve also got a couple of people in mind that we want to get on looking further into August and beyond, more to come on that once myself and &lt;a href=&quot;http://vanryswyckjan.blogspot.com/&quot;&gt;Jan&lt;/a&gt; contact the people :P&lt;/p&gt;&lt;h3&gt;&lt;strong&gt;Feedback - Tell us how to do better&lt;/strong&gt;&lt;/h3&gt;&lt;p&gt;So far I think the E-VAN is going well, great people talking about interesting topics. Live Meeting has been a bit flaky and time zones are a pain but other than that I&#39;m pretty happy with it. &lt;/p&gt;&lt;p&gt;However we want to know where you guys think things can improve so if you get a chance we&#39;d be interested in hearing your feedback using the new &lt;a href=&quot;http://groups.google.com/group/europevan/topics?start=&quot;&gt;google group&lt;/a&gt;. I&#39;m interested to see if we can get more open discussions going and to explore whether an online book club is a good idea...&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://colinjack.blogspot.com/feeds/8545164987990607664/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://colinjack.blogspot.com/2009/06/e-van-alan-dean-talking-on-rest-6th.html#comment-form' title='14 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32609450/posts/default/8545164987990607664'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32609450/posts/default/8545164987990607664'/><link rel='alternate' type='text/html' href='http://colinjack.blogspot.com/2009/06/e-van-alan-dean-talking-on-rest-6th.html' title='E-VAN - Alan Dean talking on REST (6th July 2009)'/><author><name>Colin Jack</name><uri>http://www.blogger.com/profile/01403166737046938219</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://4.bp.blogspot.com/_DTvjK44dn8U/ShfOBrJokwI/AAAAAAAAAJo/JUww9xRlJH0/S220/Pitlochry+043+cut.JPG'/></author><thr:total>14</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32609450.post-6232159670781795508</id><published>2009-05-24T13:29:00.001+01:00</published><updated>2009-05-24T13:29:20.451+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Books"/><category scheme="http://www.blogger.com/atom/ns#" term="SOA"/><title type='text'>Book Review - SOA Patterns (First 5 Chapters)</title><content type='html'>&lt;p&gt;I&#39;ll cut straight to the chase, I definitely recommend &lt;a href=&quot;http://www.manning.com/rotem/&quot;&gt;SOA Patterns&lt;/a&gt; to anyone interested in SOA. &lt;/p&gt;  &lt;p&gt;Even though its currently only available in MEAP, and is a bit rough and ready, and isn&#39;t complete, it&#39;s still great stuff and well worth your time.&lt;/p&gt;  &lt;p&gt;Now I&#39;ve said that I&#39;ll give a quick run through. Essentially the author, &lt;a href=&quot;http://www.rgoarchitects.com/nblog/default.aspx&quot;&gt;Arnon Rotem-Gal-Oz&lt;/a&gt;, has decided to focus on the practical aspects of SOA and in particular with a focus on the software architecture aspects of SOA. It thus doesn&#39;t cover the business aspects of SOA, which is fine with me as those topics are covered elsewhere.&lt;/p&gt;  &lt;p&gt;With that tight focus in mind Arnon has already managed to pack in a range of very interesting and valuable patterns. Each pattern includes the problem, solution, technology mapping and quality attributes. There is already the feeling of a pattern language about it which I think will evolve as later chapters are added, this should allow you to describe a complex system with just a few high level patterns or to dig into more detail by discussing the lower level patterns they compose.&lt;/p&gt;  &lt;p&gt;You can actually read a few of the patterns online, see the &lt;a href=&quot;http://www.rgoarchitects.com/SOAPatterns/&quot;&gt;linked PDFs&lt;/a&gt; and also the &lt;a href=&quot;http://www.rgoarchitects.com/nblog/2009/04/30/SOAPatternsNdashBlogjectingWatchdog.aspx&quot;&gt;Blogjecting Watchdog&lt;/a&gt; pattern, and the anti-pattern called &lt;a href=&quot;http://www.rgoarchitects.com/Files/SOAPatterns/TheKnot.pdf&quot;&gt;The Knot&lt;/a&gt; is also worth a read. &lt;/p&gt;  &lt;p&gt;In addition &lt;a href=&quot;http://vanryswyckjan.blogspot.com/2009/04/half-book-review-soa-patterns.html&quot;&gt;Jan has posted a review&lt;/a&gt; of the book.&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://colinjack.blogspot.com/feeds/6232159670781795508/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://colinjack.blogspot.com/2009/05/book-review-soa-patterns-first-5.html#comment-form' title='26 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32609450/posts/default/6232159670781795508'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32609450/posts/default/6232159670781795508'/><link rel='alternate' type='text/html' href='http://colinjack.blogspot.com/2009/05/book-review-soa-patterns-first-5.html' title='Book Review - SOA Patterns (First 5 Chapters)'/><author><name>Colin Jack</name><uri>http://www.blogger.com/profile/01403166737046938219</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://4.bp.blogspot.com/_DTvjK44dn8U/ShfOBrJokwI/AAAAAAAAAJo/JUww9xRlJH0/S220/Pitlochry+043+cut.JPG'/></author><thr:total>26</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32609450.post-6619061046616211604</id><published>2009-05-17T20:06:00.001+01:00</published><updated>2009-05-18T00:16:00.062+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ALT.NET"/><category scheme="http://www.blogger.com/atom/ns#" term="E-VAN"/><title type='text'>Next Europe VAN - 1st June 2009 - Questions for Udi Dahan</title><content type='html'>&lt;p&gt;&lt;a href=&quot;http://www.udidahan.com/?blog=true&quot;&gt;Udi Dahan&lt;/a&gt; has been kind enough to agree to do the next Europe VAN and suggested that we all put forward our questions for him to answer. &lt;/p&gt;  &lt;p&gt;Its a great chance to ask him about DDD/SOA/CQS/messaging/&lt;a href=&quot;http://www.nservicebus.com/&quot;&gt;NServiceBus&lt;/a&gt;, or any other topic, so if you have any questions post them here or on the associated thread on the &lt;a href=&quot;http://tech.groups.yahoo.com/group/domaindrivendesign/message/13099&quot;&gt;DDD&lt;/a&gt;/&lt;a href=&quot;http://tech.groups.yahoo.com/group/altdotnet/message/21931&quot;&gt;ALT.NET&lt;/a&gt; forums.&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;http://vanryswyckjan.blogspot.com/2009/05/next-european-van-on-1st-june-2009.html&quot;&gt;Jan&lt;/a&gt; and I will aggregate the questions on the 25th May (after adding our own!) and then submit them to Udi so make sure you&#39;ve submitted yours before then. &lt;em&gt;Just to confirm, you need to get your questions to us no later than Monday the 25th May or we&#39;ll ignore them&lt;/em&gt;.&lt;/p&gt;  &lt;h4&gt;&lt;strong&gt;Details&lt;/strong&gt;&lt;/h4&gt;  &lt;p&gt;Here&#39;s the details of the live meeting:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Start Time:&lt;/strong&gt; Monday, June 01, 2009 07:00 PM GMT &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;End Time:&lt;/strong&gt; Monday, June 01, 2009 08:30 PM GMT &lt;/p&gt;  &lt;p&gt;&lt;b&gt;Attendee URL:&lt;/b&gt; &lt;a href=&quot;http://snipr.com/virtualaltnet&quot;&gt;http://snipr.com/virtualaltnet&lt;/a&gt; (Live Meeting) &lt;/p&gt;  &lt;h4&gt;&lt;strong&gt;Calendar&lt;/strong&gt;&lt;/h4&gt;  &lt;p&gt;This meeting should also be in the &lt;a href=&quot;http://www.virtualaltnet.com/van/Home/Calendar&quot;&gt;VAN Calendar&lt;/a&gt;, this allows Google calendar users to get a reminder before the big event.&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://colinjack.blogspot.com/feeds/6619061046616211604/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://colinjack.blogspot.com/2009/05/next-europe-van-1st-june-2009-questions.html#comment-form' title='16 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32609450/posts/default/6619061046616211604'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32609450/posts/default/6619061046616211604'/><link rel='alternate' type='text/html' href='http://colinjack.blogspot.com/2009/05/next-europe-van-1st-june-2009-questions.html' title='Next Europe VAN - 1st June 2009 - Questions for Udi Dahan'/><author><name>Colin Jack</name><uri>http://www.blogger.com/profile/01403166737046938219</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://4.bp.blogspot.com/_DTvjK44dn8U/ShfOBrJokwI/AAAAAAAAAJo/JUww9xRlJH0/S220/Pitlochry+043+cut.JPG'/></author><thr:total>16</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32609450.post-3660770160819255222</id><published>2009-05-10T21:53:00.001+01:00</published><updated>2009-05-10T21:53:04.580+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="REST"/><category scheme="http://www.blogger.com/atom/ns#" term="WCF"/><title type='text'>Book Review - RESTful .NET</title><content type='html'>&lt;p&gt;Since we are using REST on top of WCF on my current project I was glad to see that this book had been written as I was hoping it would answer some questions I had. &lt;/p&gt;  &lt;p&gt;However my first issue with this book was the title. As I say we&#39;re using WCF but WCF isn&#39;t the only way to implement REST in .NET, however the book does not take the time to evaluate alternatives (including building RESTful applications on top of ASP.NET MVC) so &lt;em&gt;RESTful WCF&lt;/em&gt; would have been a more accurate title. &lt;/p&gt;  &lt;p&gt;In fact if we wanted to truly represent the books focus I think we would call it &lt;em&gt;WCF REST&lt;/em&gt; because the primary focus is on WCF. There was a lot of WCF detail in here, starting from chapter 2, and personally I found some if quite boring especially where the author has chosen to put in property listings of some key WCF classes. I just don&#39;t find that sort of content all that useful and I&#39;d have expected a lot of it to be in an appendix at best. &lt;/p&gt;  &lt;p&gt;However the WCF focus has some other implications. Take HATEOS which is an important part of REST, my company has been lucky enough to have &lt;a href=&quot;http://serialseb.blogspot.com/&quot;&gt;Sebastien Lambla&lt;/a&gt; and &lt;a href=&quot;http://alandean.blogspot.com/&quot;&gt;Alan Dean&lt;/a&gt; in our office and both emphasized its importance. However there is almost no discussion of it in the book, and the reason for this becomes clear on page 246 where the author states that although hypermedia is important in REST it isn&#39;t covered in the book because WCF has poor support for it. As I say we&#39;re using WCF so I knew that WCF&#39;s support for links in normal representations was non-existent, but I do consider it a flaw of the book and in my view the author would have been better stating this big problem up-front or tried to add framework to make linking a lot easier (something Seb did for us). &lt;/p&gt;  &lt;p&gt;Strangely the author actually states that he actually avoids discussing custom infrastructure code because it takes away from learning about the technology (page 97). Personally I would prefer the book if had a focus on REST and how to get the advantages of REST using WCF, low level WCF plumbing/architecture is a necessary evil not something I want to read much about and more importantly if we need extra framework then I&#39;d like to see it discussed.&lt;/p&gt;  &lt;p&gt;I also thought it was doubly odd that chapter 9 discussed &amp;quot;Using Workflow to Deliver REST Services&amp;quot;, all centred around Windows Workflow, when to me when I see the words workflow in a REST book I&#39;m again thinking of HATEOS (the &lt;a href=&quot;http://www.infoq.com/articles/webber-rest-workflow&quot;&gt;RESTbucks example at InfoQ&lt;/a&gt; shows this approach brilliantly and will form part of a rival book).&lt;/p&gt;  &lt;p&gt;Before wrapping up I also wanted to identify one bit of the book where the advice is very questionable. Chapter 10 is called &amp;quot;Consuming RESTful XML Services Using WCF&amp;quot; and one approach described is to take the interface attributed with &lt;em&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/system.servicemodel.servicecontractattribute.aspx&quot;&gt;ServiceContract&lt;/a&gt;&lt;/em&gt; and use it client side. Just to be clear we&#39;re talking about making class like &lt;em&gt;channel.CreateAuthority(authority) &lt;/em&gt;and then letting WCF work out what HTTP request to make. You won&#39;t want to be doing that.&lt;/p&gt;  &lt;p&gt;Anyway I personally wouldn&#39;t recommend this to anyone wanting to learn about REST, instead I&#39;d recommend (for now) &lt;a href=&quot;http://www.amazon.co.uk/RESTful-Web-Services-Leonard-Richardson/dp/0596529260/ref=sr_1_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1241987182&amp;amp;sr=8-1&quot;&gt;RESTful Web Services&lt;/a&gt;. If however you are using WCF and REST, and feel you already understand REST, then this book will give you some insight into support for REST in WCF.&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://colinjack.blogspot.com/feeds/3660770160819255222/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://colinjack.blogspot.com/2009/05/book-review-restful-net.html#comment-form' title='14 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32609450/posts/default/3660770160819255222'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32609450/posts/default/3660770160819255222'/><link rel='alternate' type='text/html' href='http://colinjack.blogspot.com/2009/05/book-review-restful-net.html' title='Book Review - RESTful .NET'/><author><name>Colin Jack</name><uri>http://www.blogger.com/profile/01403166737046938219</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://4.bp.blogspot.com/_DTvjK44dn8U/ShfOBrJokwI/AAAAAAAAAJo/JUww9xRlJH0/S220/Pitlochry+043+cut.JPG'/></author><thr:total>14</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32609450.post-5143109067237875748</id><published>2009-05-06T19:49:00.001+01:00</published><updated>2009-05-06T19:49:37.212+01:00</updated><title type='text'>E-VAN Videos Reminder</title><content type='html'>&lt;p&gt;Just to remind people that Jan has put the videos for the first two E-VAN presentations online: &lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;http://www.vimeo.com/user1286822&quot;&gt;http://www.vimeo.com/user1286822&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Mark Nijhof&#39;s excellent presentation on FubuMVC will be up as soon as its available and we&#39;ll announce the next presentation as soon as we organize it :P &lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://colinjack.blogspot.com/feeds/5143109067237875748/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://colinjack.blogspot.com/2009/05/e-van-videos-reminder.html#comment-form' title='16 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32609450/posts/default/5143109067237875748'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32609450/posts/default/5143109067237875748'/><link rel='alternate' type='text/html' href='http://colinjack.blogspot.com/2009/05/e-van-videos-reminder.html' title='E-VAN Videos Reminder'/><author><name>Colin Jack</name><uri>http://www.blogger.com/profile/01403166737046938219</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://4.bp.blogspot.com/_DTvjK44dn8U/ShfOBrJokwI/AAAAAAAAAJo/JUww9xRlJH0/S220/Pitlochry+043+cut.JPG'/></author><thr:total>16</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32609450.post-3052753434915586256</id><published>2009-02-15T17:44:00.001+00:00</published><updated>2009-02-15T17:44:08.073+00:00</updated><title type='text'>Next Europe VAN - 25th February 2009</title><content type='html'>&lt;p&gt;After a bit of discussion &lt;a href=&quot;http://elegantcode.com/about/jan-van-ryswyck/&quot;&gt;Jan&lt;/a&gt; and I have decided that for now it seems to make sense to run the Europe VAN every two weeks, we have discussed having more open discussions on alternate weeks but we&#39;ll have to see if there is an appetite for that. &lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;http://serialseb.blogspot.com/&quot;&gt;Seb&lt;/a&gt; has agreed to do the next one on REST and his &lt;a href=&quot;http://serialseb.blogspot.com/2008/04/using-rasta-1-introduction.html&quot;&gt;OpenRasta&lt;/a&gt; framework. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Start Time:&lt;/strong&gt; Wednesday Feb 25, 2009 7:00 PM GMT &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;End Time:&lt;/strong&gt; Wednesday, Feb 25, 2009 09:00 PM GMT &lt;/p&gt;  &lt;p&gt;&lt;b&gt;Attendee URL:&lt;/b&gt; &lt;a href=&quot;http://snipr.com/virtualaltnet&quot;&gt;http://snipr.com/virtualaltnet&lt;/a&gt; (Live Meeting)&amp;#160;&amp;#160; &lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://colinjack.blogspot.com/feeds/3052753434915586256/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://colinjack.blogspot.com/2009/02/next-europe-van-25th-february-2009.html#comment-form' title='17 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32609450/posts/default/3052753434915586256'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32609450/posts/default/3052753434915586256'/><link rel='alternate' type='text/html' href='http://colinjack.blogspot.com/2009/02/next-europe-van-25th-february-2009.html' title='Next Europe VAN - 25th February 2009'/><author><name>Colin Jack</name><uri>http://www.blogger.com/profile/01403166737046938219</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://4.bp.blogspot.com/_DTvjK44dn8U/ShfOBrJokwI/AAAAAAAAAJo/JUww9xRlJH0/S220/Pitlochry+043+cut.JPG'/></author><thr:total>17</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32609450.post-7306996444082186816</id><published>2009-02-09T19:03:00.003+00:00</published><updated>2009-02-09T21:06:10.771+00:00</updated><title type='text'>Europe VAN - DDD with Greg Young (9th Feb)</title><content type='html'>&lt;p&gt;The delayed first E-VAN is on now with Greg Young, discussing DDD and CQS. The URL is: &lt;a href=&quot;http://snipr.com/virtualaltnet&quot;&gt;http://snipr.com/virtualaltnet&lt;/a&gt; (Live Meeting).&lt;/p&gt;&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; This one was a success and Greg did a superb job explaining DDD and messaging, really enjoyable stuff.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://colinjack.blogspot.com/feeds/7306996444082186816/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://colinjack.blogspot.com/2009/02/europe-van-ddd-with-greg-young.html#comment-form' title='18 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32609450/posts/default/7306996444082186816'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32609450/posts/default/7306996444082186816'/><link rel='alternate' type='text/html' href='http://colinjack.blogspot.com/2009/02/europe-van-ddd-with-greg-young.html' title='Europe VAN - DDD with Greg Young (9th Feb)'/><author><name>Colin Jack</name><uri>http://www.blogger.com/profile/01403166737046938219</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://4.bp.blogspot.com/_DTvjK44dn8U/ShfOBrJokwI/AAAAAAAAAJo/JUww9xRlJH0/S220/Pitlochry+043+cut.JPG'/></author><thr:total>18</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32609450.post-327644624133955653</id><published>2009-02-08T20:39:00.003+00:00</published><updated>2009-02-08T20:55:59.892+00:00</updated><title type='text'>P&amp;amp;P Guidance - Positive Progress</title><content type='html'>&lt;p&gt;I put up a post a while back about the P&amp;amp;P REST guidance which I considered to be quite flawed. The reaction from the P&amp;amp;P team was superb and &lt;a href=&quot;http://codebetter.com/blogs/gregyoung/&quot;&gt;Greg Young&lt;/a&gt;, &lt;a href=&quot;http://serialseb.blogspot.com/&quot;&gt;Sebastien Lambla&lt;/a&gt; and myself immediately got involved in an e-mail exchange with them regarding this and other guidance. &lt;/p&gt;&lt;p&gt;They&#39;ve shown they are incredibly open to feedback and we&#39;re still involved in this exchange but it looks like the result may be changes to the existing article and/or new articles.&lt;/p&gt;&lt;p&gt;One thing I hadn&#39;t realized before this started is that P&amp;amp;P actually have three different sites:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Guide – &lt;a href=&quot;http://www.codeplex.com/AppArchGuide&quot;&gt;http://www.codeplex.com/AppArchGuide&lt;/a&gt; &lt;/li&gt;&lt;li&gt;Knowledge Base – &lt;a href=&quot;http://www.codeplex.com/AppArch&quot;&gt;http://www.codeplex.com/AppArch&lt;/a&gt; &lt;/li&gt;&lt;li&gt;Community Site – &lt;a href=&quot;http://www.codeplex.com/AppArchContrib&quot;&gt;http://www.codeplex.com/AppArchContrib&lt;/a&gt; &lt;/li&gt;&lt;/ol&gt;&lt;p&gt;The community site is quite open so even if our examples use open source frameworks they can still be published on it. I&#39;m therefore planning on writing one example using WCF, NHibernate and Castle where the two primary areas covered will be:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;strong&gt;REST&lt;/strong&gt; - Although the current example says its using REST I think this is arguable. &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Domain Model&lt;/strong&gt; - I&#39;ll be using DDD patterns but I&#39;ve tried to explain that DDD isn&#39;t always appropriate (e.g. if you don&#39;t have access to domain experts). Regardless I&#39;m obviously a big fan of object-oriented domain models and the barrier to entry is so low with modern ORM&#39;s that I think its a no-brainer to use one in the example. &lt;/li&gt;&lt;/ol&gt;&lt;p&gt;I&#39;m not saying I&#39;ve chosen the best technologies, in particular using WCF is highly questionable, but since I&#39;m not trying to say this is the &quot;best&quot; way to do things I&#39;m comfortable with the choices especially as I&#39;d expect other guidance to be given over other approaches (perhaps using an MVC style approach).&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://colinjack.blogspot.com/feeds/327644624133955653/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://colinjack.blogspot.com/2009/02/p-guidance-positive-progress.html#comment-form' title='18 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32609450/posts/default/327644624133955653'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32609450/posts/default/327644624133955653'/><link rel='alternate' type='text/html' href='http://colinjack.blogspot.com/2009/02/p-guidance-positive-progress.html' title='P&amp;amp;P Guidance - Positive Progress'/><author><name>Colin Jack</name><uri>http://www.blogger.com/profile/01403166737046938219</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://4.bp.blogspot.com/_DTvjK44dn8U/ShfOBrJokwI/AAAAAAAAAJo/JUww9xRlJH0/S220/Pitlochry+043+cut.JPG'/></author><thr:total>18</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32609450.post-4990265282133700020</id><published>2009-02-02T19:58:00.001+00:00</published><updated>2009-02-02T19:58:38.211+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ALT.NET"/><title type='text'>First Europe VAN</title><content type='html'>&lt;p&gt;The first Europe VAN went off without a hitch and was an amazing success. Ha, yeah sorry about that. &lt;/p&gt;  &lt;p&gt;Good news is next one is BOUND to be better and we are trying again very soon. Next time we&#39;ll come armed with a backup plan too, possibly involving one us loading up the Dark Knight DVD so we can all watch it for an hour or two.&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://colinjack.blogspot.com/feeds/4990265282133700020/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://colinjack.blogspot.com/2009/02/first-europe-van_02.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32609450/posts/default/4990265282133700020'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32609450/posts/default/4990265282133700020'/><link rel='alternate' type='text/html' href='http://colinjack.blogspot.com/2009/02/first-europe-van_02.html' title='First Europe VAN'/><author><name>Colin Jack</name><uri>http://www.blogger.com/profile/01403166737046938219</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://4.bp.blogspot.com/_DTvjK44dn8U/ShfOBrJokwI/AAAAAAAAAJo/JUww9xRlJH0/S220/Pitlochry+043+cut.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32609450.post-6164847603070506262</id><published>2009-02-01T10:10:00.001+00:00</published><updated>2009-02-01T10:10:40.447+00:00</updated><title type='text'>First Europe VAN</title><content type='html'>Just a reminder that the first Europe VAN is tomorrow:   &lt;p&gt;&lt;strong&gt;Start Time:&lt;/strong&gt; Monday, Feb 02, 2009 7:00 PM GMT&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;End Time:&lt;/strong&gt; Monday, Feb 02, 2009 09:00 PM GMT&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Attendee URL:&lt;/strong&gt; &lt;a href=&quot;http://snipr.com/virtualaltnet&quot;&gt;http://snipr.com/virtualaltnet&lt;/a&gt; (Live Meeting)&lt;/p&gt;  &lt;p&gt;Greg Young has been kind enough to agree to speak and I&#39;m hopeful it&#39;ll go well as we&#39;ve had a couple of dry runs so it&#39;s looking good, even if I was perturbed to found out &lt;a href=&quot;http://elegantcode.com/2009/01/29/european-virtual-altnet-meeting-on-02022009/&quot;&gt;Jan&lt;/a&gt; speaks better English than me. &lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://colinjack.blogspot.com/feeds/6164847603070506262/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://colinjack.blogspot.com/2009/02/first-europe-van.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32609450/posts/default/6164847603070506262'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32609450/posts/default/6164847603070506262'/><link rel='alternate' type='text/html' href='http://colinjack.blogspot.com/2009/02/first-europe-van.html' title='First Europe VAN'/><author><name>Colin Jack</name><uri>http://www.blogger.com/profile/01403166737046938219</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://4.bp.blogspot.com/_DTvjK44dn8U/ShfOBrJokwI/AAAAAAAAAJo/JUww9xRlJH0/S220/Pitlochry+043+cut.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32609450.post-7286616635365408926</id><published>2009-01-22T20:09:00.001+00:00</published><updated>2009-01-22T21:43:57.429+00:00</updated><title type='text'>P&amp;amp;P - Web Service with REST Application Pattern</title><content type='html'>&lt;p&gt;It was interesting that all the fuss over Oxite had a positive impact. Unfortunately Microsoft are also now giving us their views on REST (WCF REST starter kit, argh) and more recently REST with a domain model in &lt;a href=&quot;http://www.codeplex.com/AppArch/Wiki/View.aspx?title=App%20Pattern%20-%20Two-Tier%20Service%20Application%20Scenario%20%28REST%29&amp;amp;referringTitle=Application%20Patterns&quot;&gt;Two-Tier Service Application Scenario (REST)&lt;/a&gt; which J.D. Meier calls the &lt;a href=&quot;http://blogs.msdn.com/jmeier/archive/2009/01/21/application-patterns.aspx&quot;&gt;Web Service with REST Application Pattern&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;If you understand REST/DDD, or like Fowlers original meanings for his patterns, or believe that &amp;quot;Business Process Objects&amp;quot; with methods like &amp;quot;Promote (object[] data)&amp;quot; could be improved on then you might want to look away now. Come on though I&#39;ve piqued your interest, have a look, it makes you feel dirty but yet at the same time makes you glad you now realize that perhaps there are other ways to build applications.&lt;/p&gt;  &lt;p&gt;Might be interesting to see how this relates to the old design documents MS used to pass out, pretty sure its not that different except resource is now used in some places instead of service. Service + procedural code + database, rock on.&lt;/p&gt;  &lt;p&gt;Anyway I&#39;m going to go back to writing my own comments on it to put on the page, its going to take me a while...&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://colinjack.blogspot.com/feeds/7286616635365408926/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://colinjack.blogspot.com/2009/01/p-web-service-with-rest-application.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32609450/posts/default/7286616635365408926'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32609450/posts/default/7286616635365408926'/><link rel='alternate' type='text/html' href='http://colinjack.blogspot.com/2009/01/p-web-service-with-rest-application.html' title='P&amp;amp;P - Web Service with REST Application Pattern'/><author><name>Colin Jack</name><uri>http://www.blogger.com/profile/01403166737046938219</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://4.bp.blogspot.com/_DTvjK44dn8U/ShfOBrJokwI/AAAAAAAAAJo/JUww9xRlJH0/S220/Pitlochry+043+cut.JPG'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32609450.post-5446904631564820763</id><published>2008-12-28T15:31:00.001+00:00</published><updated>2008-12-28T15:31:21.689+00:00</updated><title type='text'>SOA Principles of Service Design</title><content type='html'>&lt;p&gt;I&#39;ve been learning a lot more about SOA and REST recently and so have been doing a lot of reading including &lt;a href=&quot;http://www.amazon.co.uk/Principles-Service-Prentice-Service-Oriented-Computing/dp/0132344823/ref=cm_lmf_tit_3_rsrsrs0&quot;&gt;SOA Principles of Service Design&lt;/a&gt; and I thought I should write a short review.&lt;/p&gt;  &lt;p&gt;Short version, this is one of the worst technical books I&#39;ve read and I wouldn&#39;t recommend it to anyone. My main gripes are:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;Style&lt;/strong&gt; - Although there are lots of colour diagrams they don&#39;t tell you much and don&#39;t take away from the fact that the text is dry, repetitive and at times very boring. Since I&#39;ve read one of Erl&#39;s previous books, well read about half of it because I just couldn&#39;t face the rest, I should have known what to expect but it was still a big big struggle to finish it.&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Ideas&lt;/strong&gt; - Reusable &lt;a href=&quot;http://www.infoq.com/news/2007/06/entity-services&quot;&gt;entity services&lt;/a&gt; (Customer/Order) shared throughout the enterprise might sound sensible but I&#39;m not at all convinced by that approach and the focus on it has always blunted my interest in SOA. Unfortunately that style of layered SOA is key to this book so I found a lot of it pretty un-inspiring. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Single Viewpoint&lt;/strong&gt; - There is more to SOA than RPC services but this book doesn&#39;t really talk about anything else. REST gets no coverage (as an alternative to aspects of SOA), EDM/messaging doesn&#39;t really come into it, business focused SOA (analysis/design with business experts) is hardly discussed...it just all feels too narrowly focused on the one approach the author uses and so there is little discussion of alternatives and tradeoffs.&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Book Assembly Line Approach&lt;/strong&gt; - Having one book on &lt;a href=&quot;http://www.amazon.co.uk/Principles-Service-Prentice-Service-Oriented-Computing/dp/0132344823/ref=cm_lmf_tit_3_rsrsrs0&quot;&gt;SOA principles&lt;/a&gt; and another on the &lt;a href=&quot;http://www.amazon.co.uk/Design-Patterns-Prentice-Service-Oriented-Computing/dp/0136135161/ref=cm_lmf_tit_5_rsrsrs0&quot;&gt;patterns&lt;/a&gt;, with references from the principles book to the patterns one, seems overkill. I know SOA is a big topic but do we really need an &lt;a href=&quot;http://www.amazon.co.uk/Service-Oriented-Architecture/lm/R1Z498Y9GVOVZS/ref=cm_lmt_srch_f_1_rsrsrs0&quot;&gt;eight book SOA series&lt;/a&gt;? In my view you could easily have cut 30% of the content in this book (including most of the diagrams) and merged it with the patterns book. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Some might take this as me saying I don&#39;t rate SOA but that is not true at all, I just don&#39;t rate this book and don&#39;t think the ideas behind it are what I&#39;m interested in. However I still think SOA has a lot of value and in fact the next two books I plan to read/finish are both about SOA:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;&lt;a href=&quot;http://www.manning.com/rotem/&quot;&gt;SOA Patterns&lt;/a&gt;&lt;/strong&gt; - Not the SOA patterns book by Erl (which I&#39;ll admit from it&#39;s &lt;a href=&quot;http://www.soapatterns.org/&quot;&gt;site&lt;/a&gt; looks interesting), this one is by &lt;a href=&quot;http://www.rgoarchitects.com/nblog%5Cdefault.aspx&quot;&gt;Arnon&lt;/a&gt; and from the Manning EAP version I&#39;ve read it&#39;s going to be superb. &lt;/li&gt;    &lt;li&gt;&lt;a href=&quot;http://www.infoq.com/minibooks/enterprise-soa&quot;&gt;Enterprise SOA Adoption Strategies&lt;/a&gt; - I learned about this book because I enjoyed reading &lt;a href=&quot;http://service-architecture.blogspot.com/&quot;&gt;Steve Jones&#39;&lt;/a&gt; posts on the &lt;a href=&quot;http://tech.groups.yahoo.com/group/service-orientated-architecture/?yguid=300479819&quot;&gt;SOA forum&lt;/a&gt; and it seems to focus on the business oriented side of SOA, something which doesn&#39;t seem to get discussed nearly enough.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Since I&#39;m far more interested in business focused services each wrapping one or more domain models and exposing multiple end-points, instead of entity services first approach, I&#39;m looking forward to reading these two as from the looks of it&amp;#160; they&#39;ll give me lots of new ideas.&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://colinjack.blogspot.com/feeds/5446904631564820763/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://colinjack.blogspot.com/2008/12/soa-principles-of-service-design.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32609450/posts/default/5446904631564820763'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32609450/posts/default/5446904631564820763'/><link rel='alternate' type='text/html' href='http://colinjack.blogspot.com/2008/12/soa-principles-of-service-design.html' title='SOA Principles of Service Design'/><author><name>Colin Jack</name><uri>http://www.blogger.com/profile/01403166737046938219</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://4.bp.blogspot.com/_DTvjK44dn8U/ShfOBrJokwI/AAAAAAAAAJo/JUww9xRlJH0/S220/Pitlochry+043+cut.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32609450.post-5347250620727298017</id><published>2008-11-19T21:16:00.004+00:00</published><updated>2008-12-28T21:46:51.449+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="BDD"/><category scheme="http://www.blogger.com/atom/ns#" term="TDD"/><category scheme="http://www.blogger.com/atom/ns#" term="Unit Testing"/><title type='text'>BDD - Available Frameworks</title><content type='html'>&lt;p&gt;I&#39;ve been using the &lt;a href=&quot;http://blog.daveastels.com/files/BDD_Intro.pdf&quot;&gt;Astels style of BDD&lt;/a&gt; for a while now but so far I&#39;ve just done it using MSTest/NUnit and a few custom base classes. I think that&#39;s a good way to start out, as with so many good things in life it doesn&#39;t require a new whizzy tool/framework.&lt;/p&gt;&lt;p&gt;However I&#39;ve just joined a new project and we&#39;ve been looking at different frameworks that are available for unit testing and for BDD so I thought I&#39;d post about what I&#39;ve seen so far. Any opinions would be gladly received.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://codebetter.com/blogs/aaron.jensen/archive/2008/05/08/introducing-machine-specifications-or-mspec-for-short.aspx&quot;&gt;&lt;span style=&quot;FONT-WEIGHT: bold&quot;&gt;MSpec&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;This project is very cool, not only does it allow you to create superb specifications but you also get some nice reporting. Here&#39;s a simple example of a sample spec:&lt;br /&gt;&lt;/p&gt;&lt;pre class=&quot;code&quot;&gt;&lt;p&gt;&lt;/p&gt;&lt;pre class=&quot;code&quot;&gt;&lt;span style=&quot;color:blue;&quot;&gt;public class &lt;/span&gt;&lt;span style=&quot;COLOR: rgb(43,145,175)&quot;&gt;When_adding_a_contact_to_a_user_with_no_existing_contacts&lt;br /&gt;&lt;/span&gt;{&lt;br /&gt;  &lt;span style=&quot;color:blue;&quot;&gt;private static &lt;/span&gt;&lt;span style=&quot;COLOR: rgb(43,145,175)&quot;&gt;User &lt;/span&gt;_user;&lt;br /&gt;  &lt;span style=&quot;color:blue;&quot;&gt;private static &lt;/span&gt;&lt;span style=&quot;COLOR: rgb(43,145,175)&quot;&gt;Contact &lt;/span&gt;_contact;&lt;br /&gt;&lt;br /&gt;  &lt;span style=&quot;COLOR: rgb(43,145,175)&quot;&gt;Establish &lt;/span&gt;context_once =()=&amp;gt;&lt;br /&gt;  {&lt;br /&gt;      _user = &lt;span style=&quot;color:blue;&quot;&gt;new &lt;/span&gt;&lt;span style=&quot;COLOR: rgb(43,145,175)&quot;&gt;TestUserBuilder&lt;/span&gt;().Build();&lt;br /&gt;      _contact = &lt;span style=&quot;color:blue;&quot;&gt;new &lt;/span&gt;&lt;span style=&quot;COLOR: rgb(43,145,175)&quot;&gt;ContactBuilder&lt;/span&gt;().Build();&lt;br /&gt;  };&lt;br /&gt;&lt;br /&gt;  &lt;span style=&quot;COLOR: rgb(43,145,175)&quot;&gt;Because &lt;/span&gt;a_context_is_added =()=&amp;gt;&lt;br /&gt;      _user.Contacts.Add(_contact);&lt;br /&gt;&lt;br /&gt;  &lt;span style=&quot;color:blue;&quot;&gt;private &lt;/span&gt;&lt;span style=&quot;COLOR: rgb(43,145,175)&quot;&gt;It &lt;/span&gt;should_associate_the_contact_with_the_user = () =&amp;gt;&lt;br /&gt;      _user.Contacts.Contains(_contact).ShouldBeTrue();&lt;br /&gt;                                                           &lt;br /&gt;}&lt;/pre&gt;&lt;a href=&quot;http://11011.net/software/vspaste&quot;&gt;&lt;/a&gt;&lt;p&gt;&lt;/p&gt;&lt;/pre&gt;One thing to note is if your planning to look at MSpec then you&#39;ll probably want to download the &lt;a href=&quot;http://codebetter.com/blogs/aaron.jensen/archive/2008/10/22/machine-has-moved.aspx&quot;&gt;Machine codebase&lt;/a&gt; since there aren&#39;t many examples of using &lt;a href=&quot;http://codebetter.com/blogs/aaron.jensen/archive/2008/05/08/introducing-machine-specifications-or-mspec-for-short.aspx&quot;&gt;MSpec&lt;/a&gt; on the Web the examples with Machine are a good starting point.&lt;br /&gt;&lt;p&gt;So far there&#39;s no R# integration but that doesn&#39;t worry me at all as if needed it will come and this is still a very early version. &lt;/p&gt;The reporting seems to work well, but we primarily use this style for unit/integration tests and so we are unlikely to present the reports outside the development team. Having said that &lt;a href=&quot;http://codebetter.com/blogs/aaron.jensen/archive/2008/10/19/bdd-consider-your-audience.aspx&quot;&gt;Aaron pointed out&lt;/a&gt; that they can be useful within the development team, which makes a lot of sense.&lt;br /&gt;&lt;p&gt;Overall my main worry is the syntax could be a bit much for some people, in particular if you go for the compact style:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;FONT-WEIGHT: bold&quot;&gt;NUnit&lt;/span&gt;&lt;br /&gt;I think there&#39;s a good argument for just using a base class, especially when you are getting going with the approach: &lt;/p&gt;&lt;pre class=&quot;code&quot;&gt;&lt;span style=&quot;color:blue;&quot;&gt;public class &lt;/span&gt;&lt;span style=&quot;COLOR: rgb(43,145,175)&quot;&gt;When_adding_a_contact_to_a_user_with_no_existing_contacts &lt;/span&gt;: &lt;span style=&quot;COLOR: rgb(43,145,175)&quot;&gt;SpecificationBaseNUnit&lt;br /&gt;&lt;/span&gt;{&lt;br /&gt;  &lt;span style=&quot;color:blue;&quot;&gt;private &lt;/span&gt;&lt;span style=&quot;COLOR: rgb(43,145,175)&quot;&gt;User &lt;/span&gt;_user;&lt;br /&gt;  &lt;span style=&quot;color:blue;&quot;&gt;private &lt;/span&gt;&lt;span style=&quot;COLOR: rgb(43,145,175)&quot;&gt;Contact &lt;/span&gt;_contact;&lt;br /&gt;&lt;br /&gt;  &lt;span style=&quot;color:blue;&quot;&gt;protected override void &lt;/span&gt;EstablishContext()&lt;br /&gt;  {&lt;br /&gt;      _user = &lt;span style=&quot;color:blue;&quot;&gt;new &lt;/span&gt;&lt;span style=&quot;COLOR: rgb(43,145,175)&quot;&gt;TestUserBuilder&lt;/span&gt;().Build();&lt;br /&gt;      _contact = &lt;span style=&quot;color:blue;&quot;&gt;new &lt;/span&gt;&lt;span style=&quot;COLOR: rgb(43,145,175)&quot;&gt;ContactBuilder&lt;/span&gt;().Build();&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  &lt;span style=&quot;color:blue;&quot;&gt;protected override void &lt;/span&gt;Act()&lt;br /&gt;  {&lt;br /&gt;      _user.Contacts.Add(_contact);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  [&lt;span style=&quot;COLOR: rgb(43,145,175)&quot;&gt;Test&lt;/span&gt;]&lt;br /&gt;  &lt;span style=&quot;color:blue;&quot;&gt;public void &lt;/span&gt;should_associate_the_contact_with_the_user()&lt;br /&gt;  {&lt;br /&gt;      _user.Contacts.Contains(_contact).ShouldBeTrue();&lt;br /&gt;  }&lt;br /&gt;}&lt;/pre&gt;This is a hopelessly naive example but you get the idea. You lose some of the syntax niceness, suddenly the specs themselves take up multiple lines because of all the curlies. You&#39;ve also lost reporting, unless you put in some work yourself. However it is a little easier to understand and when introducing TDD/BDD that could be important.&lt;br /&gt;&lt;p&gt;&lt;span style=&quot;FONT-WEIGHT: bold&quot;&gt;XUnit.net&lt;/span&gt;&lt;br /&gt;I&#39;m no XUnit.net expert but Ben Hall convinced us to give it a shot by recommending it and it is very nice. You can read about an approach that works &lt;a href=&quot;http://www.bjoernrochel.de/2008/10/04/introducing-xunitbddextensions/&quot;&gt;here&lt;/a&gt;. If you use the specification base class described in that post you might end up with this:&lt;/p&gt;&lt;pre class=&quot;code&quot;&gt;&lt;span style=&quot;color:green;&quot;&gt;// Using base class influenced by http://www.bjoernrochel.de/2008/10/04/introducing-xunitbddextensions/&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;public class &lt;/span&gt;&lt;span style=&quot;COLOR: rgb(43,145,175)&quot;&gt;When_adding_a_contact_to_a_user_with_no_existing_contacts &lt;/span&gt;: &lt;span style=&quot;COLOR: rgb(43,145,175)&quot;&gt;SpecificationBase&lt;br /&gt;&lt;/span&gt;{&lt;br /&gt;  &lt;span style=&quot;color:blue;&quot;&gt;private &lt;/span&gt;&lt;span style=&quot;COLOR: rgb(43,145,175)&quot;&gt;User &lt;/span&gt;_user;&lt;br /&gt;  &lt;span style=&quot;color:blue;&quot;&gt;private &lt;/span&gt;&lt;span style=&quot;COLOR: rgb(43,145,175)&quot;&gt;Contact &lt;/span&gt;_contact;&lt;br /&gt;&lt;br /&gt;  &lt;span style=&quot;color:blue;&quot;&gt;protected override void &lt;/span&gt;EstablishContext()&lt;br /&gt;  {&lt;br /&gt;      _user = &lt;span style=&quot;color:blue;&quot;&gt;new &lt;/span&gt;&lt;span style=&quot;COLOR: rgb(43,145,175)&quot;&gt;TestUserBuilder&lt;/span&gt;().Build();&lt;br /&gt;      _contact = &lt;span style=&quot;color:blue;&quot;&gt;new &lt;/span&gt;&lt;span style=&quot;COLOR: rgb(43,145,175)&quot;&gt;ContactBuilder&lt;/span&gt;().Build();&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  &lt;span style=&quot;color:blue;&quot;&gt;protected override void &lt;/span&gt;Because()&lt;br /&gt;  {&lt;br /&gt;      _user.Contacts.Add(_contact);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  [&lt;span style=&quot;COLOR: rgb(43,145,175)&quot;&gt;Observation&lt;/span&gt;]&lt;br /&gt;  &lt;span style=&quot;color:blue;&quot;&gt;public void &lt;/span&gt;should_associate_the_contact_with_the_user()&lt;br /&gt;  {&lt;br /&gt;      _user.Contacts.Contains(_contact).ShouldBeTrue();&lt;br /&gt;  }&lt;br /&gt;}&lt;/pre&gt;One aspect of XUnit that might throw you is how &lt;a href=&quot;http://www.codeplex.com/xunit/Wiki/View.aspx?title=Comparisons&quot;&gt;opinionated&lt;/a&gt; it is, which could be an advantage or a disadvantage. An example is that it&#39;s aiming for each test to run in isolation, so the fixture class is re-created each time and if you really want to reuse the fixture you implement &lt;span id=&quot;ctl00_ctl00_MasterContent_TabContentPanel_Content_wikiSourceLabel&quot; style=&quot;FONT-STYLE: italic&quot;&gt;&lt;span class=&quot;codeInline&quot;&gt;IUseFixture. &lt;/span&gt;&lt;/span&gt;&lt;span id=&quot;ctl00_ctl00_MasterContent_TabContentPanel_Content_wikiSourceLabel&quot;&gt;&lt;span class=&quot;codeInline&quot;&gt;I guess this is a very safe approach because it means tests/specs are extremely unlikely to affect each other, but it actually seems over-kill if you&#39;re using a style where the specification methods only assert (no side-effects).&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span id=&quot;ctl00_ctl00_MasterContent_TabContentPanel_Content_wikiSourceLabel&quot;&gt;&lt;span class=&quot;codeInline&quot;&gt;The lack of messages on assertions seems sensible, and it is for small focused BDD specifications, but if you use it for integration testing you would want the option of adding a message in.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span id=&quot;ctl00_ctl00_MasterContent_TabContentPanel_Content_wikiSourceLabel&quot;&gt;&lt;span class=&quot;codeInline&quot;&gt;&lt;br /&gt;On the syntax front we could always go for more flexibility:&lt;br /&gt;&lt;pre class=&quot;code&quot;&gt;&lt;span style=&quot;color:blue;&quot;&gt;public class &lt;/span&gt;&lt;span style=&quot;COLOR: rgb(43,145,175)&quot;&gt;When_a_user_has_no_contacts &lt;/span&gt;: &lt;span style=&quot;COLOR: rgb(43,145,175)&quot;&gt;FlexibileGrammarSpecificationBase&lt;br /&gt;&lt;/span&gt;{&lt;br /&gt;  &lt;span style=&quot;color:blue;&quot;&gt;private &lt;/span&gt;&lt;span style=&quot;COLOR: rgb(43,145,175)&quot;&gt;User &lt;/span&gt;_user;&lt;br /&gt;  &lt;span style=&quot;color:blue;&quot;&gt;private &lt;/span&gt;&lt;span style=&quot;COLOR: rgb(43,145,175)&quot;&gt;Contact &lt;/span&gt;_contact;&lt;br /&gt;&lt;br /&gt;  &lt;span style=&quot;color:blue;&quot;&gt;protected override void &lt;/span&gt;EstablishContext()&lt;br /&gt;  {&lt;br /&gt;      _user = &lt;span style=&quot;color:blue;&quot;&gt;new &lt;/span&gt;&lt;span style=&quot;COLOR: rgb(43,145,175)&quot;&gt;TestUserBuilder&lt;/span&gt;().Build();&lt;br /&gt;      _contact = &lt;span style=&quot;color:blue;&quot;&gt;new &lt;/span&gt;&lt;span style=&quot;COLOR: rgb(43,145,175)&quot;&gt;ContactBuilder&lt;/span&gt;().Build();&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  [&lt;span style=&quot;COLOR: rgb(43,145,175)&quot;&gt;Because&lt;/span&gt;]&lt;br /&gt;  &lt;span style=&quot;color:blue;&quot;&gt;protected void &lt;/span&gt;and_we_give_them_a_new_contact()&lt;br /&gt;  {&lt;br /&gt;      _user.Contacts.Add(_contact);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  [&lt;span style=&quot;COLOR: rgb(43,145,175)&quot;&gt;Observation&lt;/span&gt;]&lt;br /&gt;  &lt;span style=&quot;color:blue;&quot;&gt;public void &lt;/span&gt;the_contact_should_be_associated_with_the_user()&lt;br /&gt;  {&lt;br /&gt;      _user.Contacts.Contains(_contact).ShouldBeTrue();&lt;br /&gt;  }&lt;br /&gt;}&lt;/pre&gt;However this seems a little pointless to me so I&#39;ve dumped the idea.&lt;br /&gt;&lt;span style=&quot;FONT-WEIGHT: bold&quot;&gt;&lt;br /&gt;Summary&lt;/span&gt;&lt;br /&gt;We decided to go with XUnit.net but we also plan to look at Ruby based solutions including RSpec and Cucumber. &lt;a href=&quot;http://github.com/aslakhellesoy/cucumber/wikis&quot;&gt;Cucumber&lt;/a&gt; seems exciting as it lets you specify &lt;a href=&quot;http://github.com/aslakhellesoy/cucumber/wikis/using-fit-tables-in-a-feature&quot;&gt;table based specifications&lt;/a&gt;, theoretically allowing us to get the advantages of a FIT style approach without having to use FIT (or &lt;a href=&quot;http://blog.objectmentor.com/articles/2008/10/02/slim&quot;&gt;SLIM&lt;/a&gt;) itself.&lt;br /&gt;&lt;br /&gt;Ultimately there is a lot going on in the BDD space in Ruby-land (and a &lt;a href=&quot;http://www.pragprog.com/titles/achbd/the-rspec-book&quot;&gt;book&lt;/a&gt; on the way) and the language does suit it quite well so we intend to do some playing. &lt;/span&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://colinjack.blogspot.com/feeds/5347250620727298017/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://colinjack.blogspot.com/2008/11/contextspecification-available.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32609450/posts/default/5347250620727298017'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32609450/posts/default/5347250620727298017'/><link rel='alternate' type='text/html' href='http://colinjack.blogspot.com/2008/11/contextspecification-available.html' title='BDD - Available Frameworks'/><author><name>Colin Jack</name><uri>http://www.blogger.com/profile/01403166737046938219</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://4.bp.blogspot.com/_DTvjK44dn8U/ShfOBrJokwI/AAAAAAAAAJo/JUww9xRlJH0/S220/Pitlochry+043+cut.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32609450.post-2270357581754812635</id><published>2008-11-19T20:58:00.004+00:00</published><updated>2008-12-28T21:48:39.322+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="BDD"/><category scheme="http://www.blogger.com/atom/ns#" term="TDD"/><category scheme="http://www.blogger.com/atom/ns#" term="Unit Testing"/><title type='text'>BDD and Parameterized testing</title><content type='html'>&lt;p&gt;&lt;/p&gt;&lt;p&gt;Although I really like &lt;a href=&quot;http://blog.daveastels.com/files/BDD_Intro.pdf&quot;&gt;Astels style BDD&lt;/a&gt; (to me a constrained/enhanced style of TDD) I still use a lot of &lt;a href=&quot;http://xunitpatterns.com/Parameterized%20Test.html&quot;&gt;parameterized testing&lt;/a&gt; and though I should give you an example why, using XUnit.net. &lt;/p&gt;&lt;p&gt;Lets say we&#39;re testing simple SPECIFICATION style rules, we might write:&lt;/p&gt;&lt;pre class=&quot;code&quot;&gt;[&lt;span style=&quot;COLOR: rgb(43,145,175)&quot;&gt;Concerning&lt;/span&gt;(&lt;span style=&quot;color:blue;&quot;&gt;typeof&lt;/span&gt;(&lt;span style=&quot;COLOR: rgb(43,145,175)&quot;&gt;ValidEmailRule&lt;/span&gt;&amp;lt;&lt;span style=&quot;COLOR: rgb(43,145,175)&quot;&gt;TestEntity&lt;/span&gt;&amp;gt;))]&lt;br /&gt;&lt;span style=&quot;color:blue;&quot;&gt;public class &lt;/span&gt;&lt;span style=&quot;COLOR: rgb(43,145,175)&quot;&gt;When_using_rule_on_a_null_string &lt;/span&gt;: &lt;span style=&quot;COLOR: rgb(43,145,175)&quot;&gt;SpecificationBase&lt;br /&gt;&lt;/span&gt;{&lt;br /&gt;  &lt;span style=&quot;color:blue;&quot;&gt;protected &lt;/span&gt;&lt;span style=&quot;COLOR: rgb(43,145,175)&quot;&gt;TestEntity &lt;/span&gt;_testEntity;&lt;br /&gt;  &lt;span style=&quot;color:blue;&quot;&gt;private bool &lt;/span&gt;_isSatisfied;&lt;br /&gt;&lt;br /&gt;  &lt;span style=&quot;color:blue;&quot;&gt;protected override void &lt;/span&gt;EstablishContext()&lt;br /&gt;  {&lt;br /&gt;      _testEntity = &lt;span style=&quot;COLOR: rgb(43,145,175)&quot;&gt;ContextSetup&lt;/span&gt;.CreateTestEntityWithValue(&lt;span style=&quot;color:blue;&quot;&gt;null&lt;/span&gt;);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  &lt;span style=&quot;color:blue;&quot;&gt;protected override void &lt;/span&gt;Act()&lt;br /&gt;  {&lt;br /&gt;      _isSatisfied = &lt;span style=&quot;color:blue;&quot;&gt;new &lt;/span&gt;&lt;span style=&quot;COLOR: rgb(43,145,175)&quot;&gt;ValidEmailRule&lt;/span&gt;&amp;lt;&lt;span style=&quot;COLOR: rgb(43,145,175)&quot;&gt;TestEntity&lt;/span&gt;&amp;gt;(_testEntity, x =&amp;gt; x.Value).IsSatisfied();&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  [&lt;span style=&quot;COLOR: rgb(43,145,175)&quot;&gt;Observation&lt;/span&gt;]&lt;br /&gt;  &lt;span style=&quot;color:blue;&quot;&gt;public void &lt;/span&gt;is_satisfied()&lt;br /&gt;  {&lt;br /&gt;      _isSatisfied.ShouldBeTrue();&lt;br /&gt;  }&lt;br /&gt;}&lt;/pre&gt;&lt;p&gt;This just tests how the rule handles a null value, but we&#39;d then want to test with all sorts of other values (valid and invalid). To compare lets thus look at how easy it is to test a variety of invalid e-mail address using one of &lt;a href=&quot;http://www.codeplex.com/xunit&quot;&gt;XUnit.net&lt;/a&gt;&#39;s parameterized testing approaches (see &lt;a href=&quot;http://blog.benhall.me.uk/labels/XUnit.html&quot;&gt;Ben Hall&lt;/a&gt; for more options):&lt;/p&gt;&lt;pre class=&quot;code&quot;&gt;[&lt;span style=&quot;COLOR: rgb(43,145,175)&quot;&gt;Concerning&lt;/span&gt;(&lt;span style=&quot;color:blue;&quot;&gt;typeof&lt;/span&gt;(&lt;span style=&quot;COLOR: rgb(43,145,175)&quot;&gt;ValidEmailRule&lt;/span&gt;&amp;lt;&lt;span style=&quot;COLOR: rgb(43,145,175)&quot;&gt;TestEntity&lt;/span&gt;&amp;gt;))]&lt;br /&gt;&lt;span style=&quot;color:blue;&quot;&gt;public class &lt;/span&gt;&lt;span style=&quot;COLOR: rgb(43,145,175)&quot;&gt;When_evaluating_invalid_email_addresses&lt;br /&gt;&lt;/span&gt;{&lt;br /&gt;  [&lt;span style=&quot;COLOR: rgb(43,145,175)&quot;&gt;Theory&lt;/span&gt;]&lt;br /&gt;  [&lt;span style=&quot;COLOR: rgb(43,145,175)&quot;&gt;InlineData&lt;/span&gt;(&lt;span style=&quot;COLOR: rgb(163,21,21)&quot;&gt;&quot;sddas.com&quot;&lt;/span&gt;)]&lt;br /&gt;  [&lt;span style=&quot;COLOR: rgb(43,145,175)&quot;&gt;InlineData&lt;/span&gt;(&lt;span style=&quot;COLOR: rgb(163,21,21)&quot;&gt;&quot;sddas@&quot;&lt;/span&gt;)]&lt;br /&gt;  [&lt;span style=&quot;COLOR: rgb(43,145,175)&quot;&gt;InlineData&lt;/span&gt;(&lt;span style=&quot;COLOR: rgb(163,21,21)&quot;&gt;&quot;@&quot;&lt;/span&gt;)]&lt;br /&gt;  [&lt;span style=&quot;COLOR: rgb(43,145,175)&quot;&gt;InlineData&lt;/span&gt;(&lt;span style=&quot;COLOR: rgb(163,21,21)&quot;&gt;&quot;@blah.com&quot;&lt;/span&gt;)]&lt;br /&gt;  [&lt;span style=&quot;COLOR: rgb(43,145,175)&quot;&gt;InlineData&lt;/span&gt;(&lt;span style=&quot;COLOR: rgb(163,21,21)&quot;&gt;&quot;sddas@@blah.com&quot;&lt;/span&gt;)]&lt;br /&gt;  [&lt;span style=&quot;COLOR: rgb(43,145,175)&quot;&gt;InlineData&lt;/span&gt;(&lt;span style=&quot;COLOR: rgb(163,21,21)&quot;&gt;&quot;1213231&quot;&lt;/span&gt;)]&lt;br /&gt;  &lt;span style=&quot;color:blue;&quot;&gt;public void &lt;/span&gt;is_not_satisfied(&lt;span style=&quot;color:blue;&quot;&gt;string &lt;/span&gt;invalidEmailAddress)&lt;br /&gt;  {&lt;br /&gt;      &lt;span style=&quot;color:blue;&quot;&gt;var &lt;/span&gt;testEntity = &lt;span style=&quot;COLOR: rgb(43,145,175)&quot;&gt;ContextSetup&lt;/span&gt;.CreateTestEntityWithValue(invalidEmailAddress);&lt;br /&gt;&lt;br /&gt;      &lt;span style=&quot;color:blue;&quot;&gt;var &lt;/span&gt;isSatisfied = &lt;span style=&quot;color:blue;&quot;&gt;new &lt;/span&gt;&lt;span style=&quot;COLOR: rgb(43,145,175)&quot;&gt;ValidEmailRule&lt;/span&gt;&amp;lt;&lt;span style=&quot;COLOR: rgb(43,145,175)&quot;&gt;TestEntity&lt;/span&gt;&amp;gt;(testEntity, x =&amp;gt; x.Value).IsSatisfied();&lt;br /&gt;&lt;br /&gt;      isSatisfied.ShouldBeFalse();&lt;br /&gt;  }&lt;br /&gt;}&lt;/pre&gt;&lt;p&gt;&lt;a href=&quot;http://11011.net/software/vspaste&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://11011.net/software/vspaste&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://11011.net/software/vspaste&quot;&gt;&lt;/a&gt;Now you may disagree with my approach here, this isn&#39;t as readable as it could be, but I think you can see why you&#39;d use this approach if you have a lot of values to validate.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://colinjack.blogspot.com/feeds/2270357581754812635/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://colinjack.blogspot.com/2008/11/contextsetup-and-parameterized-testing.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32609450/posts/default/2270357581754812635'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32609450/posts/default/2270357581754812635'/><link rel='alternate' type='text/html' href='http://colinjack.blogspot.com/2008/11/contextsetup-and-parameterized-testing.html' title='BDD and Parameterized testing'/><author><name>Colin Jack</name><uri>http://www.blogger.com/profile/01403166737046938219</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://4.bp.blogspot.com/_DTvjK44dn8U/ShfOBrJokwI/AAAAAAAAAJo/JUww9xRlJH0/S220/Pitlochry+043+cut.JPG'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32609450.post-1356223862879291133</id><published>2008-10-28T22:43:00.001+00:00</published><updated>2008-11-09T14:57:06.921+00:00</updated><title type='text'>DDD - Making meaningful relationships</title><content type='html'>&lt;p&gt;A recent &lt;a href=&quot;http://tech.groups.yahoo.com/group/domaindrivendesign/message/8276&quot;&gt;discussion on the DDD forum&lt;/a&gt; made me want to post about what I consider to be an under-appreciated aspect of domain modelling, namely relationships. In the &lt;a href=&quot;http://tech.groups.yahoo.com/group/domaindrivendesign/message/8276&quot;&gt;thread&lt;/a&gt; Randy Stafford said the following:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Note that RoleRegistration is an example of a Relationship Object &amp;#8211; arguably a fourth archetype of domain object alongside Entity, Value Object, and Aggregate.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;I couldn&#39;t agree more with this, in a domain model I worked on recently we had a stack of very useful and very meaningful relationship objects that served a range of purposes. &lt;/p&gt;  &lt;p&gt;For example if a &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-style: italic&quot;&gt;Client &lt;/span&gt;has &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-style: italic&quot;&gt;Accounts &lt;/span&gt;then it is possible that you can get away with just having that as a direct relationship but its equally possible that the relationship itself is meaningful and carries its own data/behavior. In this case you might have a type association with the relationship that would explain if the &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-style: italic&quot;&gt;Client &lt;/span&gt;owns the &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-style: italic&quot;&gt;Account&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-style: italic&quot;&gt;,&lt;/span&gt; or whethery just manage it, or whether they are actually just one of several owners.&lt;/p&gt;  &lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: bold&quot;&gt;Aggregates&lt;/span&gt;&lt;/div&gt;  &lt;p&gt;You need to consider aggregate boundaries especially carefully when using Relationship Objects.&lt;/p&gt;  &lt;p&gt;In the case of an association between a &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-style: italic&quot;&gt;Client &lt;/span&gt;and an &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-style: italic&quot;&gt;Account &lt;/span&gt;the relationship&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-style: italic&quot;&gt;&amp;#160;&lt;/span&gt;probably belongs to the &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-style: italic&quot;&gt;Client &lt;/span&gt;aggregate. &lt;/p&gt;  &lt;p&gt;Then again if you choose to model the association between a &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-style: italic&quot;&gt;Client &lt;/span&gt;and &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-style: italic&quot;&gt;SalesAdvisor &lt;/span&gt;using a full blown &lt;a href=&quot;http://www.amazon.co.uk/Enterprise-Patterns-MDA-Archetype-Technology/dp/032111230X/ref=sr_1_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1225226806&amp;amp;sr=8-1&quot;&gt;party/role/relationship&lt;/a&gt; approach then things become a big more complex. Are all parties and roles and relationships different aggregates or does a relationship own the two roles it composes?&lt;/p&gt;  &lt;p&gt;If its the latter then you may be breaking an aggregate design rule because the party now refers to a piece of the relationship aggregate other than root. &lt;/p&gt;  &lt;div&gt;   &lt;p&gt;&lt;strong&gt;Temporal Associations&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;Another common case is that the relationship is temporal which brings with it a lot of complexity and should only be done with extreme care.&amp;#160; If your sure you need temporal associations then you will find &lt;a href=&quot;http://martinfowler.com/ap2/timeNarrative.html&quot;&gt;Martin Fowlers patterns&lt;/a&gt; invaluable.&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: bold&quot;&gt;&lt;/span&gt;&lt;/p&gt;  &lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: bold&quot;&gt;Encapsulating Relationships&lt;/span&gt;&lt;/div&gt;  &lt;div&gt;&lt;/div&gt;  &lt;p&gt;Most of the relationships have real meaning in their own right but sometimes they are just an artifact of the design, in those cases you can demote the associations to being just an encapsulated detail.&lt;/p&gt;  &lt;p&gt;Take the association between &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-style: italic&quot;&gt;Client &lt;/span&gt;and &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-style: italic&quot;&gt;Account&lt;/span&gt;, maybe when you ask for the &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-style: italic&quot;&gt;Accounts &lt;/span&gt;for a &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-style: italic&quot;&gt;Client&lt;/span&gt; you want to get the &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-style: italic&quot;&gt;Account &lt;/span&gt;objects rather than the &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-style: italic&quot;&gt;ClientAccountRelationship &lt;/span&gt;objects. &lt;/p&gt;  &lt;p&gt;If this were the case you could keep the &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-style: italic&quot;&gt;ClientAccountRelationship &lt;/span&gt;class, which has its own data/behaviour and makes mapping easier, but entirely hide it from users of the domain. One way to do this is to create &lt;a href=&quot;http://colinjack.blogspot.com/2008/09/nhibernate-mapping-custom-collections.html&quot;&gt;custom collection&lt;/a&gt; called &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-style: italic&quot;&gt;ClientAccounts &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-style: normal&quot;&gt;and have it &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-style: normal&quot;&gt;wrap an &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #2b91af&quot;&gt;IList&lt;/span&gt;&amp;lt;ClientAccountRelationship&amp;gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-style: italic&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-style: normal&quot;&gt; whilst acting like it is just a simple &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #2b91af&quot;&gt;IList&lt;/span&gt;&amp;lt;Account&amp;gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-style: italic&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-style: normal&quot;&gt;, it can also provide helpful methods like &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-style: italic&quot;&gt;FindPrimaryOwner.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: bold&quot;&gt;Summary&lt;/span&gt;&lt;/div&gt;  &lt;div&gt;&lt;/div&gt;  &lt;p&gt;I mention all of this because when I got started with DDD relationship objects bothered me especially as we were working with a legacy database and I saw the relationship objects as being a problem caused by the number of join tables. At the time my plan was to get rid of a lot of them by taking advantage of NHibernate magic. &lt;/p&gt;  &lt;p&gt;However as I got a bit more experience I realized that they were key and although we encapsulated some (when they &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-style: italic&quot;&gt;were&lt;/span&gt; just an artifact of the design) we made others totally key parts of the design. In both cases the relationships themselves were very useful.&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://colinjack.blogspot.com/feeds/1356223862879291133/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://colinjack.blogspot.com/2008/10/ddd-making-meaningful-relationships_28.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32609450/posts/default/1356223862879291133'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32609450/posts/default/1356223862879291133'/><link rel='alternate' type='text/html' href='http://colinjack.blogspot.com/2008/10/ddd-making-meaningful-relationships_28.html' title='DDD - Making meaningful relationships'/><author><name>Colin Jack</name><uri>http://www.blogger.com/profile/01403166737046938219</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://4.bp.blogspot.com/_DTvjK44dn8U/ShfOBrJokwI/AAAAAAAAAJo/JUww9xRlJH0/S220/Pitlochry+043+cut.JPG'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32609450.post-783847597104771406</id><published>2008-10-28T22:18:00.002+00:00</published><updated>2008-10-28T22:23:11.380+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="DDD"/><category scheme="http://www.blogger.com/atom/ns#" term="Design"/><title type='text'>Domain Driven Design - Knowledge Level</title><content type='html'>&lt;p&gt;A recent thread on the &lt;a href=&quot;http://tech.groups.yahoo.com/group/altdotnet/message/16491&quot;&gt;ALT.NET forum&lt;/a&gt; got me thinking about KNOWLEDGE LEVEL, a seldom discussed but useful pattern from domain driven design. As with many patterns near the end of the book its a pattern that isn&#39;t going to suit every situation but it is a pattern that I think has a lot of value. In summary we aim to explicitly split our model into:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;strong&gt;Operations Level&lt;/strong&gt; - The place that we do our day-to-day business. For example &lt;em&gt;Shipment&lt;/em&gt;, &lt;em&gt;Account&lt;/em&gt;. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Knowledge Level&lt;/strong&gt; - Objects that describe/constrain the objects in the basic (operations) level. For example &lt;em&gt;EmployeeType&lt;/em&gt;, &lt;em&gt;RebatePaymentMethod&lt;/em&gt;, &lt;em&gt;ShipmentMethod&lt;/em&gt;. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;I&#39;m not a big fan of just repeating what&#39;s already in books and to my mind if you want to understand DDD then I&#39;d suggest you read the &lt;a href=&quot;http://www.amazon.com/Domain-Driven-Design-Tackling-Complexity-Software/dp/0321125215&quot;&gt;DDD bible&lt;/a&gt;. I&#39;m thus not going to go over the pattern, but I did think it was worth a post about what I&#39;ve found when coming to the detailed design and implementation of classes in a knowledge layer. I thought I&#39;d start by discussing how you can persist/load/model objects in the KNOWLEDGE LEVEL, moving on to other topics in later posts. Two caveats:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;strong&gt;Simple Example&lt;/strong&gt; - Rather than using a real example I&#39;ve chosen to use the shipping method example from the thread, I&#39;ve never worked in that domain so this may be a bad idea but it felt right... &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Might seem obvious &lt;/strong&gt;- If you are an object/behaviour first type of developer then you&#39;ll be looking at using OO techniques and so some of this will just be waffle. However I&#39;ve seen situations where people used data-driven techniques when approaching their KNOWLEDGE LEVEL and so I wanted to explain why I think it&#39;s a bad idea. &lt;/li&gt; &lt;/ol&gt;  &lt;h3&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/h3&gt;  &lt;h3&gt;&lt;br /&gt;&lt;/h3&gt;&lt;h3&gt;&lt;strong&gt;Option 1 - Data First Approach&lt;/strong&gt;&lt;/h3&gt;  &lt;p&gt;Since we store our operational objects in the database why not do the same for our KNOWLEDGE LEVEL? If we go down this path then we&#39;d have a &lt;em&gt;ShippingMethod&lt;/em&gt; table with one row for each shipping method we support. Of course each shipping method has different characteristics, perhaps certain shipping methods are only available to long standing customers or customers in certain countries. To support this we&#39;ll end up with extra columns in the &lt;em&gt;ShippingMethod&lt;/em&gt; table and maybe even associations to other tables. To get the &lt;em&gt;ShippingMethods&lt;/em&gt; from the database we&#39;d probably use a REPOSITORY, probably making sure that the REPOSITORY is read-only (maybe not always, see pattern for information on modifying the KNOWLEDGE LEVEL).&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Disadvantages&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;This approach obviously has disadvantages:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;strong&gt;Loss of clarity&lt;/strong&gt; - Our ubiquitous language might refer to a &quot;local carrier shipping method&quot; but it won&#39;t be visible in the domain model and in fact to see details about this shipping method you need to look at the appropriate row in the &lt;em&gt;ShippingMethod&lt;/em&gt; table. Even if you don&#39;t value the ubiquitous language this is a problem because as a developer you&#39;ll end up switching between the code and database in order to understand even simple aspects of the behaviour. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Goodbye OO, hello procedural&lt;/strong&gt; - Since there is no &lt;em&gt;LocalCarrierShippingMethod&lt;/em&gt; class I have nowhere to put its behaviour, instead I have to fall back on a procedural style of program where we load in the data about the &lt;em&gt;ShippingMethod&lt;/em&gt; with an ID of 3 (which happens to be the local carrier shipping method) and then look at its &lt;em&gt;SupportsInternationalDelivery&lt;/em&gt; boolean flag before deciding how to proceed (hopelessly naive example alert). We can encapsulate this logic in a service, perhaps a &lt;em&gt;ShippingMethodSelectionService&lt;/em&gt; but its still more than a little smelly. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;No explicit associations&lt;/strong&gt; - Imagine if we know that the local carrier shipping method is only available for certain types of &lt;em&gt;Orders&lt;/em&gt; and that the decision making also takes into account the &lt;em&gt;Customer&lt;/em&gt; placing the &lt;em&gt;Order&lt;/em&gt;. If we&#39;re using the database-driven approach then managing this becomes very difficult, we can&#39;t just look at our &lt;em&gt;LocalCarrierShippingMethod&lt;/em&gt; class or at some code that sets up the associations. Instead we fall back and run a database query involving all sorts of joins. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&lt;strong&gt;Advantages&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Those are, as I see it, the primary disadvantages of hiding this important information in the database. Ofcourse its not all bad:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;strong&gt;Consistency&lt;/strong&gt; - Our KNOWLEDGE LEVEL is handled in the same was the rest of the domain model, loaded from the database as required. Not sure its a massive advantage though because we&#39;ve explicitly chosen break out the KNOWLEDGE LEVEL its fair enough to say that the consistency has limited value. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Flexibility&lt;/strong&gt; - If we want to add a new kind of &lt;em&gt;ShippingMethod&lt;/em&gt; we just add a row to the &lt;em&gt;ShippingMethod&lt;/em&gt; table, no need to redeploy. That&#39;s the idea anyway, but its not always going to work especially when the related procedural code has to change. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Its also fair to say that the KNOWLEDGE LEVEL changes at a different pace to the rest of the model, we probably don&#39;t add &lt;em&gt;ShippingMethods&lt;/em&gt; too often. However we might want to be able to change characteristics of existing &lt;em&gt;ShipmentMethod&#39;s&lt;/em&gt;, such as changing their price (remember this probably only affects future &lt;em&gt;Shipments&lt;/em&gt;) or changing what &lt;em&gt;Countries&lt;/em&gt; they can be used in. So on the flexibility angle you&#39;ve actually got a couple of types of changes:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;strong&gt;Adding/removing concepts&lt;/strong&gt; -  Perhaps adding a donkey based shipment method, to me its safe to require a redeploy for this sort of change and in any case without some serious thought we&#39;re not necessarily going to be able to do just by modifying a table anyway.  &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Changing configuration/associations - &lt;/strong&gt;Its maybe fair enough to expect to be able to ban using donkey based shipping for all future orders in Spain without requiring the code to be redeployed. As I&#39;ll show below this can work even if you go for an object-oriented approach and I also think this is a case where a DSL would really add value (not tried that though). &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Those are the main advantages I&#39;ve heard about, and as I say I&#39;m not sold on them. That brings me on to how I think you should go about it...&lt;/p&gt;  &lt;h3&gt; &lt;/h3&gt;  &lt;h3&gt;Option 2 - Object Oriented Approach&lt;/h3&gt;  &lt;p&gt;Take that &quot;local carrier shipping method&quot; concept and turn it into a &lt;em&gt;LocalCarrierShippingMethod&lt;/em&gt; class, probably inheriting from a &lt;em&gt;ShippingMethod&lt;/em&gt; base class. There&#39;s only one instance of this class and since its read-only (at least as far as normal usage goes) it&#39;s totally safe to share it. The &lt;em&gt;ShippingMethod&lt;/em&gt; has any data it needs to support the behaviour it contains and to support the interface that it exposes, so for example you might have an &lt;em&gt;IsApplicableForSending(Shipment)&lt;/em&gt; with each subclass providing their own implementation.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Implementation&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;How does this look in practice, well one approach I&#39;ve used is to a variant of the &lt;a href=&quot;http://msmvps.com/blogs/jon_skeet/archive/2006/01/05/classenum.aspx&quot;&gt;typesafe enum&lt;/a&gt; pattern. The following is just pseudo code to show the idea:&lt;/p&gt;  &lt;pre class=&quot;code&quot;&gt;&lt;span style=&quot;color:blue;&quot;&gt;public abstract class &lt;/span&gt;&lt;span style=&quot;color:#2b91af;&quot;&gt;ShipmentMethod&lt;br /&gt;&lt;/span&gt;{&lt;br /&gt;  &lt;span style=&quot;color:blue;&quot;&gt;private static &lt;/span&gt;&lt;span style=&quot;color:#2b91af;&quot;&gt;Dictionary&lt;/span&gt;&amp;lt;&lt;span style=&quot;color:#2b91af;&quot;&gt;ShipmentMethodKind&lt;/span&gt;, &lt;span style=&quot;color:#2b91af;&quot;&gt;ShipmentMethod&lt;/span&gt;&amp;gt; _shippingMethods = &lt;span style=&quot;color:blue;&quot;&gt;new &lt;/span&gt;&lt;span style=&quot;color:#2b91af;&quot;&gt;Dictionary&lt;/span&gt;&amp;lt;&lt;span style=&quot;color:#2b91af;&quot;&gt;ShipmentMethodKind&lt;/span&gt;, &lt;span style=&quot;color:#2b91af;&quot;&gt;ShipmentMethod&lt;/span&gt;&amp;gt;();&lt;br /&gt;&lt;br /&gt;  &lt;span style=&quot;color:blue;&quot;&gt;static &lt;/span&gt;ShipmentMethod()&lt;br /&gt;  {&lt;br /&gt;      &lt;span style=&quot;color:green;&quot;&gt;// NOTE: In practice you wouldn&#39;t do it like this but it is just an example....&lt;br /&gt;      &lt;/span&gt;_shippingMethods.Add(&lt;span style=&quot;color:#2b91af;&quot;&gt;ShipmentMethodKind&lt;/span&gt;.LocalCarrier, &lt;span style=&quot;color:blue;&quot;&gt;new &lt;/span&gt;&lt;span style=&quot;color:#2b91af;&quot;&gt;LocalCarrierShippingMethod&lt;/span&gt;());&lt;br /&gt;      _shippingMethods.Add(&lt;span style=&quot;color:#2b91af;&quot;&gt;ShipmentMethodKind&lt;/span&gt;.DonkeyBased, &lt;span style=&quot;color:blue;&quot;&gt;new &lt;/span&gt;&lt;span style=&quot;color:#2b91af;&quot;&gt;DonkeyBasedShippingMethod&lt;/span&gt;());&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  &lt;span style=&quot;color:blue;&quot;&gt;public &lt;/span&gt;&lt;span style=&quot;color:#2b91af;&quot;&gt;IEnumerable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color:#2b91af;&quot;&gt;ShipmentMethod&lt;/span&gt;&amp;gt; GetAll()&lt;br /&gt;  {&lt;br /&gt;      &lt;span style=&quot;color:blue;&quot;&gt;return &lt;/span&gt;_shippingMethods.Values;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  &lt;span style=&quot;color:blue;&quot;&gt;public &lt;/span&gt;&lt;span style=&quot;color:#2b91af;&quot;&gt;ShipmentMethod &lt;/span&gt;GetByKey(&lt;span style=&quot;color:#2b91af;&quot;&gt;ShipmentMethodKind &lt;/span&gt;key)&lt;br /&gt;  {&lt;br /&gt;      &lt;span style=&quot;color:blue;&quot;&gt;return &lt;/span&gt;_shippingMethods[key];&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  &lt;span style=&quot;color:blue;&quot;&gt;public abstract bool &lt;/span&gt;IsApplicableFor(&lt;span style=&quot;color:#2b91af;&quot;&gt;Shipment &lt;/span&gt;toEvaluate);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:blue;&quot;&gt;public enum &lt;/span&gt;&lt;span style=&quot;color:#2b91af;&quot;&gt;ShipmentMethodKind&lt;br /&gt;&lt;/span&gt;{&lt;br /&gt;  LocalCarrier = 0,&lt;br /&gt;  DonkeyBased = 1&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:blue;&quot;&gt;public class &lt;/span&gt;&lt;span style=&quot;color:#2b91af;&quot;&gt;LocalCarrierShippingMethod &lt;/span&gt;: &lt;span style=&quot;color:#2b91af;&quot;&gt;ShipmentMethod&lt;br /&gt;&lt;/span&gt;{&lt;br /&gt;  &lt;span style=&quot;color:blue;&quot;&gt;public override bool &lt;/span&gt;IsApplicableFor(&lt;span style=&quot;color:#2b91af;&quot;&gt;Shipment &lt;/span&gt;toEvaluate)&lt;br /&gt;  {&lt;/pre&gt;&lt;p&gt;Don&#39;t get too hung up on the implementation, some of it is optional (e.g. &lt;em&gt;ShipmentMethodKind&lt;/em&gt;) and it could be refractored quite a bit, I&#39;m really just trying to show the idea not to show how to actually implement a solution.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;You can see that in this case &lt;em&gt;ShipmentMethod&lt;/em&gt; is really just a SPECIFICATION but in real situations a &lt;em&gt;ShipmentMethod&lt;/em&gt; might well have more behaviour and data. The base class gives us an easy way to access all the &lt;em&gt;ShipmentMethods&lt;/em&gt; that the system handles, this can be useful because it could easy provide useful methods like &lt;em&gt;GetAllShipmentMethodsThatCanHandle(Shipment)&lt;/em&gt;.&lt;/p&gt;&lt;p&gt;In reality there are multiple ways of implementing this, in particular you might want to load in the configuration for each &lt;em&gt;ShipmentMethod&lt;/em&gt; from a database or other data source. This is more flexible than including it in the code but slightly more complicated to implement.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Referential Integrity&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;If you choose not to load the data from the database then we might seem to have a problem, how do we associate this &lt;em&gt;ShipmentMethod&lt;/em&gt; with other objects in the KNOWLEDGE LEVEL and operational level?&lt;/p&gt;&lt;p&gt;It would seem that we&#39;ve lost referential integrity but we have choices:&lt;/p&gt;&lt;ol&gt;  &lt;li&gt;&lt;strong&gt;Generate tables&lt;/strong&gt; - The code in the static constructor in &lt;em&gt;ShipmentMethod&lt;/em&gt; can be used to generate a table in the database.&lt;/li&gt;  &lt;li&gt;&lt;strong&gt;Use enum value as key&lt;/strong&gt; - We can instead treat the value of the &lt;em&gt;ShipmentMethodKind&lt;/em&gt; as a &quot;key&quot; in the database, automated tests will make spotting any issues really quick.&lt;/li&gt;  &lt;li&gt;&lt;strong&gt;Have separate config table&lt;/strong&gt; - As I said earlier we may want to load the configuration information for each &lt;em&gt;ShipmentMethod&lt;/em&gt; from the database, if so we have a ShipmentMethod table which resolves the problem.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;In any case I haven&#39;t found this to be a major issue, by and large I don&#39;t care that my &lt;em&gt;ShipmentTable&lt;/em&gt; has a &lt;em&gt;ShipmentMethodId&lt;/em&gt; table which doesn&#39;t lead me anywhere as if I want to understand what&#39;s going on I go back to the domain model.&lt;/p&gt;&lt;h3&gt;&lt;br /&gt;&lt;/h3&gt;&lt;h3&gt;In Closing&lt;/h3&gt;&lt;p&gt;Not sure this topic needed as much details I&#39;ve put in here, really its the KNOWLEDGE LEVEL pattern that&#39;s key but I hoped that by enumerating some of the implementation choices that I&#39;ve seen I&#39;d help you make an informed decision.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://colinjack.blogspot.com/feeds/783847597104771406/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://colinjack.blogspot.com/2008/10/domain-driven-design-knowledge-level.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32609450/posts/default/783847597104771406'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32609450/posts/default/783847597104771406'/><link rel='alternate' type='text/html' href='http://colinjack.blogspot.com/2008/10/domain-driven-design-knowledge-level.html' title='Domain Driven Design - Knowledge Level'/><author><name>Colin Jack</name><uri>http://www.blogger.com/profile/01403166737046938219</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://4.bp.blogspot.com/_DTvjK44dn8U/ShfOBrJokwI/AAAAAAAAAJo/JUww9xRlJH0/S220/Pitlochry+043+cut.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32609450.post-1686329199304169842</id><published>2008-10-28T21:34:00.003+00:00</published><updated>2008-10-28T22:35:19.946+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Biztalk"/><category scheme="http://www.blogger.com/atom/ns#" term="Design"/><category scheme="http://www.blogger.com/atom/ns#" term="WCF"/><title type='text'>Biztalk and WCF - When two big beasts collide</title><content type='html'>&lt;p&gt;I spent the entirety of last week trying to create a ridiculously simple Biztalk orchestration and trying to get it to talk to a simple WCF service and I thought I should describe what I &amp;quot;learned&amp;quot;.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Biztalk&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;If you follow me on &lt;a href=&quot;http://twitter.com/colin_jack&quot;&gt;Twitter&lt;/a&gt; you&#39;ll know how unbelievably annoyed the results made me and although I didn&#39;t learn much from the experience I thought I should put down some tips:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;If Biztalk gives you an error DO NOT read it, the message itself is bound to be utter jibberish and the correct response is to put it straight into Google. &lt;/li&gt;    &lt;li&gt;If Biztalk behaves like a problem is with step N don&#39;t assume that step N-1 passed especially if step N-1 is a transformation. You can test the transformation in isolation within the IDE using a sample document so do it, &lt;/li&gt;    &lt;li&gt;If you are having real problems working out why Biztalk and WCF aren&#39;t playing ball then it might well be XML namespaces that are the issue. &lt;/li&gt;    &lt;li&gt;If you&#39;re thinking of renaming the orchestration or anything in it be careful and take a backup first. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&lt;strong&gt;WCF&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Whilst Biztalk left me cold the WCF side of it was a joy, mainly because &lt;a href=&quot;http://www.johnnyhall.co.uk/&quot;&gt;Johnny Hall&lt;/a&gt; pointed me at the &lt;a href=&quot;http://www.castleproject.org/container/facilities/trunk/wcf/index.html&quot;&gt;Castle WCF Facility&lt;/a&gt; and his own usages of it. Using the WCF Facility configuring your services is an utter joy, definitely when compared to the XML based approach that you get with bog-standard WCF. The documentation isn&#39;t great but the tests that you get with the Castle &lt;a href=&quot;http://svn.castleproject.org:8080/svn/castle/trunk/&quot;&gt;source code&lt;/a&gt; are the real way to see how to use its fluent interface.&lt;/p&gt;  &lt;p&gt;Johnny also suggested we use a console application to host the service when testing and a Windows Service when deploying for a real. The console application makes testing locally a lot easier, just CTRL+F5 and your host is loaded and ready for you to fire requests at it. &lt;/p&gt;  &lt;p&gt;If only Biztalk was as enjoyable to use...&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://colinjack.blogspot.com/feeds/1686329199304169842/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://colinjack.blogspot.com/2008/10/biztalk-and-wcf-when-two-big-beasts.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32609450/posts/default/1686329199304169842'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32609450/posts/default/1686329199304169842'/><link rel='alternate' type='text/html' href='http://colinjack.blogspot.com/2008/10/biztalk-and-wcf-when-two-big-beasts.html' title='Biztalk and WCF - When two big beasts collide'/><author><name>Colin Jack</name><uri>http://www.blogger.com/profile/01403166737046938219</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://4.bp.blogspot.com/_DTvjK44dn8U/ShfOBrJokwI/AAAAAAAAAJo/JUww9xRlJH0/S220/Pitlochry+043+cut.JPG'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32609450.post-6516183776647111666</id><published>2008-10-28T17:11:00.001+00:00</published><updated>2008-12-28T21:49:47.825+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="BDD"/><category scheme="http://www.blogger.com/atom/ns#" term="TDD"/><category scheme="http://www.blogger.com/atom/ns#" term="Unit Testing"/><title type='text'>BDD - Files/Folders/Namespaces (BDD)</title><content type='html'>&lt;span style=&quot;FONT-WEIGHT: bold&quot;&gt;Files/Folders&lt;/span&gt;&lt;br /&gt;One thing that can be troublesome when moving from TDD to BDD is how to organize your files and folders, so far I&#39;ve tried two approaches: &lt;ol&gt;&lt;li&gt;&lt;span style=&quot;FONT-WEIGHT: bold&quot;&gt;One class in each file&lt;/span&gt; - So if you have &lt;span style=&quot;FONT-STYLE: italic&quot;&gt;Whe&lt;/span&gt;&lt;span style=&quot;FONT-STYLE: italic&quot;&gt;n_associating_an_order_with_a_customer &lt;/span&gt;and &lt;span style=&quot;FONT-STYLE: italic&quot;&gt;When_associating_an_order_with_a_preferred_customer&lt;/span&gt; then they&#39;d be in seperate files even though they are very closely related. If they share a base class, or a class they both compose, then that would be in yet another class (presumably).&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;FONT-WEIGHT: bold&quot;&gt;Multiple classes per file&lt;/span&gt; - As an example you might group the &lt;span style=&quot;FONT-STYLE: italic&quot;&gt;Order&lt;/span&gt; addition contexts into a file called &lt;span style=&quot;FONT-STYLE: italic&quot;&gt;OrderPlacementSpecifications&lt;/span&gt;, the file could also contain the shared base class (if you went down that road). &lt;/li&gt;&lt;/ol&gt;To me the second approach has a couple of advantages: &lt;ol&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;FONT-WEIGHT: bold&quot;&gt;Gives the reader extra information&lt;/span&gt; - By grouping the two order placement classes we tell the reader that they are quite closely related.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;FONT-WEIGHT: bold&quot;&gt;Simplifies folder structure&lt;/span&gt; - If we go for the other approach, one class in each file, then we&#39;re probably going to have to have more folders. The addition of the extra files and folders definitely makes the solution file harder to structure.&lt;/li&gt;&lt;/ol&gt;To give you an idea here&#39;s a screen shot of a part of the folder structure for a sample app we&#39;re doing:&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;TEXT-ALIGN: left&quot;&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheTF6RP5rAM83y3Zm5kCtryzcXVOyDcGGFvrvMpBVa65gG0EhAVX3kE_gtRiBLEcJ08RRnzeaqiVsGgkbAb4_MNARkyY8jtpVRrLneP1wVFWWRhjzxR3P0niefdm2m8I6-Y677PA/s1600-h/BDDFolder.JPG&quot;&gt;&lt;img id=&quot;BLOGGER_PHOTO_ID_5257793251051135938&quot; style=&quot;DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: pointer; TEXT-ALIGN: center&quot; alt=&quot;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheTF6RP5rAM83y3Zm5kCtryzcXVOyDcGGFvrvMpBVa65gG0EhAVX3kE_gtRiBLEcJ08RRnzeaqiVsGgkbAb4_MNARkyY8jtpVRrLneP1wVFWWRhjzxR3P0niefdm2m8I6-Y677PA/s320/BDDFolder.JPG&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;FONT-WEIGHT: bold&quot;&gt;Namespaces&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;In addition to files/folders I&#39;ve tried a few approaches to structuring namespaces but the approach I&#39;m trying now groups related artifacts. For example:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Specifications.Users.Domain&lt;/li&gt;&lt;li&gt;Specifications.Users.Domain.Contacts&lt;/li&gt;&lt;li&gt;Specifications.Users.Services&lt;/li&gt;&lt;li&gt;Specifications.Users.Domain.Repositories&lt;/li&gt;&lt;li&gt;Specifications.Users.UI.Controllers&lt;/li&gt;&lt;/ol&gt;The &quot;Specifications&quot; bit adds very little but I think grouping all specifications related to users is useful, not least as R# makes it easy to run all the specifications in a namespace. This can be useful if you have a big solution and only want to run the specifications for the area your working on. Its also worth saying that its &quot;Users&quot; to avoid clashing with the &quot;User&quot; class.&lt;br /&gt;&lt;br /&gt;Folder wise however we&#39;re using a standard approach where your Repositories are in a completely seperate folder from your controllers, even though they might both relate to a particular entity. To me the lack of relationship between our folders and namespaces isn&#39;t a problem though, with R# its easy to find a file/type and in addition the folder/namespace tell you two different things about your codebase (one by &quot;layer&quot;, one by &quot;feature&quot;).&lt;br /&gt;&lt;br /&gt;So I&#39;m interested in peoples views? I&#39;m guessing you&#39;ll all dislike it though because from what I&#39;ve seen no matter what you do people will be unhappy with your file/folder/namespace scheme. Pluse we&#39;ll probably turn against this approach next week....</content><link rel='replies' type='application/atom+xml' href='http://colinjack.blogspot.com/feeds/6516183776647111666/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://colinjack.blogspot.com/2008/10/contextspecification.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32609450/posts/default/6516183776647111666'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32609450/posts/default/6516183776647111666'/><link rel='alternate' type='text/html' href='http://colinjack.blogspot.com/2008/10/contextspecification.html' title='BDD - Files/Folders/Namespaces (BDD)'/><author><name>Colin Jack</name><uri>http://www.blogger.com/profile/01403166737046938219</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://4.bp.blogspot.com/_DTvjK44dn8U/ShfOBrJokwI/AAAAAAAAAJo/JUww9xRlJH0/S220/Pitlochry+043+cut.JPG'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheTF6RP5rAM83y3Zm5kCtryzcXVOyDcGGFvrvMpBVa65gG0EhAVX3kE_gtRiBLEcJ08RRnzeaqiVsGgkbAb4_MNARkyY8jtpVRrLneP1wVFWWRhjzxR3P0niefdm2m8I6-Y677PA/s72-c/BDDFolder.JPG" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32609450.post-1414344691775525805</id><published>2008-10-23T19:58:00.001+01:00</published><updated>2008-10-23T19:58:19.455+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="DDD"/><category scheme="http://www.blogger.com/atom/ns#" term="NHibernate"/><title type='text'>What I want from an ORM</title><content type='html'>&lt;p&gt;Thought I&#39;d blog about some of the things I&#39;d like to see in an ORM in the future, particularly to support DDD cleanly:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;strong&gt;No enforced associations&lt;/strong&gt; - I never want to create an association in the model just to support persistence, regardless of where keys are stored. So if I want to use uni-directional associations then I should be able to do that without having to go &lt;a href=&quot;http://colinjack.blogspot.com/2007/08/nhibernate-gotchas-living-with-legacy.html&quot;&gt;for workarounds&lt;/a&gt;.&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Aggregate locking &lt;/strong&gt;- Currently, with NHibernate at least, its difficult to lock an entire aggregate. For example NHibernate&#39;s optimistic concurrency approach involves applying a version to rows, however aggregates can span tables so we really want to be able to give each aggregate a shared version (&lt;a href=&quot;http://colinjack.blogspot.com/2007/05/nhibernate-and-coarse-grained-locking.html&quot;&gt;coarse-grained locking approach&lt;/a&gt;). See &lt;a href=&quot;http://martinfowler.com/eaaCatalog/coarseGrainedLock.html&quot;&gt;coarse-grained lock pattern&lt;/a&gt;.&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Validating before saving&lt;/strong&gt; - I&#39;d like hooks to automatically and cleanly validate an entire aggregate before persistence. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Disabling unit of work&lt;/strong&gt; - I&#39;d like to be able to disable my unit of work, in many cases when working with DDD the UOW becomes more of a hindrance than anything else. I really want to be 100% sure that the only way to save a &lt;em&gt;Customer&lt;/em&gt; is through a &lt;em&gt;CustomerRepository&lt;/em&gt;.&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Revalidate value objects when reloading&lt;/strong&gt; - Value objects only validate their data in their constructors, if your ORM does not ensure that a constructor that performs the validation is also used when reloading the object then its possible to end up with an invalid Value object. This is something you definitely want to avoid. Greg Young has raised this issue a few times, including in the &lt;a href=&quot;http://groups.google.com/group/nhusers/browse_thread/thread/f10a2328dd4b11eb/938bb50c534e8fee?lnk=gst&amp;amp;q=Greg+Young#938bb50c534e8fee&quot;&gt;NHibernate forum&lt;/a&gt;, and made some very good points.&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Value objects&lt;/strong&gt; - Choosing to view something as a value object is a design decision that you make irrespective of the underlying DB design, so whilst the NHibernate component mapping is useful it should be as powerful as the mappings used elsewhere. Unfortunately with NHibernate &lt;a href=&quot;http://colinjack.blogspot.com/2007/08/nhibernate-gotchas-living-with-legacy.html&quot;&gt;components don&#39;t support inheritance&lt;/a&gt; &lt;a href=&quot;http://colinjack.blogspot.com/2008/03/nhibernate-working-around-lack-of.html&quot;&gt;nicely&lt;/a&gt; and if your value object is stored in a separate table &lt;a href=&quot;http://tech.groups.yahoo.com/group/domaindrivendesign/message/5270&quot;&gt;things get confusing&lt;/a&gt;.&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;There may be other things I&#39;d want but those are the ones that come to mind.&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://colinjack.blogspot.com/feeds/1414344691775525805/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://colinjack.blogspot.com/2008/10/what-i-want-from-orm.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32609450/posts/default/1414344691775525805'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32609450/posts/default/1414344691775525805'/><link rel='alternate' type='text/html' href='http://colinjack.blogspot.com/2008/10/what-i-want-from-orm.html' title='What I want from an ORM'/><author><name>Colin Jack</name><uri>http://www.blogger.com/profile/01403166737046938219</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://4.bp.blogspot.com/_DTvjK44dn8U/ShfOBrJokwI/AAAAAAAAAJo/JUww9xRlJH0/S220/Pitlochry+043+cut.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32609450.post-7842809385391419042</id><published>2008-10-23T12:44:00.002+01:00</published><updated>2008-10-23T12:48:02.448+01:00</updated><title type='text'>New Home</title><content type='html'>Just to let you know that I&#39;ll now also be posting over at &lt;a href=&quot;http://www.lostechies.com/blogs/colinjack/&quot;&gt;lostechies&lt;/a&gt;. Obviously I&#39;ll continue to post everything here though so you only need to do anything if your already subscribed to the &lt;a href=&quot;http://feeds.feedburner.com/LosTechies&quot;&gt;lostechies feed&lt;/a&gt; and getting my blog entries twice is annoying you.</content><link rel='replies' type='application/atom+xml' href='http://colinjack.blogspot.com/feeds/7842809385391419042/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://colinjack.blogspot.com/2008/10/new-home.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32609450/posts/default/7842809385391419042'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32609450/posts/default/7842809385391419042'/><link rel='alternate' type='text/html' href='http://colinjack.blogspot.com/2008/10/new-home.html' title='New Home'/><author><name>Colin Jack</name><uri>http://www.blogger.com/profile/01403166737046938219</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://4.bp.blogspot.com/_DTvjK44dn8U/ShfOBrJokwI/AAAAAAAAAJo/JUww9xRlJH0/S220/Pitlochry+043+cut.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32609450.post-2051514481950282287</id><published>2008-10-22T21:06:00.003+01:00</published><updated>2008-10-22T21:59:26.920+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="DDD"/><category scheme="http://www.blogger.com/atom/ns#" term="Design"/><title type='text'>DDD and Complexity</title><content type='html'>&lt;p&gt;&lt;/p&gt;  &lt;p&gt;There have been some interesting and entirely valid discussions on Twitter about the validity of DDD and about deciding when its useful and when its too complex (including good comments from &lt;a href=&quot;http://twitter.com/caseycharlton/statuses/970664982&quot;&gt;Casey Charlton&lt;/a&gt; and &lt;a href=&quot;http://twitter.com/jbogard/statuses/970667578&quot;&gt;Jimmy Bogard&lt;/a&gt;). I full agree with Casey and Jimmy and the comments, when combined with an interesting discussion on the topic at the latest ALT.NET UK discussion, let me wanting to blog about how I think DDD can be used in different types of projects.&lt;/p&gt;  &lt;p&gt;First off I must admit that even for a simple business system I&#39;d be thinking about using some of the patterns from DDD, in particular I think these usually have value:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;strong&gt;Aggregate&lt;/strong&gt;&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Repository&lt;/strong&gt;&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Service&lt;/strong&gt;&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;For example I find that thinking about aggregates makes me think much more carefully about how to map those classes to the database, for example how far to cascade, which in my view is a good idea as not thinking about boundaries can lead you to some fairly annoying debugging sessions. You can take these three patterns and with a good ORM and create and map a simple domain model to a green fields database very quickly.&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Tradeoffs&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Here&#39;s some of the tradeoffs we&#39;re making when using DDD on a system that it doesn&#39;t necessarily suit:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;strong&gt;Analysis/Design&lt;/strong&gt; - We map completely skip the analysis/design and in particular the discussions with the domain expert, instead starting from our requirements and letting TDD and our own design skills guides us to the correct design.&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Encapsulation&lt;/strong&gt; - We might expose everything using getters and setters and the domain may be anaemic, for example validation may be in attributes and/or use a &lt;a href=&quot;http://www.castleproject.org/activerecord/documentation/v1rc1/usersguide/validation.html&quot;&gt;custom framework&lt;/a&gt;.&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Design Clarity&lt;/strong&gt; - If our primary focus is on getting going fast then we&#39;re going to have to cut some corners.&amp;#160; We&#39;d bind the domain to the GUI, design it to be as easy to map to the database, make it easy to create domain objects (default constructors) and generally make tradeoffs in the quality of the domain model to make our own lives easier. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Flexibility&lt;/strong&gt; - A model that is quick to create/map/bind is not likely going to be flexible, this may or may not be a problem.&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Patterns&lt;/strong&gt; - We&#39;re ignoring half the patterns in DDD, patterns that have a lot of value in a complex domain model but may not be justified when the domain is simpler/more closely bounded.&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;We make these tradeoffs to make our lives easier and in particular I wanted to cover two of the tradeoffs you may choose to make.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Design Clarity&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;If we want to be able to bind your GUI to the domain and map it to the database quickly then we can being to fray our domain model:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Value objects make binding and displaying validation errors trickier.&lt;/li&gt;    &lt;li&gt;If our user interface uses wizards then the GUI will want to create domain objects early on in the wizard, possibly without giving us any meaningful data. We thus end up with default constructors or constructors with very few arguments.&lt;/li&gt;    &lt;li&gt;If we use an ORM with a unit of work it will probably fight against our need to validate aggregates before saving them.&lt;/li&gt;    &lt;li&gt;If we use an ORM we&#39;ll find it hard to version the entire aggregate.&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;With discipline you can make these tradeoffs whilst still maintaining a comprehensible model but there is no doubt that we are making tradeoffs. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Flexibility&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;We&#39;re also sacrificing flexibility, for example a lot of talk about repositories right now focuses on generic repositories. For example we&#39;d have a &lt;em&gt;Repository&amp;lt;T&amp;gt;&lt;/em&gt; class where T is an aggregate root and you&#39;d have query methods on this repository that would take Linq specifications. That&#39;s going to be fine for a lot of cases but in more complex models (or where we don&#39;t control our environment fully) our repository can encapsulate complex logic, for example we should be able to ensure the following:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Instances of aggregate are never deleted or they are simply archived.&lt;/li&gt;    &lt;li&gt;Instances of aggregate Y are built up from multiple data sources.&lt;/li&gt;    &lt;li&gt;Instead of mapping aggregate Z to a (legacy) DB we map some simple DTO&#39;s and then in the repository convert them to our nicely designed aggregate.&lt;/li&gt;    &lt;li&gt;Query Z is very expensive and needs to be done using SQL. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Those are all things I&amp;#8217;ve had to be involved in when working with a moderately complex domain model and repositories helped encapsulate those details. So whilst I think generic repositories might have their place ins some systems I think you have to be aware of the choices your making.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;What was the point of all this?&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;My point with all this is that you can get a lot of value from DDD without following it too closely, but you need to be aware of what tradeoffs your making and why. Choosing to go for a simple domain model when you have a complex problem to solve is a really bad choice and going from active record (true active record) to a real domain model is not going to be a smooth transition. &lt;/p&gt;  &lt;p&gt;However I don&#39;t think the choice is easy, for example there&#39;s been a lot of discussion recently on whether DDD and complex models are suitable for CRUD related problems. In general I can see why using DDD on an average CRUD system is a mistake but sometimes it is worth using. For example we used DDD on a CRM system that among other things handled parties and their associations in a temporal manner. This was a complex modelling problem solved with a complex pattern but primarily we were handling CRUD (including constraints/validation) and setting the stage for other systems to use the information. Trying to do this using active record would, in my view, have been a big mistake.&lt;/p&gt;  &lt;p&gt;So as Casey pointed out DDD is expensive and whilst it can pay off you need to do in with eyes open fully aware of the tradeoffs involved.&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://colinjack.blogspot.com/feeds/2051514481950282287/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://colinjack.blogspot.com/2008/10/ddd-and-complexity.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32609450/posts/default/2051514481950282287'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32609450/posts/default/2051514481950282287'/><link rel='alternate' type='text/html' href='http://colinjack.blogspot.com/2008/10/ddd-and-complexity.html' title='DDD and Complexity'/><author><name>Colin Jack</name><uri>http://www.blogger.com/profile/01403166737046938219</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://4.bp.blogspot.com/_DTvjK44dn8U/ShfOBrJokwI/AAAAAAAAAJo/JUww9xRlJH0/S220/Pitlochry+043+cut.JPG'/></author><thr:total>6</thr:total></entry></feed>