<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>ddd &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://en.wordpress.com/tag/ddd/</link>
	<description>Feed of posts on WordPress.com tagged "ddd"</description>
	<pubDate>Sat, 28 Nov 2009 22:39:22 +0000</pubDate>

	<generator>http://en.wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[Domain-Driven Design]]></title>
<link>http://kt2sj.wordpress.com/2009/11/27/domain-driven-design/</link>
<pubDate>Fri, 27 Nov 2009 13:52:04 +0000</pubDate>
<dc:creator>kt2sj</dc:creator>
<guid>http://kt2sj.wordpress.com/2009/11/27/domain-driven-design/</guid>
<description><![CDATA[Domain-Driven Design Quickly Model ? Model = an abstraction of the domain = internal representation ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><h2>Domain-Driven Design Quickly</h2>
<dl>
<dt>Model ? </dt>
<dd>Model = an abstraction of the domain = internal representation of the target domain = essential part of software design </dd>
</dl>
<p><a id="What_Is_Domain-Driven_Design" name="What_Is_Domain-Driven_Design"></a></p>
<h3>What Is Domain-Driven Design</h3>
<ul>
<li> Software Specialists와 해당 도메인 영역의 전문가가 만나서 도메인을 구성할 모델을 만들어내는 Design 과정.(Building Domain Knowledge)</li>
<li> Essential Concept을 먼저 찾고, 이어서 살을 덧붙여 모델을 만들어 나간다.</li>
</ul>
<p><a id="The_Ubiquitous_Language" name="The_Ubiquitous_Language"></a></p>
<h3>The Ubiquitous Language</h3>
<ul>
<li> A core principle of domain-driven design is to use a language based on the model.</li>
<li> Use the model as the backbone of a language.</li>
<li> Make sure this language appears consistently in all the communication forms used by the team
<ul>
<li> for this reason, the language is called <strong>the Ubiquitous Language</strong>.</li>
</ul>
</li>
</ul>
<p><a id="MODEL-DRIVEN_DESIGN" name="MODEL-DRIVEN_DESIGN"></a></p>
<h3>MODEL-DRIVEN DESIGN</h3>
<dl>
<dt>Most important patterns to be used in model-driven design. </dt>
</dl>
<p><a title="Image:MDDPatterns.jpg" href="http://58.142.102.179:8080/wiki/index.php/File:MDDPatterns.jpg"><img src="http://58.142.102.179:8080/wiki/images/a/ad/MDDPatterns.jpg" border="0" alt="Image:MDDPatterns.jpg" width="559" height="409" /></a></p>
<dl>
<dt>Four conceptual layers </dt>
</dl>
<p><a title="Image:MDDLayers.jpg" href="http://58.142.102.179:8080/wiki/index.php/File:MDDLayers.jpg"><img src="http://58.142.102.179:8080/wiki/images/1/1f/MDDLayers.jpg" border="0" alt="Image:MDDLayers.jpg" width="549" height="380" /></a></p>
<pre>User Interface   Responsible for presenting information to the user and
(Presentation    interpreting user commands.
Layer)
Application       This is a thin layer which coordinates the application
Layer               activity. It does not contain business logic. It does not
                       hold the state of the business objects, but it can hold
                       the state of an application task progress.
Domain Layer    This layer contains information about the domain. This
                       is the heart of the business software. The state of
                       business objects is held here. Persistence of the
                       business objects and possibly their state is delegated to
                       the infrastructure layer.
Infrastructure    This layer acts as a supporting library for all the other
Layer                layers. It provides communication between layers,
                       implements persistence for business objects, contains
                       supporting libraries for the user interface layer, etc.
</pre>
<p>&#160;</p>
<p><a id="Refactoring_Toward_Deeper_Insight" name="Refactoring_Toward_Deeper_Insight"></a></p>
<h3>Refactoring Toward Deeper Insight</h3>
<ul>
<li> Make the implicit concepts explicit.
<ul>
<li> Placing the <strong>Constraint</strong> into a separate method has the advantage of making it explicit</li>
<li> <strong>Processes</strong> are usually expressed in code with procedures. 서비스나 Strategy로 절차를 구현한다.</li>
<li> <strong>Specification</strong> is used to test an object to see if it satisfies a certain criteria. Specification Object를 만들어 함수를 모아둔다.</li>
</ul>
</li>
</ul>
<div id="highlighter_134164">
<div>
<div><a title="view source" href="http://58.142.102.179:8080/wiki/index.php/Domain_Driven_Design#viewSource"><br />
</a></div>
</div>
<div>
<div><code>Customer customer = customerRepository.findCustomer(customerIdentiy);</code></div>
<div><code>...</code></div>
<div><code>Specification customerEligibleForRefund = </code><code>new</code> <code>Specification(</code></div>
<div><code> </code><code>new</code> <code>CustomerPaidHisDebtsInThePast(),</code></div>
<div><code> </code><code>new</code> <code>CustomerHasNoOutstandingBalances() );</code></div>
<div><code><br />
</code></div>
<div><code>if</code> <code>(customerEligibleForRefund.isSatisfiedBy(customer)</code></div>
<div><code>{</code></div>
<div><code> </code><code>refundService.issueRefundTo(customer);</code></div>
<div><code>}</code></div>
</div>
</div>
<p><a id="Preserving_Model_Integrity" name="Preserving_Model_Integrity"></a></p>
<h3>Preserving Model Integrity</h3>
<p>A <em><strong>unified enterprise model</strong></em> is an ideal which is not easily accomplished, and sometimes it is not even worth trying it.<br />
서로 연관성 있는 모델들이 병행개발되어, Model Integrity를 맞추기란 쉽지 않다.</p>
<dl>
<dt>A set of techniques used to maintain model integrity. </dt>
</dl>
<p><a title="Image:MDDIntegrity.jpg" href="http://58.142.102.179:8080/wiki/index.php/File:MDDIntegrity.jpg"><img src="http://58.142.102.179:8080/wiki/images/4/4c/MDDIntegrity.jpg" border="0" alt="Image:MDDIntegrity.jpg" width="630" height="343" /></a></p>
<p><a id="DDD_Matters_Today" name="DDD_Matters_Today"></a></p>
<h3>DDD Matters Today</h3>
<p><a id="DDD_.EB.A6.AC.EC.86.8C.EC.8A.A4" name="DDD_.EB.A6.AC.EC.86.8C.EC.8A.A4"></a></p>
<h2>DDD 리소스</h2>
<ol>
<li> <a title="http://domaindrivendesign.org/" rel="nofollow" href="http://domaindrivendesign.org/">DDD 공식 사이트</a></li>
<li> <a title="http://dannorth.net/whats-in-a-story" rel="nofollow" href="http://dannorth.net/whats-in-a-story">Dan North &#8211; 사용자 스토리 작성 방법</a></li>
<li> <a title="http://laputan.org/mud" rel="nofollow" href="http://laputan.org/mud">커다란 진흙덩이 아키텍처 스타일</a></li>
<li> <a title="http://codebetter.com/blogs/gregyoung" rel="nofollow" href="http://codebetter.com/blogs/gregyoung">Greg Young 블로그 &#8211; CodeBetter</a></li>
<li> <a title="http://objectmentor.com/resources/articles/srp.pdf" rel="nofollow" href="http://objectmentor.com/resources/articles/srp.pdf">단일 책임 원칙에 대한 Robert C. Martin의 논문</a></li>
<li> <a title="http://cmcrossroads.com/bradapp/docs/demeter-intro.html" rel="nofollow" href="http://cmcrossroads.com/bradapp/docs/demeter-intro.html">Brad Appleton &#8211; 데메테르의 법칙에 대한 소개</a></li>
<li> <a title="http://martinfowler.com/eaaCatalog/layerSupertype.html" rel="nofollow" href="http://martinfowler.com/eaaCatalog/layerSupertype.html">Martin Fowler &#8211; 계층 슈퍼 형식 패턴에 대한 설명</a></li>
<li> <a title="http://butunclebob.com/ArticleS.UncleBob.PrinciplesOfOod" rel="nofollow" href="http://butunclebob.com/ArticleS.UncleBob.PrinciplesOfOod">Robert C. Martin &#8211; S.O.L.I.D. 원칙에 대한 설명</a></li>
<li> <a title="http://msdn.microsoft.com/ko-kr/magazine/dd419654.aspx" rel="nofollow" href="http://msdn.microsoft.com/ko-kr/magazine/dd419654.aspx">MSDN Magazine Best Practice &#8211; DDD(Domain Driven Design) 소개</a></li>
</ol>
<p>&#160;</p>
<p><a id=".EC.B0.B8.EA.B3.A0_.EB.A7.81.ED.81.AC" name=".EC.B0.B8.EA.B3.A0_.EB.A7.81.ED.81.AC"></a></p>
<h2>참고 링크</h2>
<ul>
<li> 2009/07/29   Domain-Driven Design의 적용-4.ORM과 투명한 영속성 9부</li>
<li> 2009/07/13   Domain-Driven Design의 적용-4.ORM과 투명한 영속성 8부</li>
<li> 2009/06/29   Domain-Driven Design의 적용-4.ORM과 투명한 영속성 7부</li>
<li> 2009/06/23   Domain-Driven Design의 적용-4.ORM과 투명한 영속성 6부</li>
<li> 2009/06/15   Domain-Driven Design의 적용-4.ORM과 투명한 영속성 5부</li>
<li> 2009/03/25   Domain-Driven Design의 적용-4.ORM과 투명한 영속성 4부</li>
<li> 2009/02/27   Domain-Driven Design의 적용-4.ORM과 투명한 영속성 3부</li>
<li> 2009/02/23   Domain-Driven Design의 적용-4.ORM과 투명한 영속성 2부</li>
<li> 2009/02/15   Domain-Driven Design의 적용-4.ORM과 투명한 영속성 1부</li>
<li> 2009/01/18   Domain-Driven Design의 적용-3.Dependency Injection과 Aspect-Oriented Programming 7부</li>
<li> 2009/01/02   Domain-Driven Design의 적용-3.Dependency Injection과 Aspect-Oriented Programming 6부</li>
<li> 2008/12/24   Domain-Driven Design의 적용-3.Dependency Injection과 Aspect-Oriented Programming 5부</li>
<li> 2008/12/17   Domain-Driven Design의 적용-3.Dependency Injection과 Aspect-Oriented Programming 4부</li>
<li> 2008/12/13   Domain-Driven Design의 적용-3.Dependency Injection과 Aspect-Oriented Programming 3부</li>
<li> 2008/12/09   Domain-Driven Design의 적용-3.Dependency Injection과 Aspect-Oriented Programming 2부</li>
<li> 2008/12/05   Domain-Driven Design의 적용-3.Dependency Injection과 Aspect-Oriented Programming 1부</li>
<li> 2008/11/30   Domain-Driven Design의 적용-2.AGGREGATE와 REPOSITORY 5부</li>
<li> 2008/11/27   Domain-Driven Design의 적용-2.AGGREGATE와 REPOSITORY 4부</li>
<li> 2008/11/25   Domain-Driven Design의 적용-2.AGGREGATE와 REPOSITORY 3부</li>
<li> 2008/11/23   Domain-Driven Design의 적용-2.AGGREGATE와 REPOSITORY 2부</li>
<li> 2008/11/20   Domain-Driven Design의 적용-2.AGGREGATE와 REPOSITORY 1부</li>
<li> 2008/11/17   Domain-Driven Design의 적용-1.VALUE OBJECT와 REFERENCE OBJECT 4부</li>
<li> 2008/11/17   Domain-Driven Design의 적용-1.VALUE OBJECT와 REFERENCE OBJECT 3부</li>
<li> 2008/11/16   Domain-Driven Design의 적용-1.VALUE OBJECT와 REFERENCE OBJECT 2부</li>
<li> 2008/11/15   Domain-Driven Design의 적용-1.VALUE OBJECT와 REFERENCE OBJECT 1부</li>
</ul>
<p>[출처] <a title="http://aeternum.egloos.com/tag/DomainDrivenDesign" rel="nofollow" href="http://aeternum.egloos.com/tag/DomainDrivenDesign">http://aeternum.egloos.com/tag/DomainDrivenDesign</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[November Newsletter]]></title>
<link>http://scottishdevelopers.com/2009/11/27/november-newsletter-2/</link>
<pubDate>Fri, 27 Nov 2009 07:54:21 +0000</pubDate>
<dc:creator>Colin Angus Mackay</dc:creator>
<guid>http://scottishdevelopers.com/2009/11/27/november-newsletter-2/</guid>
<description><![CDATA[Welcome With Christmas just around the corner we&#8217;re celebrating the year with two geek dinners]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><h1>Welcome</h1>
<p>With Christmas just around the corner we&#8217;re celebrating the year with two geek dinners. The first in <a title="Edinburgh Geek Dinner" href="http://edinburgh-geek-dinner.eventbrite.com/">Edinburgh on the 4th December</a> and the second in <a href="http://glasgow-geek-dinner.eventbrite.com/">Glasgow on the 12th December</a>. There are only a few places left as most went when we announced them on Twitter.</p>
<p>If you are on twitter you can follow us <a title="Scottish Developers on Twitter" href="http://twitter.com/scottishdevs">@scottishdevs</a>.</p>
<p>If you were signed up to our <a href="http://www.eventbrite.com/event/468733996">Advanced TDD</a> event which we had to cancel at the last minute then you may be interested to know that it has been rescheduled and will be on 8th December.</a> </p>
<p>We announced our annual conference, <a title="DDD Scotland 2010" href="http://www.developerdeveloperdeveloper.com/scotland2010/">Developer Day Scotland</a> (part of the DDD community conferences), this month too. It will be on the 8th May 2010. The call for speakers is now open, so if you have any sessions (60 minutes) that you&#8217;d like to give then please register on the site and submit your session. In the new year we&#8217;ll be opening the sessions up to voting so you can have your say on what sessions you want to see. For those on twitter you can follow <a href="http://twitter.com/dddscot">@dddscot</a> to get the latest news about the conference.</p>
</p>
<p>If you run a user group, or just know of an event that would be of interest to software developers we&#8217;re always keen to hear about it. Let us know by sending an email to <a href="mailto:support@scottishdevelopers.com">support@scottishdevelopers.com</a></p>
<p>Regards,    <br />Colin Mackay, Chairman, Scottish Developers</p>
<h1>Our Upcoming Events</h1>
<p><strong>4-December-2009 @ 19:30 in Edinburgh</strong>     <br /><strong><a href="http://edinburgh-geek-dinner.eventbrite.com/">Edinburgh Geek Dinner &#8211; Amber Restaurant</a></strong>     <br />Registration Required</p>
<p><strong>8-December-2009 @ 18:30 in Glasgow</strong>     <br /><strong><a href="http://www.eventbrite.com/event/468733996">Advanced TDD &#8211; An Introduction to Testing Patterns and Behaviour Driven Development</a></strong>     <br />Registration Required &#8211; Cost FREE</p>
<p><strong>12-December-2009 @ 21:30 in Glasgow </strong>(Meeting in the pub from 19:00, meal at 21:30)     <br /><a href="http://glasgow-geek-dinner.eventbrite.com/"><strong>Glasgow Geek Dinner &#8211; La Tasca</strong></a>     <br />Registration Required &#8211; Cost: Price of meal     </p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Deux femmes aux sérieux atouts ]]></title>
<link>http://zebigbooster.wordpress.com/2009/11/25/deux-femmes-aux-serieux-atouts/</link>
<pubDate>Wed, 25 Nov 2009 05:36:26 +0000</pubDate>
<dc:creator>LittleBigMonster</dc:creator>
<guid>http://zebigbooster.wordpress.com/2009/11/25/deux-femmes-aux-serieux-atouts/</guid>
<description><![CDATA[Il fut un temps où j&#8217;avais une voisine qui avait, elle aussi, de sérieux atouts. Nostalgie. Tr]]></description>
<content:encoded><![CDATA[Il fut un temps où j&#8217;avais une voisine qui avait, elle aussi, de sérieux atouts. Nostalgie. Tr]]></content:encoded>
</item>
<item>
<title><![CDATA[Organizing Domain Logic]]></title>
<link>http://guptavikas.wordpress.com/2009/11/24/organizing-domain-logic/</link>
<pubDate>Tue, 24 Nov 2009 17:07:48 +0000</pubDate>
<dc:creator>hivikas</dc:creator>
<guid>http://guptavikas.wordpress.com/2009/11/24/organizing-domain-logic/</guid>
<description><![CDATA[Introduction Most enterprise applications use Layering as the primary technique to break the complex]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><strong>Introduction</strong></p>
<p>Most enterprise applications use Layering as the primary technique to break the complexity of the software projects. Layering involves breaking down the applications in various layers where each layer lie above the other and provide services to the higher layer. Layering provides following benefits</p>
<ul>
<li>You can understand about a layer without knowing about other layers. For example, if you know how <a href="http://en.wikipedia.org/wiki/Transmission_Control_Protocol">TCP</a> works you can create your own <a href="http://en.wikipedia.org/wiki/File_Transfer_Protocol">FTP</a> service without actually knowing about the internals of the ethernet.</li>
<li>It is easy to substitute the layers with alternative implementation. For example, if DAO layer is designed properly, if should be easy to change the ORM solution from <a href="https://www.hibernate.org/">Hibernate</a> to <a href="http://ibatis.apache.org/">iBatis</a> easily.</li>
<li>Layering also helps in standardization and extensibility.</li>
</ul>
<p>But the downsides of layering applications include cascading changes, performance overhead of converting data from one representation into another and it is not often easy to decide the later of a particular component. Considering the benefits of layering and it&#8217;s applicability to almost any sort of computer application, it is used widely and successfully.</p>
<p>Three primary layers of an enterprise application can broadly be categorized into</p>
<ol>
<li>Presentation Layer: Information display, HTTP requests, command line invocations, batch API, etc.</li>
<li>Domain Layer: Here lies the &#8220;Heart of the software&#8221;</li>
<li>Datasource Layer: Provides access to external resources like databases, messaging, mail server, etc.</li>
</ol>
<p>In this blog, we will discuss various patterns of organizing domain logic and specific pros and cons of each. We will also discuss how these approaches compare with each other.<br />
<!--more--><br />
<strong>Domain Login Patterns</strong><br />
In his book, <a href="http://www.amazon.com/Patterns-Enterprise-Application-Architecture-Martin/dp/0321127420">PoEEA</a>, <a href="http://martinfowler.com/">Martin Fowler</a> has classified domain logic patterns into three primary patterns: Transaction Script, Domain Model and Table Module. He also discussed introducing an additional layer, Service Layer, which is useful in providing horizontal services. Let&#8217;s look at each of these in detail.</p>
<p><strong>Transaction Script (TS)</strong><br />
Transaction script is essentially a procedure that takes input from the presentation, processes it with validations and calculations, stores data in the database, send emails, etc. It may also fetch the data and send to the UI. It&#8217;s more like coding a C program in Java. Typically, in transaction script method of organizing domain logic, the code is segregated into various services and each service has methods that perform a particular business functionality. A method of a transaction service might look like this</p>
<pre class="brush: java;">void tsmethod(params) {
   // get data
   // process data
   if () {
   } else if {
   } else {
   }
   // insert/update/delete data
   //send email
}</pre>
<p>As you can see from the above, most of the of the above code is procedural. Here, the services act on the entities. A typical example would be an interaction between session bean and entity bean. Another similar pattern not mentioned in the PoEEA is <a href="http://martinfowler.com/bliki/AnemicDomainModel.html">Anemic Domain Model</a> (ADM) which works on the same principle where domain objects have attributes and relationships but does not have behaviour. Behaviour is provided by the services. The different between TS and ADM is that in former we do not have domain objects but rather have something which Fowler describe as <a href="http://martinfowler.com/eaaCatalog/tableDataGateway.html">Table Data Gateway</a>, which essentially is a wrapper for SQL queries.</p>
<p><strong>Domain Model (DM)</strong><br />
In domain model approach, both behaviour and data are encapsulated inside the domain objects. Domain model looks different from the database design and utilizes inheritance, strategies, and other design patterns to create complex webs of small interconnected objects. A typical domain model code might look like</p>
<pre class="brush: java;">class Bar {
  private BarAdmissionPolicy = new BarAdmissionPolicy();
  public void admit(Person person) {
     if (BarAdmissionPolicy.isAllowed(person)) {
         this.add(person)
     }
  }
}
public class BarAdmissionPolicy {
   public boolean isAllowed(Person person) {
     if (person.age &#62; 18) {
        return true;
     }
     return false;
   }
}</pre>
<p>A well designed domain model provides an abstraction of the domain logic. It encapsulates complex business logic as interactions between domain objects.</p>
<p><strong>Table Module (TM)</strong><br />
It is essentially a singleton instance that handles the business logic for all the rows in a database table. There is no concept of identity in a Table Module. It is designed to operate on entire table data. A typical domain might look like</p>
<pre class="brush: java;">class Product {
 void insert(name, type, etc) {
 }
 void insertAll(List) {
 }
 void calculateProductCost(List productIds) {
 }
}</pre>
<p>As you can see, a table module encapsulates the data and behaviour of the entire table. It is most commonly used in places where UI widgets are data-aware like Oracle Forms or .Net environment which has Visual Studio, which provides tools like <a href="http://en.wikipedia.org/wiki/Recordset">RecordSet</a>.</p>
<p><strong>Service Layer (SL)</strong><br />
A Service Layer defines an application&#8217;s boundary and its set of available operations from the perspective of interfacing client layers. It encapsulates the application&#8217;s business logic, controlling transactions, applying security and coordinating responses in the implementation of its operations. Service Layer can be thick or thin depending upon whether you are using transaction scripts or domain model.</p>
<p>Now, we have understanding of the various domain logic patterns, let&#8217;s discuss how they compare with each other.</p>
<p><strong>Comparison</strong><br />
Essentially, if you are using one of DM, TM or ADM pattern, the domain layer can be split into two layers: SL + DM/TM/ADM. SL is essential in providing horizontal services like security, transactions, etc. With TS in practice, it is difficult to identify the difference between SL and TS since TS can double up as a SL also.</p>
<p>Since, TM emphasizes one class per table, there are issues in implementing OO concepts while inheritance. There are no direct relationships between objects. For example, if you want to get a List of Products and Categories separately then it is easy to define where to put the code, but it is not clear where to put the code if you need a RecordSet which contains both Products and Categories.</p>
<p>TS is more like a service class which makes implementing domain logic difficult when the complexity of the application increases, but works well for simple applications.</p>
<p>There is a tough competition between ADM and DM. DM is essentially a Rich Domain Model (RDM). Common things between them includes data and relationships. But things specific to RDM is behaviour of the domain model. There has been a heated debate between designers to prove the dominance of one over the other. Suprisingly, the wiki page for ADM lists why should be avoid them. I reiterate them here</p>
<ul>
<li> Logic cannot be implemented in a truly object-oriented way unless wrappers are used, which hide the anemic data structure.</li>
<li> Violation of the principals information hiding and encapsulation.</li>
<li> Necessitates a separate business layer to contain the logic otherwise located in a domain model. It also means that domain model&#8217;s objects cannot guarantee their correctness at any moment, because their validation and mutation logic is placed somewhere outside (most likely in multiple places).</li>
<li> Necessitates a global access to internals of shared business entities increasing coupling and fragility.</li>
<li> Facilitates code duplication among transactional scripts and similar use cases, reduces code reuse.</li>
<li> Necessitates a service layer when sharing domain logic across differing consumers of an object model.</li>
<li> Makes a model less expressive and harder to understand.</li>
</ul>
<p>The difference between ADM and RDM is the focus of control. In the former, the services has the control and in the later domain objects controls the services. It is shown in the following diagram.<br />
<a href="http://guptavikas.wordpress.com/files/2009/11/domain-modelling1.png"><img class="aligncenter size-medium wp-image-42" title="domain-modelling" src="http://guptavikas.wordpress.com/files/2009/11/domain-modelling1.png?w=300" alt="" width="573" height="360" /></a><br />
Another benefit that differentiates ADM and RDM is that in ADM a developer has to understand two layers, service layer and domain layer but in RDM once you get the grasp of domain model, which is essentially a model of the domain logic, you get a grasp of the business and can work productively to enhance the software. RDM also makes code cohesive.</p>
<p>Experts also advocate to consider maintainability while deciding to choose between various approaches. In his book PoEEA, Fowler explains this with the help of a diagram which is shown below<br />
<a href="http://guptavikas.wordpress.com/files/2009/11/maintainability.png"><img class="aligncenter size-medium wp-image-42" title="maintainability" src="http://guptavikas.wordpress.com/files/2009/11/maintainability.png?w=300" alt="" width="530" height="373" /></a><br />
The source of the above diagram is not known. But, according to this diagram, it takes time to pick up speed with the domain model. Of course, with skilled developers the initial startup time reduces. But, as the complexity of the application increases, it becomes increasingly difficult to maintain the application if it is coded with TS pattern. TM pattern delays the cutoff point where DM takes over, but TM is advocated for .Net environments as Visual Studio provides tools which work well with TM.</p>
<p><strong>Conclusion</strong><br />
In this blog, we discussed various patterns for organizing domain logic in enterprise applications. Clearly, there is no silver bullet which fits all scenarios. Since, we work with object-oriented programming languages, it is advisable to work with approaches like DM to encapsulate business logic. Also, it makes working with complex applications easier as the complexity of the application increases. DM helps in abstracting a model of the real world domain logic in the code which once understood can make working on the applications more productive and fruitful. For simple applications, TS/ADM meets the requirements.</p>
<p>But, how to decide whether the application is complex or easy. Most of the metrics talk about the complexity once the software has been coded by analyzing if-else statements, cyclomatic complexity, etc. But, here, we are talking about predicting complexity, and there is no known metric which can objectively tell that. However, it can be subjectively predicted by knowledge of the domain of the software, which is gained by experience.</p>
<p>Another and most important factor which must be taken into consideration is maintainability. Although it cannot be quantitatively measured, but since we work in to the objective oriented world, DM seems to have an edge over other approaches and it employs inheritance, polymorphism, etc to encapsulate the domain logic.</p>
<p>As a final word, all the above domain model patterns are not mutually exclusive and an understanding of all of above might help us decide an approach for developing a particular software.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Di ritorno dall'Agile Day 2009]]></title>
<link>http://avanscoperta.wordpress.com/2009/11/23/di-ritorno-dallagile-day-2009/</link>
<pubDate>Mon, 23 Nov 2009 15:33:01 +0000</pubDate>
<dc:creator>ziobrando</dc:creator>
<guid>http://avanscoperta.wordpress.com/2009/11/23/di-ritorno-dallagile-day-2009/</guid>
<description><![CDATA[Ho visto colleghi preparati e curiosi, ho visto emergere spunti interessanti dalla sintesi di posizi]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Ho visto colleghi preparati e curiosi, ho visto emergere spunti interessanti dalla sintesi di posizioni diverse, ho sentito spunti nuovi ed interessanti. Ho incontrato persone piacevoli che non conoscevo e che ora sono onorato di conoscere.</p>
<p>Tutto questo non succede tutti i giorni, ed in tutti i posti.</p>
<p>Un Grazie a Marco Abis, che ogni anno rende possibile questa magia. Un grazie all’organizzazione ed agli amici dell’XPUG Bologna che sono stati ancora una volta spettacolari. Un grazie ai colleghi speaker pronti a “mettersi a nudo” senza troppi fronzoli. Un grazie a chi ha partecipato al mio intervento stile “Ballarò” condividendo idee e spunti interessanti. Un grazie al manipolo di eroi che ha rischiato l’asfissia per seguire il mini-workshop pomeridiano su Domain Driven Design.  Un grazie anche al Bettazzoni che mi ha ricordato cosa vuol dire essere Romagnolo.</p>
<p>È stata una bella giornata.</p>
<p>Grazie a tutti</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Empréstimo do Camisa 31]]></title>
<link>http://agoravaifc.wordpress.com/2009/11/18/emprestimo-do-camisa-31/</link>
<pubDate>Wed, 18 Nov 2009 21:23:28 +0000</pubDate>
<dc:creator>Torres</dc:creator>
<guid>http://agoravaifc.wordpress.com/2009/11/18/emprestimo-do-camisa-31/</guid>
<description><![CDATA[Hoje, depois de uma proposta vinda na segunda-feira, a diretoria do Agora Vai Futebol Clube empresto]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p style="text-align:justify;">Hoje, depois de uma proposta vinda na segunda-feira, a diretoria do <strong>Agora Vai Futebol Clube</strong> emprestou o camisa 31, DDD, ao recém fundado <em>Terceiro Boladão FC</em>, para participar de um campeonato local.</p>
<p style="text-align:justify;">
<div id="attachment_1171" class="wp-caption aligncenter" style="width: 410px"><a href="http://agoravaifc.wordpress.com/files/2009/11/terceiro-boladao.jpg"><img class="size-full wp-image-1171" title="terceiro-boladao" src="http://agoravaifc.wordpress.com/files/2009/11/terceiro-boladao.jpg" alt="" width="400" height="361" /></a><p class="wp-caption-text">Terceiro Boladão FC</p></div>
<p style="text-align:justify;">Como o time não vem nem ao menos treinando, a diretoria optou por fazer o empréstimo, até mesmo para manter a forma física do jogador. Perguntado a respeito, o técnico alemão disse que está orgulhoso de seu filhote e espera que ele consiga atingir uma boa performance nas partidas. E que tudo isso traga uma melhora significativa no desempenho do mesmo akee no AVFC.</p>
<p style="text-align:justify;">DDD já tirou foto com a nova camisa, e disse que está ansioso para voltar a jogar bola, atividade a qual não realiza há um bom tempo. A camisa atribuída ao jogador é, segundo a imprensa, a melhor camisa já criada na história do futebol mundial. Como uma imagem vale mais que 1000 palavras, terminaremos o post com a foto e com a torcida dos agoravaianos pelo nosso camisa 31. <em>&#8220;DDD, estamos contigo. Eh isso ae&#8221;</em>.</p>
<p style="text-align:justify;">
<div id="attachment_1170" class="wp-caption aligncenter" style="width: 410px"><a href="http://agoravaifc.wordpress.com/files/2009/11/ddd-on-loan.jpg"><img class="size-full wp-image-1170" title="ddd-on-loan" src="http://agoravaifc.wordpress.com/files/2009/11/ddd-on-loan.jpg" alt="" width="400" height="300" /></a><p class="wp-caption-text">DDD, com a camisa do Terceiro Boladão, número 99kg.</p></div>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[ANSELMO BERNAL, GANADOR DEL CONCURSO FOTOGRÁFICO DDD]]></title>
<link>http://canoista.com/2009/11/18/anselmo-bernal-ganador-del-concurso-fotografico-ddd/</link>
<pubDate>Wed, 18 Nov 2009 11:00:21 +0000</pubDate>
<dc:creator>oscanoa</dc:creator>
<guid>http://canoista.com/2009/11/18/anselmo-bernal-ganador-del-concurso-fotografico-ddd/</guid>
<description><![CDATA[Foto ganadora del concurso Anselmo Bernal ha sido el vencedor de la segunda edición del concurso fot]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><div id="attachment_2840" class="wp-caption aligncenter" style="width: 460px"><strong><a href="http://www.flickr.com/photos/selmin/"><strong> </strong></a><strong><a href="http://www.ilovecanoe.com"><img class="size-full wp-image-2840" title="Portada del número I de la revista" src="http://canoistasolidario.wordpress.com/files/2009/11/n1.png" alt="Portada del número I de la revista" width="450" height="450" /></a></strong></strong><p class="wp-caption-text">Foto ganadora del concurso</p></div>
<p><a href="http://www.flickr.com/photos/selmin/"><strong>Anselmo Bernal</strong></a> ha sido el vencedor de la segunda edición del concurso fotográfico sobre piragüismo organizado por la web de <strong><a href="http://www.danielduran.tk">Dani Durán</a></strong>.<!--more-->La foto ganadora fue precisamente la tomada desde la Remolina en la pasada edición del Sella que ha sido portada de nuestro primer número de la revista <strong><a href="http://www.ilovecanoe.com">I love canoe</a></strong>.</p>
<p>Enhorabuena a Anselmo por la foto y por todas las que hace y a Dani Durán por su promoción del piragüismo.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[hej]]></title>
<link>http://mamaa.wordpress.com/2009/11/16/hej/</link>
<pubDate>Mon, 16 Nov 2009 16:30:19 +0000</pubDate>
<dc:creator>Maousama Luling</dc:creator>
<guid>http://mamaa.wordpress.com/2009/11/16/hej/</guid>
<description><![CDATA[hej]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>hej</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Di ritorno da JAX Italia 2009]]></title>
<link>http://avanscoperta.wordpress.com/2009/11/16/di-ritorno-da-jax-italia-2009/</link>
<pubDate>Mon, 16 Nov 2009 09:53:22 +0000</pubDate>
<dc:creator>ziobrando</dc:creator>
<guid>http://avanscoperta.wordpress.com/2009/11/16/di-ritorno-da-jax-italia-2009/</guid>
<description><![CDATA[È stato un fine settimana piuttosto intenso: da giovedì a sabato sono stato impegnato a Milano alla ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>È stato un fine settimana piuttosto intenso: da giovedì a sabato sono stato impegnato a Milano alla prima edizione della JAX Italian Conference, e si è trattato di un esperienza assolutamente piacevole, soprattutto per l&#8217;atmosfera molto cordiale e per le interessanti discussione che abbiamo avuto modo di avere con gli altri speaker (italiani e stranieri) e con i partecipanti.</p>
<p>Vorrei quindi ringraziare Simone Longo, e tutto lo staff di Software &#38; Support Media organizzatori dell&#8217;evento e tutti i partecipanti, in particolare i colleghi che hanno partecipato al workshop Domain Driven Design di sabato rendendolo una discussione interessante e stimolante. È stata una faticaccia, ma assolutamente anche un piacere <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>&#160;</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Lolos à gogo #1 ]]></title>
<link>http://zebigbooster.wordpress.com/2009/11/11/lolos-a-gogo-1/</link>
<pubDate>Wed, 11 Nov 2009 16:46:39 +0000</pubDate>
<dc:creator>LittleBigMonster</dc:creator>
<guid>http://zebigbooster.wordpress.com/2009/11/11/lolos-a-gogo-1/</guid>
<description><![CDATA[D&#8217;habitude, je préviens quand je prépare des nouvelles rubriques. Là, par contre, je n&#8217;a]]></description>
<content:encoded><![CDATA[D&#8217;habitude, je préviens quand je prépare des nouvelles rubriques. Là, par contre, je n&#8217;a]]></content:encoded>
</item>
<item>
<title><![CDATA[DDD Without any ORM tool, is it possible !!]]></title>
<link>http://solveme.wordpress.com/2009/11/11/ddd-without-any-orm-tool-is-it-possible/</link>
<pubDate>Wed, 11 Nov 2009 07:19:00 +0000</pubDate>
<dc:creator>daringtakers</dc:creator>
<guid>http://solveme.wordpress.com/2009/11/11/ddd-without-any-orm-tool-is-it-possible/</guid>
<description><![CDATA[DDD Without any ORM tool, is it possible !! Look at the thread http://tech.groups.yahoo.com/group/do]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>DDD Without any ORM tool, is it possible !!  </p>
<p>Look at the thread <a href="http://tech.groups.yahoo.com/group/domaindrivendesign/message/16021">http://tech.groups.yahoo.com/group/domaindrivendesign/message/16021</a></p>
<p>If you have done DDD without any ORM, your comments are valuable.<br />
Please write your views.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Komunikasi antar Agreegate dengan Domain Event]]></title>
<link>http://mfathur.wordpress.com/2009/11/11/komunikasi-antar-agreegate-dengan-domain-event/</link>
<pubDate>Wed, 11 Nov 2009 06:01:45 +0000</pubDate>
<dc:creator>mfathur</dc:creator>
<guid>http://mfathur.wordpress.com/2009/11/11/komunikasi-antar-agreegate-dengan-domain-event/</guid>
<description><![CDATA[Post yang lalu, kita telah bersetuju untuk memutus hubungan erat antar aggregate, komunikasi dilakuk]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><a href="http://mfathur.wordpress.com/2009/11/09/satu-agreegate-root-per-assembly-atau-per-namespace/">Post yang lalu</a>, kita telah bersetuju untuk memutus hubungan erat antar aggregate, komunikasi dilakukan dengan pub/sub. Mekanismenya, kita menggunakan <a href="http://www.udidahan.com/2009/06/14/domain-events-salvation/">Domain Event</a>.</p>
<p>Menurut Udi, kunci dari Domain Event ada dalam kata &#8220;when&#8221;. Yang belum begitu jelas, siapa yang berhak meraise event? Agregate root, atau semua stakeholder agreegate?</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[David Laribee's Leading Lean/Agile Teams]]></title>
<link>http://skillsmatterblog.wordpress.com/2009/11/10/david-laribees-towards-a-new-architect-workshop/</link>
<pubDate>Tue, 10 Nov 2009 15:45:15 +0000</pubDate>
<dc:creator>Skills Matter</dc:creator>
<guid>http://skillsmatterblog.wordpress.com/2009/11/10/david-laribees-towards-a-new-architect-workshop/</guid>
<description><![CDATA[Following on from his successful speaker spots at Skills Matter&#8217;s Progressive .NET tutorials e]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><img class="aligncenter size-full wp-image-23" title="design-driven-design-architecture-lrg" src="http://skillsmatterblog.wordpress.com/files/2009/11/design-driven-design-architecture-lrg.gif" alt="design-driven-design-architecture-lrg" width="450" height="64" /></p>
<p>Following on from his successful speaker spots at Skills Matter&#8217;s Progressive .NET tutorials earlier this year, the talented Mr <a href="http://codebetter.com/blogs/david_laribee/">David Laribee</a> will be hosting a 2-day course at the new Skills Matter eXchange in December.</p>
<p>Over the course of two days we&#8217;ll engage in a diverse array of discussions, exercises, and summary talks aimed toward aspiring and existing technical leads, senior developers, coaches and architects. Participants will leave with actionable techniques and tools for leading their teams toward greater throughput and technical excellence.</p>
<p>In Mr Laribee&#8217;s own words &#8220;We need leaders that can get down and dirty with technology while mentoring and leading people while staying true to product vision. We need an embedded role in software teams like Toyota’s Chief Engineer: someone who brings skill and experience to bare in all areas of product development, product design, user experience, coaching, software craftsmanship, et. al. &#8220;</p>
<p>Places are filling up fast &#8212; so make sure you don&#8217;t miss out on yours: book before November 15 and pay only <strong>£550</strong>+VAT per delegate (RRP: £990).</p>
<p>For more information and to book visit the Skills Matter <a href="http://skillsmatter.com/course/design-architecture/towards-a-new-architect/js-432">site</a> and get your place.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Satu Agreegate Root Per Assembly atau Per Namespace?]]></title>
<link>http://mfathur.wordpress.com/2009/11/09/satu-agreegate-root-per-assembly-atau-per-namespace/</link>
<pubDate>Mon, 09 Nov 2009 13:17:00 +0000</pubDate>
<dc:creator>mfathur</dc:creator>
<guid>http://mfathur.wordpress.com/2009/11/09/satu-agreegate-root-per-assembly-atau-per-namespace/</guid>
<description><![CDATA[Welly lebih suka jika per assembly, dengan demikian agreegate benar-benar terisolir. Oetawan keberat]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Welly lebih suka jika per assembly, dengan demikian agreegate benar-benar terisolir. Oetawan keberatan, karena akan membengkakkan jumlah library. Tapi library bisa digabung dengan ILMerge.</p>
<p>Dalam DDD, Eric Evan mengijinkan adanya hubungan antara root dengan root atau entity dengan root, merujuk apa yang dilakukan Greg Young, aku dan Welly lebih suka untuk tidak ada reference sama sekali antar agreegate root. Hubungan antar agreegate diwakili oleh value object. Komunikasi antara agreegate dilakukan dengan messaging: pub/sub.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Bagaimana Seharusnya Kita Menyusun Kelas-Kelas dan Infrastruktur Serta Alat-alat Agar Sesuai dengan DDD di .Net?]]></title>
<link>http://mfathur.wordpress.com/2009/11/08/bagaimana-seharusnya-kita-menyusun-kelas-kelas-dan-infrastruktur-serta-alat-alat-agar-sesuai-dengan-ddd-di-net/</link>
<pubDate>Sun, 08 Nov 2009 05:58:08 +0000</pubDate>
<dc:creator>mfathur</dc:creator>
<guid>http://mfathur.wordpress.com/2009/11/08/bagaimana-seharusnya-kita-menyusun-kelas-kelas-dan-infrastruktur-serta-alat-alat-agar-sesuai-dengan-ddd-di-net/</guid>
<description><![CDATA[Ok. Mari kita diskusikan bagaimana seharusnya kita meletakkan kelas-kelas, perkakas, dan lain sebaga]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Ok. Mari kita diskusikan bagaimana seharusnya kita meletakkan kelas-kelas, perkakas, dan lain sebagainya agar memenuhi standart DDD dengan .Net.</p>
<p>Dalam salah satu <a href="http://dddsample.sourceforge.net/architecture.html">sample DDD</a>, orang membuat dalam Java, 1 paket 1 agreegate root yang berisi, entity, value object, domain event, dan interface dari repository, mungkin juga interface dari infrastruktur lainnya.</p>
<p>Lalu bagaimana dengan .net? Setujukah kalau kita buat setiap 1 agreegate root 1 namespace, yang berarti satu project. Isi dari project ini, interface (untuk tujuan mocking&#8211;agar mudah ditest?) terdiri dari interface infrastructur dan interface model, class (implementasi dari interface, yang harus didefinisikan sebagai internal), Factory (baik builder, abstrack, maupun method&#8211;lihat GOF).</p>
<p>Dengan demikian object-object tidak bisa dicreate dari luar, sehingga bisa diatur hanya lewat builder. Untuk menjaga agar object tidak bocor keluar, maka root tidak boleh mereturn apapun kecuali DTO. ? masih ada yang tertinggal?</p>
<p>Method harus eksplisit tidak boleh satu untuk semua message, consume misalnya. ?</p>
<p>&#160;</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Event Driven SOA with NServiceBus]]></title>
<link>http://blog.scottmfelder.com/2009/11/04/event-driven-soa-with-nservicebus/</link>
<pubDate>Wed, 04 Nov 2009 21:52:19 +0000</pubDate>
<dc:creator>Scott Felder</dc:creator>
<guid>http://blog.scottmfelder.com/2009/11/04/event-driven-soa-with-nservicebus/</guid>
<description><![CDATA[ After October’s Alt .Net demo of “Event-Driven SOA with NServiceBus” I decided to put together some]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><div class="mceTemp mceIEcenter">
<div class="mceTemp mceIEcenter" style="text-align:left;"> After October’s Alt .Net demo of “Event-Driven SOA with NServiceBus” I decided to put together some additional thoughts about NServiceBus with respect to where and how it fits or can fit within the enterprise, for those who still may have questions like “now what?”  How, not only does NServiceBus’ use apply to Service-Oriented Architecture (SOA) and Event-Driven Architecture (EDA), but also with Domain Driven Design (DDD).</div>
</div>
<p><strong></strong> </p>
<p><strong>Big Ball of Mud</strong></p>
<p>Let’s start with my original example business, Acme Enterprise.  Acme wishes to build an ecommerce system to sell its products to its customers.  The developers at Acme start out by building a web application that customers can come to for placing orders, employees in the pricing department can update product prices, and employees in the inventory management department can maintain product SKUs and product levels.  As time goes on the pricing department wants to add new functionality to the system to maintain promotional pricing on products, discount pricing on products, etc.  The inventory department wants to add new functionality to the system to provide auto-replenishment on products, warehouse location of products, etc.  As the application grows into one monolithic system it can quickly become unmanageable in its current form, or as some call it, BBOM – Big Ball of Mud.  More importantly, the different departments within Acme define the term “Product” differently.  The sales department defines a “Product” as an item ordered by a customer and added to a shopping cart with a <em>price</em> and <em>quantity ordered</em> information attached to it.  The pricing department defines the “product” in terms of not only unit price, but promotional pricing, and marketing campaign pricing that is valid for a particular time period. Meanwhile the folks in inventory management define a “Product” in terms of <em>Quantity on Hand</em>, <em>Warehouse Location</em>, and <em>Reorder Threshold Trigger</em>.  As the system grows, so does the complexity and the size of our BBOM.</p>
<div class="mceTemp mceIEcenter"><img class="aligncenter size-full wp-image-8" title="NSB-BBM" src="http://scottfelder.wordpress.com/files/2009/11/nsb-bbm.png" alt="NSB-BBM" width="385" height="282" /></div>
<p><strong> </strong></p>
<p><strong>Bounded Contexts</strong></p>
<p>This is where Domain Driven Design (DDD) can help with the design of our ecommerce system.  When we start to define the term “Product” with the people responsible for products in each of the departments within the company, we realize that they all care about this thing called a “Product” but they each talk about it in a different context.  This is where DDD introduces the idea of a Bounded Context.  Our system can be split into separate contexts each with its own explicit boundary.  So what we end up with in our system is a bunch of Bounded Contexts for each of the different contexts within the system: an inventory context, a pricing context, sales context, etc.  Each Bounded Context has its own model and ubiquitous language that defines the domain and entities like “Product” uniquely to its own definition.  The key phrase to our bounded context here is “explicit boundary”.  Each context provides a contract to the outside world to interact with and can be viewed as its own application within an application.  This can provide modularity to our overall system design.  One Bounded Context shares data with another Bounded Context via a Context Map.  A Context Map exposes a well defined contract interface that can be consumed.</p>
<p style="text-align:center;"><img class="size-full wp-image-11  aligncenter" title="NSB-DDD" src="http://scottfelder.wordpress.com/files/2009/11/nsb-ddd.png" alt="NSB-DDD" width="418" height="406" /></p>
<p><strong> </strong> </p>
<p><strong> </strong></p>
<p><strong>Bounded Context as a Service</strong></p>
<p>Now let’s take our DDD ecommerce system and apply SOA principles to it. Remember when I stated that a Bounded Context provides an explicit boundary?  One of the core tenets of SOA states that “Boundaries are explicit”.  I also stated that a Bounded Context can provide modularity within our system and that a context can be viewed as an application within an application.  Well another core tenet of SOA states that “Services are autonomous.” Hmm, so what else do bounded contexts and SOAs share in common?  A Bounded Context within our system communicates with another Bounded Context within our system via a context map that provides a contract interface to the outside world.  SOA; “Services share Schema and Contract, not Class”.  So when we compare the Bounded Context of our DDD and the Services of our SOA, there really isn’t a whole lot of difference between the two.  Maybe in an SOA we should call them “Bounded Services”?  SOA is about the separation of Bounded Contexts in our application into their own services so looser coupling can be achieved while providing a certain degree of service reuse within our enterprise.  Our context map or interface to the SOA service can be done via a web service, restful service, or WCF.  For example, in our DDD ecommerce application, if we wanted to replace the inventory context with a third party inventory management or ERP system like SAP, there may be a bit more work involved to decouple it from the old system and integrate the new SAP system.  With SOA, we have a lesser degree of coupling to deal with so integrating to the new inventory system will be easier.  Notice, I said “easier” not seamless.</p>
<p style="text-align:center;"> <img class="size-full wp-image-10  aligncenter" title="NSB-SOA" src="http://scottfelder.wordpress.com/files/2009/11/nsb-soa.png" alt="NSB-SOA" width="403" height="314" /></p>
<p><strong> </strong></p>
<p><strong>EDA with NServiceBus</strong></p>
<p>This brings me to Event-Driven Architecture (EDA), more specifically, EDA with NServiceBus.  As we’ve taken our initial BBOM ecommerce application and we introduced DDD principles to it and refactored our system, we began to decouple the system into different functional modules, or Bounded Context, within one application running on our web server.  Each department (inventory, pricing, sales), would access the same system to update their various domains of information.  As we moved to SOA, we took this one step farther by making these contexts autonomous services that can be distributed on different servers running within our enterprise, providing user access to a particular service to only the people in the department that need to update data within that service.  The problem with traditional SOA is it still gives us a certain level of coupling with our enterprise applications between services.  If the inventory service needs to inform the pricing service that a new SKU has been entered into the system, the inventory service must know that the pricing service exists within our enterprise.  Meaning, the inventory service must be programmed to make a service call to a service interface (web service, WCF, socket call, etc.) on the pricing service.  If we decide to use a different system in the future to do pricing, we need to update the inventory service to call the new service interfaces on the new pricing system.  This is where event messages and NServiceBus can help.  If we define a series of business events that describe important transactions within our enterprise, we can publish their event messages to a message bus.  Now instead of our services interacting directly and having to be aware of one another in the enterprise, each service only needs to know to publish event messages to the message bus, and only subscribe to event messages on the message bus that it cares about.  So in the case of our inventory service, and our pricing service, the inventory service can publish“New SKU” events and the pricing service and subscribe to “New SKU” events.  At no point does the inventory service need to know about the pricing service and conversely, the pricing service doesn’t need to know about the inventory service; now what “links” the two systems together are the “New SKU” events, and more importantly the data contained within.  In essence, the event messages and the service bus, in this case NServiceBus (but we could use others) become the “Context Map” defined back in our DDD application.  The event messages are our contracts and NServiceBus becomes our service transport layer to communicate between Bounded Contexts/Services with a higher level of decoupling between our services than we had with our traditional SOA.</p>
<p style="text-align:center;"><img class="aligncenter size-full wp-image-12" title="NSB-EDA" src="http://scottfelder.wordpress.com/files/2009/11/nsb-eda.png" alt="NSB-EDA" width="426" height="293" /> </p>
<p><strong> </strong></p>
<p><strong>In conclusion</strong></p>
<p>            NServiceBus provides an easy to use API to the framework to work with so we can create an event message driven architecture.  Publishing event messages via NServiceBus will allow for a much more loose coupling design between the different Bounded Contexts or Services running in our enterprise.  While applications or services will always have a higher degree of coupling between their application layers, (UI, Business Layer, DAL, etc.), Event-Driven Architecture with NServiceBus can provide for a much lesser degree of coupling between the explicit boundaries of the services.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Date Driven Development (DDD)]]></title>
<link>http://boycook.wordpress.com/2009/10/30/date-driven-development-ddd/</link>
<pubDate>Fri, 30 Oct 2009 15:52:52 +0000</pubDate>
<dc:creator>boycook</dc:creator>
<guid>http://boycook.wordpress.com/2009/10/30/date-driven-development-ddd/</guid>
<description><![CDATA[I tweeted this as a joke, but thought it deserved a brief post: A senior manager in the company arbi]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I tweeted this as a joke, but thought it deserved a brief post:<br />
A senior manager in the company arbitrarily pulls a date out of the air (normally the Friday just before an important golfing holiday) for when he needs a report. This means that a load of developers need to jump though hoops to write a system to produce the report, whilst having to continually deal with requirement changes and middle management customers that can’t actually make a decision about anything. When the system is delivered a week late, the senior manager is already playing golf and doesn’t care anymore, so all the developers are sacked.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Denise Milani joue du ukulélé ]]></title>
<link>http://zebigbooster.wordpress.com/2009/10/28/denise-milani-joue-du-ukulele/</link>
<pubDate>Wed, 28 Oct 2009 17:06:56 +0000</pubDate>
<dc:creator>LittleBigMonster</dc:creator>
<guid>http://zebigbooster.wordpress.com/2009/10/28/denise-milani-joue-du-ukulele/</guid>
<description><![CDATA[Mais, est-ce bien çà le plus important, tout compte fait ? Quatre autres photos ci-après. Au fait, D]]></description>
<content:encoded><![CDATA[Mais, est-ce bien çà le plus important, tout compte fait ? Quatre autres photos ci-après. Au fait, D]]></content:encoded>
</item>
<item>
<title><![CDATA[MUMBAI MIRROR ASKS: Why isnt Katz promoting De Dana Dan?!]]></title>
<link>http://fenilandbollywood.wordpress.com/2009/10/28/mumbai-mirror-asks-why-isnt-katz-promoting-de-dana-dan/</link>
<pubDate>Wed, 28 Oct 2009 11:58:43 +0000</pubDate>
<dc:creator>fenilseta</dc:creator>
<guid>http://fenilandbollywood.wordpress.com/2009/10/28/mumbai-mirror-asks-why-isnt-katz-promoting-de-dana-dan/</guid>
<description><![CDATA[While Katrina Kaif doesn&#8217;t seem interested in promoting De Dana Dan, she is going all out to p]]></description>
<content:encoded><![CDATA[While Katrina Kaif doesn&#8217;t seem interested in promoting De Dana Dan, she is going all out to p]]></content:encoded>
</item>
<item>
<title><![CDATA[Reposit&oacute;rios e Express&otilde;es Lambda]]></title>
<link>http://agvalente.wordpress.com/2009/10/27/repositrios-e-expresses-lambda/</link>
<pubDate>Tue, 27 Oct 2009 14:57:13 +0000</pubDate>
<dc:creator>Alexandre Valente</dc:creator>
<guid>http://agvalente.wordpress.com/2009/10/27/repositrios-e-expresses-lambda/</guid>
<description><![CDATA[Esta semana fizemos mais uma grande melhoria na nossa camada de domínio, incorporando expressões lam]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Esta semana fizemos mais uma grande melhoria na nossa camada de domínio, incorporando <a href="http://en.wikipedia.org/wiki/Lambda_expressions" target="_blank">expressões lambda</a> .Net nas nossas consultas e parâmetros de ordenação de repositórios. Retomando o <a href="http://agvalente.wordpress.com/2009/09/01/produtividade-camada-de-domnio/">post sobre a camada de domínio</a>, os <a href="http://en.wikipedia.org/wiki/Domain-driven_design" target="_blank">repositórios</a> são utilizados para tirar a dependência da aplicação dos detalhes de persistência de objetos e para ser uma representação abstrata de uma coleção de entidades de domínio.
<p>A idéia é que eles facilitem a busca de entidades específicas ou implementem métodos mais complexos para a execução de consultas. Como no nosso caso usamos o <a href="http://en.wikipedia.org/wiki/Nhibernate" target="_blank">NHibernate</a> para camada de persistência, nós temos duas opções de efetuar estas consultas, os Criterias (DetachedCriteria ou expressões ICriterion simples) ou o <a href="http://en.wikipedia.org/wiki/HQL" target="_blank">HQL</a>, que é uma linguagem de consulta parecida com SQL só que composta pelas entidades de domínio.
<p>Consultas HQL são baseadas em strings (ver exemplo abaixo do nosso sistema de ServiceDesk), o que é extremamente flexível porém não suporta intellisense nem é compilada (o que pode facilitar erros no caso de refactors). Mas, para o HQL não temos muita opção, a alternativa que seria usar o NH Linq ainda não é viável (pelo que eu tenho visto, ainda não suporta muitas coisas).</p>
<div style="width:500px;margin-bottom:10px;background:black;">
<pre></pre>
<p><a href="http://11011.net/software/vspaste"></a>
<pre class="code"><span style="background:black;color:#e07a00;">public int </span><span style="background:black;color:#fddf39;">TotalInbox</span><span style="background:black;color:white;">(</span><span style="background:black;color:#9fabff;">User </span><span style="background:black;color:#fddf39;">user</span><span style="background:black;color:white;">) {
   </span><span style="background:black;color:#e07a00;">const string </span><span style="background:black;color:#fddf39;">hql </span><span style="background:black;color:silver;">=
       </span><span style="background:black;color:#a31515;">@"select count(*) from Incident i inner join i.Allocation a</span></pre>
<pre class="code"><span style="background:black;color:#a31515;">         inner join a.SupportGroup s inner join s.Users u </span></pre>
<pre class="code"><span style="background:black;color:#a31515;">         inner join i.Company c
         where i.ClosedOn is null and a.SupportUser is null
         and i.State != isnull(c.WaitingUserConfirmationState,-1) </span></pre>
<pre class="code"><span style="background:black;color:#a31515;">         and i.State != isnull(c.WaitingUserInformationState, -1) </span></pre>
<pre class="code"><span style="background:black;color:#a31515;">         and u = ?"</span><span style="background:black;color:white;">;
   </span><span style="background:black;color:#e07a00;">return </span><span style="background:black;color:white;">(</span><span style="background:black;color:#e07a00;">int</span><span style="background:black;color:white;">) </span><span style="background:black;color:#fddf39;">ExecuteScalar</span><span style="background:black;color:silver;">&#60;</span><span style="background:black;color:#e07a00;">long</span><span style="background:black;color:silver;">&#62;</span><span style="background:black;color:white;">(</span><span style="background:black;color:#fddf39;">hql</span><span style="background:black;color:white;">, </span><span style="background:black;color:#fddf39;">user</span><span style="background:black;color:white;">);
}</span></pre>
</div>
<p>O uso de Criterias é mais simples e é indicado para consultas com restrições diretas na entidade base (ou nas que possuem relacionamento direto com a entidade base). Porém, nos criterias é necessário especificar o nome da propriedade como string. Novamente, sem intellisense e sujeito a problemas de refactor. Como o uso de Criterias é muito mais freqüente, nós automatizamos na nossa camada de domínio a geração de uma classe estática com todas as propriedades das entidades de domínio (usando arquivos .tt de um <a href="http://en.wikipedia.org/wiki/Text_Template_Transformation_Toolkit" target="_blank">editor T4</a>). Desta forma, temos intellisense e no caso de refactor que cause alguma quebra, teremos um erro de compilação (já que as classes são sempre regeradas). E, conforme falado no post da camada de domínio, construímos ainda uma <a href="http://en.wikipedia.org/wiki/Fluent_interface" target="_blank">fluent interface</a> para facilitar a escrita. O exemplo abaixo mostra isto em funcionamento. </p>
<div style="width:500px;margin-bottom:10px;background:black;">
<pre class="code"><span style="background:black;color:#e07a00;">public long </span><span style="background:black;color:#fddf39;">TotalClosed</span><span style="background:black;color:white;">(</span><span style="background:black;color:#9fabff;">User </span><span style="background:black;color:#fddf39;">user</span><span style="background:black;color:white;">) {
    </span><span style="background:black;color:#e07a00;">return</span><span style="background:black;color:white;"> </span><span style="background:black;color:#fddf39;">Query</span><span style="background:black;color:silver;">.</span><span style="background:black;color:#fddf39;">Where</span><span style="background:black;color:white;">(</span><span style="background:black;color:#9fabff;">Restrictions</span><span style="background:black;color:silver;">.</span><span style="background:black;color:#fddf39;">Eq</span><span style="background:black;color:white;">(</span><span style="background:black;color:#9fabff;">PN</span><span style="background:black;color:silver;">.</span><span style="background:black;color:#fddf39;">User</span><span style="background:black;color:white;">, </span><span style="background:black;color:#fddf39;">user</span><span style="background:black;color:white;">))</span></pre>
<pre class="code"><span style="background:black;color:white;">           </span><span style="background:black;color:silver;">.</span><span style="background:black;color:#fddf39;">And</span><span style="background:black;color:white;">(</span><span style="background:black;color:#9fabff;">Restrictions</span><span style="background:black;color:silver;">.</span><span style="background:black;color:#fddf39;">IsNotNull</span><span style="background:black;color:white;">(</span><span style="background:black;color:#9fabff;">PN</span><span style="background:black;color:silver;">.</span><span style="background:black;color:#fddf39;">ClosedOn</span><span style="background:black;color:white;">))</span><span style="background:black;color:silver;">.</span><span style="background:black;color:#fddf39;">Count</span><span style="background:black;color:white;">();
}</span></pre>
</div>
<p>Esta solução estava bastante adequada até aparecer a alternativa de usarmos expressões lambda ao invés de gerar as classes estáticas. Existem algumas iniciativas já fazendo isto, como o projeto <a href="http://code.google.com/p/nhlambdaextensions/" target="_blank">NHLambdaExtensions</a>. Neste caso específico, porém, eles estão abordando isto como uma biblioteca à parte para a geração de Criterias do NH e não como algo integrado aos repositórios.</p>
<p>Felizmente, na nossa camada de domíno, os repositórios já são tipados para a entidade de domínio que eles representam. Desta foram, fica simples gerar as expressões. O exemplo abaixo mostra a mesma rotina acima, agora usando expressões lamdas.</p>
<div style="width:500px;margin-bottom:10px;background:black;">
<pre class="code"><span style="background:black;color:#e07a00;">public long </span><span style="background:black;color:#fddf39;">TotalClosed</span><span style="background:black;color:white;">(</span><span style="background:black;color:#9fabff;">User </span><span style="background:black;color:#fddf39;">user</span><span style="background:black;color:white;">) {
    </span><span style="background:black;color:#e07a00;">return </span></pre>
<pre class="code"><span style="background:black;color:#e07a00;">      </span><span style="background:black;color:#fddf39;">Query</span><span style="background:black;color:silver;">.</span><span style="background:black;color:#fddf39;">Where</span><span style="background:black;color:white;">(</span><span style="background:black;color:#fddf39;">i </span><span style="background:black;color:silver;">=&#62; </span><span style="background:black;color:#fddf39;">i</span><span style="background:black;color:silver;">.</span><span style="background:black;color:#fddf39;">User </span><span style="background:black;color:silver;">== </span><span style="background:black;color:#fddf39;">user</span><span style="background:black;color:white;"> &#38;&#38; </span><span style="background:black;color:#fddf39;">i</span><span style="background:black;color:silver;">.</span><span style="background:black;color:#fddf39;">ClosedOn </span><span style="background:black;color:silver;">!= </span><span style="background:black;color:#e07a00;">null</span><span style="background:black;color:white;">)</span><span style="background:black;color:silver;">.</span><span style="background:black;color:#fddf39;">Count</span><span style="background:black;color:white;">();
}</span></pre>
</div>
<p>Como pode ser visto, bem mais legível e intuitivo. E sem a necessidade de se usar classes estáticas de apoio! Ainda temos algum trabalho a ser feito, pois não é simples traduzir todos os tipos de lambda para restrições válidas. Mas para os casos mais simples como o acima, está já 100% funcionando.</p>
<p>Outro ponto interessante é que as funções que aceitam lambda podem ser expostos para camadas superiores de domínio, já que usar uma expressão lambda não causa dependência para a camada de persistência. Isto diminui de maneira significativa o próprio tamanho da implementação dos repositórios.</p>
<p>Finalmente, a utilização deste tipo de solução acaba sendo algo tão flexível que estamos passando a adotar em vários outros cenários. Na definição de classes de ordenação para consultas, na identificação de campos usados como atributos em formulários e controllers e assim por diante. Realmente algo muito simples que está aí desde o lançamento da versão 3.5 do .Net mas que demorou para&#160; a “ficha cair” achar uma maneira legal de aplicar na nossa infraestrutura.</p>
<p>Quem quiser saber algum detalhe mais técnico da implementação basta me mandar um <a href="mailto:alexandre.g.valente@gmail.com">email</a>. Até a próxima.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Hallo]]></title>
<link>http://tstaccount.wordpress.com/2009/10/25/hallo/</link>
<pubDate>Sun, 25 Oct 2009 17:44:49 +0000</pubDate>
<dc:creator>tstaccount</dc:creator>
<guid>http://tstaccount.wordpress.com/2009/10/25/hallo/</guid>
<description><![CDATA[Tolle Sachen mit dem Weblog machen&#8230;&#8230;.]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Tolle Sachen mit dem Weblog machen&#8230;&#8230;.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Class]]></title>
<link>http://manasvipraveen.wordpress.com/2009/10/24/class/</link>
<pubDate>Sat, 24 Oct 2009 17:18:43 +0000</pubDate>
<dc:creator>manasvipraveen</dc:creator>
<guid>http://manasvipraveen.wordpress.com/2009/10/24/class/</guid>
<description><![CDATA[Some class members will travel to faraway places in the United States and even Europe while others w]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Some class members will travel to faraway places in the United States and even Europe while others will spend most of their time closer to home, doing fun things with family members.</p>
<p>&#8220;I&#8217;m going to summer camp in the mountains,&#8221; writes Amber Smith. &#8220;My sister and brother are going, too. We&#8217;re going to sleep in log cabins like Abraham Lincoln.&#8221;</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Diners, Drive-ins, and Dives: Portland and Seattle, part 2]]></title>
<link>http://acrazyrandomhappenstance.wordpress.com/2009/10/21/diners-drive-ins-and-dives-portland-and-seattle-part-2/</link>
<pubDate>Wed, 21 Oct 2009 21:27:38 +0000</pubDate>
<dc:creator>acrazyrandomhappenstance</dc:creator>
<guid>http://acrazyrandomhappenstance.wordpress.com/2009/10/21/diners-drive-ins-and-dives-portland-and-seattle-part-2/</guid>
<description><![CDATA[Looking for part 1? Click here. Two Saturdays ago, M and I went down to Portland for our own Diners,]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p style="text-align:left;">Looking for part 1? Click <a href="http://acrazyrandomhappenstance.wordpress.com/2009/10/12/diners-drive-ins-and-dives-seattle-and-portland-part-1/">here</a>.</p>
<p style="text-align:left;">Two Saturdays ago, M and I went down to Portland for our own Diners, Drive-Ins, and Dives road trip.  By noon on Saturday we had eaten breakfast at 2 different places: <a href="http://www.pinestatebiscuits.com/index.html">Pine State Biscuits</a> and <a href="http://www.arletalibrary.com/">Arleta Library Bakery Cafe</a>. With still most of the day ahead of us, we headed to downtown Portland where we checked out the PSU Farmer&#8217;s Market and the Saturday market.  As this is more about DDD than farms and markets, I&#8217;ll stick to writing about where we ate and save all that other stuff for another day. Yes?</p>
<p style="text-align:left;">Yes!</p>
<p style="text-align:left;">Ok, so after good times in Downtown Portland, we headed to <a href="https://www.ottossausage.com/">Otto&#8217;s Sausage Kitchen and Meat Market</a> on SE Woodstock for delicious hot dogs.</p>
<p style="text-align:left;"><img class="alignleft size-full wp-image-546" src="http://acrazyrandomhappenstance.wordpress.com/files/2009/10/112-copy1.jpg" alt="" width="299" height="442" /></p>
<p style="text-align:left;">Tired from a long day and not really hungry (with having eaten 2 breakfasts, how could we be?), we decided to split a dog as we didn&#8217;t really want to leave Portland without trying this place out. And??  And we were both impressed by the texture and flavour of what we got.  Freshly grilled over charcoal just outside the shop, our hot dog was dense, beefy, and flavourful.  You know when hotdog companies advertise that their dogs are made of 100% beef with no filler?  Well, they&#8217;re lying because the hotdog we had at Otto&#8217;s tasted like what a hot dog made of 100% beef with no filler SHOULD taste like.   In addition to tasty dogs, Otto&#8217;s is a full-on deli and meat market with a great selection of cut meats, deli items, and a sandwich counter.  Looking for a drink?  They also have an array of wines and beers and refreshing colas. M and I wanted to get some meat and dogs to take home to Vancouver but with 6 hours of driving, one more stop left, and no refrigeration, we decided against it.</p>
<p style="text-align:left;"><a href="http://www.flickr.com/photos/crumbs/2775758158/"><img class="aligncenter size-full wp-image-559" title="http://www.flickr.com/photos/crumbs/2775758158/" src="http://acrazyrandomhappenstance.wordpress.com/files/2009/10/ottos-2.jpg" alt="http://www.flickr.com/photos/crumbs/2775758158/" width="500" height="293" /></a></p>
<p style="text-align:left;">And with that, we headed out of Portland and drove towards Seattle for the last stop of our food tour: <a href="http://www.slimslastchance.com/">Slim&#8217;s Last Chance Chili Shack.</a></p>
<p style="text-align:left;"><img class="alignleft size-full wp-image-552" src="http://acrazyrandomhappenstance.wordpress.com/files/2009/10/1117.jpg" alt="" width="299" height="468" /></p>
<p style="text-align:left;">Located in the Georgetown District in what looked to us like an industrial area, Slim&#8217;s Last Chance Chili Shack is a restaurant/bar/music venue/hangout.  M and I arrived at around 8:30pm excited to try some chili.  As soon as we entered, we noticed that there was going to be a show that night and that we had to pay cover.  Not really wanting to pay cover just to eat chili, we contemplated going home empty stomached.  Fortunately, the guy at the door, a man with a nice, long, not quite ZZ Top-length beard, let us in without having to pay for cover (probably because he saw the look of disappointment in our faces, ha!).  We sat at the bar, ordered our chili and had a good look at the place.  Decorated with Mexican tin art, pistols, and a colourful stage, Slim&#8217;s is a pretty cool place that we wished we had more time to enjoy.</p>
<p style="text-align:left;">M ordered the <strong>Texas Red</strong> over mac and cheese while I ordered the <strong>Chili Verde</strong> plain. This was the first time we&#8217;ve had beanless chili and it was very good, unlike any other chili we&#8217;ve ever tried (not that we&#8217;ve tried a lot).  The Texas Red was meaty with a spicy-tangy kick while the Chili Verde had very tender meat and absolutely satisfying.  Both dishes were so good that M made his own beanless chili over mac and cheese days later.</p>
<p style="text-align:left;">And that&#8217;s it! After our chili dinner, we drove back home to Vancouver arriving at around 1am Sunday morning, exactly 24hrs from the time we left the night before.</p>
<p style="text-align:left;">Interested in reading Diners, Drive-ins, and Dives: Portland and Seattle, part 1? Click <a href="http://acrazyrandomhappenstance.wordpress.com/2009/10/12/diners-drive-ins-and-dives-seattle-and-portland-part-1/">here</a>!</p>
<p style="text-align:left;">
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Behavior-Driven Development (BDD)]]></title>
<link>http://alanmacgowan.wordpress.com/2009/10/16/behavior-driven-development-bdd/</link>
<pubDate>Fri, 16 Oct 2009 03:31:35 +0000</pubDate>
<dc:creator>alanmacgowan</dc:creator>
<guid>http://alanmacgowan.wordpress.com/2009/10/16/behavior-driven-development-bdd/</guid>
<description><![CDATA[Behavior-Driven Development (BDD) Behavior Driven Development (BDD) es una técnica de desarrollo ági]]></description>
<content:encoded><![CDATA[Behavior-Driven Development (BDD) Behavior Driven Development (BDD) es una técnica de desarrollo ági]]></content:encoded>
</item>

</channel>
</rss>
