<?xml version="1.0" encoding="UTF-8"?>
<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/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>

<channel>
	<title>Cyrille Martraire</title>
	<atom:link href="http://cyrille.martraire.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://cyrille.martraire.com</link>
	<description></description>
	<pubDate>Tue, 07 Sep 2010 16:11:33 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Patterns for using custom annotations</title>
		<link>http://cyrille.martraire.com/2010/07/patterns-for-using-annotations/</link>
		<comments>http://cyrille.martraire.com/2010/07/patterns-for-using-annotations/#comments</comments>
		<pubDate>Mon, 12 Jul 2010 15:39:13 +0000</pubDate>
		<dc:creator>cyrille</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[Patterns]]></category>

		<category><![CDATA[Programming]]></category>

		<category><![CDATA[annotation]]></category>

		<category><![CDATA[configuration]]></category>

		<category><![CDATA[convention]]></category>

		<category><![CDATA[default]]></category>

		<category><![CDATA[dependencies]]></category>

		<category><![CDATA[design]]></category>

		<category><![CDATA[pattern]]></category>

		<category><![CDATA[syntax]]></category>

		<category><![CDATA[tool]]></category>

		<category><![CDATA[trick]]></category>

		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://cyrille.martraire.com/?p=2668</guid>
		<description><![CDATA[If you happen to create your own annotations, for instance to use with Java 6 Pluggable Annotation Processors, here are some patterns that I collected over time. Nothing new, nothing fancy, just putting everything into one place, with some proposed names.]]></description>
			<content:encoded><![CDATA[<p>If you happen to create your own annotations, for instance to use with Java 6 Pluggable Annotation Processors, here are some patterns that I collected over time. Nothing new, nothing fancy, just putting everything into one place, with some proposed names.</p>
<p style="text-align: center;"><a href="http://cyrille.martraire.com/wp-content/uploads/2010/07/annotation.jpg"><img class="aligncenter size-full wp-image-2702" title="annotation" src="http://cyrille.martraire.com/wp-content/uploads/2010/07/annotation.jpg" alt="annotation" width="448" height="336" /></a></p>
<h1>Local-name annotation</h1>
<p>Have your tools accept any annotation as long as its single name  (without the fully-qualified prefix) is the expected one. For example <em>com.acme.NotNull</em> and <em>net.companyname.NotNull</em> would be considered the same. This enables to use your own annotations rather than the one packaged with the tools, in  order not to depend on them.</p>
<p>Example in the <a href="http://code.google.com/p/google-guice/wiki/UseNullable" target="_blank">Guice documentation</a>:</p>
<blockquote><p>Guice recognizes any <tt>@Nullable</tt> annotation, like <a rel="nofollow" href="http://findbugs.sourceforge.net/api/edu/umd/cs/findbugs/annotations/Nullable.html">edu.umd.cs.findbugs.annotations.Nullable</a> or <a rel="nofollow" href="http://code.google.com/p/jsr-305/source/browse/trunk/ri/src/main/java/javax/annotation/Nullable.java?r=24">javax.annotation.Nullable</a>.</p></blockquote>
<h1>Composed annotations</h1>
<p>Annotations can have annotations as values. This allows for some  complex and tree-like configurations, such as mappings from one format  to another (from/to XML, JSon, RDBM).</p>
<p>Here is a rather simple example from the <a href="http://docs.jboss.org/hibernate/stable/annotations/reference/en/html_single/" target="_blank">Hibernate annotations</a> documentation:</p>
<blockquote>
<pre class="JAVA"><a id="d0e1281"><span class="java_plain">@</span><span class="java_type">AssociationOverride</span><span class="java_separator">(</span><span class="java_plain"> </span>
<span class="java_plain">   name</span><span class="java_operator">=</span><span class="java_literal">"propulsion"</span><span class="java_separator">,</span><span class="java_plain"> </span>
<span class="java_plain">   joinColumns </span><span class="java_operator">=</span><span class="java_plain"> @</span><span class="java_type">JoinColumn</span><span class="java_separator">(</span><span class="java_plain">name</span><span class="java_operator">=</span><span class="java_literal">"fld_propulsion_fk"</span><span class="java_separator">)</span><span class="java_plain"> </span>
<span class="java_separator">)</span></a></pre>
</blockquote>
<h1>Multiplicity Wrapper</h1>
<p>Java does not allow to use several times the same annotation on a given target.</p>
<p>To workaround that limitation, you can create a special annotation that expects a collection of values of the desired annotation type. For example, you&#8217;d like to apply several times the annotation <em>@Advantage</em>, so you create the Multiplicity Wrapper annotation: <em>@Advantages (advantages = {@Advantage})</em>.</p>
<p>Typically the multiplicity wrapper is named after the plural form of its enclosed elements.</p>
<p>Example in <a href="http://docs.jboss.org/hibernate/stable/annotations/reference/en/html_single/" target="_blank">Hibernate annotations</a> documentation:</p>
<blockquote>
<pre class="JAVA"><a id="d0e714"><span class="java_plain">@</span><span class="java_type">AttributeOverrides</span><span class="java_separator">(</span><span class="java_plain"> </span><span class="java_separator">{</span>
<span class="java_plain">   @</span><span class="java_type">AttributeOverride</span><span class="java_separator">(</span><span class="java_plain">name</span><span class="java_operator">=</span><span class="java_literal">"iso2"</span><span class="java_separator">,</span><span class="java_plain"> column </span><span class="java_operator">=</span><span class="java_plain"> @</span><span class="java_type">Column</span><span class="java_separator">(</span><span class="java_plain">name</span><span class="java_operator">=</span><span class="java_literal">"bornIso2"</span><span class="java_separator">)</span><span class="java_plain"> </span><span class="java_separator">),</span>
<span class="java_plain">   @</span><span class="java_type">AttributeOverride</span><span class="java_separator">(</span><span class="java_plain">name</span><span class="java_operator">=</span><span class="java_literal">"name"</span><span class="java_separator">,</span><span class="java_plain"> column </span><span class="java_operator">=</span><span class="java_plain"> @</span><span class="java_type">Column</span><span class="java_separator">(</span><span class="java_plain">name</span><span class="java_operator">=</span><span class="java_literal">"bornCountryName"</span><span class="java_separator">)</span><span class="java_plain"> </span><span class="java_separator">)</span>
<span class="java_separator">}</span><span class="java_plain"> </span><span class="java_separator">)
</span></a></pre>
</blockquote>
<p><a href="http://cyrille.martraire.com/wp-content/uploads/2010/07/annotationbis.jpg"><img class="aligncenter size-full wp-image-2703" title="annotationbis" src="http://cyrille.martraire.com/wp-content/uploads/2010/07/annotationbis.jpg" alt="annotationbis" width="448" height="336" /></a></p>
<h1>Meta-inheritance</h1>
<p>It is not possible in Java for annotations to derive from each other. To workaround that, the idea is simply to annotate your new annotation with the &#8220;super&#8221; annotation, which becomes a meta annotation.</p>
<p>Whenever you use your own annotation with a meta-annotation, the tools will actually consider it as if it was the meta-annotation.</p>
<p>This kind of meta-inheritance helps centralize the coupling to the external annotation in one place, while making the semantics of your own annotation more precise and meaningful.</p>
<p>Example in Spring annotations, with the annotation <em>@Component</em>, but also works with annotation <em>@Qualifier</em>:</p>
<blockquote><p>Create your own custom stereotype annotation that is itself annotated with @Component:</p>
<pre><strong><span style="color: #ff0000;">@Component</span></strong>
public @interface MyComponent {
String value() default "";
}</pre>
<pre>@MyComponent
public class MyClass...</pre>
</blockquote>
<p>Another example in Guice, with the <a href="http://code.google.com/p/google-guice/wiki/BindingAnnotations" target="_blank">Binding Annotation</a>:</p>
<blockquote>
<pre class="prettyprint"><span class="lit">@BindingAnnotation</span><span class="pln">
</span><span class="lit">@Target</span><span class="pun">({</span><span class="pln"> FIELD</span><span class="pun">,</span><span class="pln"> PARAMETER</span><span class="pun">,</span><span class="pln"> METHOD </span><span class="pun">})</span><span class="pln">
</span><span class="lit">@Retention</span><span class="pun">(</span><span class="pln">RUNTIME</span><span class="pun">)</span><span class="pln">
</span><span class="kwd">public</span><span class="pln"> </span><span class="lit">@interface</span><span class="pln"> </span><strong><span style="color: #ff0000;"><span class="typ">PayPal</span></span></strong><span class="pln"> </span><span class="pun">{}

// Then use it
</span><span class="kwd">public</span><span class="pln"> </span><span class="kwd">class</span><span class="pln"> </span><span class="typ">RealBillingService</span><span class="pln"> </span><span class="kwd">implements</span><span class="pln"> </span><span class="typ">BillingService</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
  </span><span class="lit">@Inject</span><span class="pln">
  </span><span class="kwd">public</span><span class="pln"> </span><span class="typ">RealBillingService</span><span class="pun">(</span><strong><span style="color: #ff0000;"><span class="lit">@PayPal</span></span></strong><span class="pln"> </span><span class="typ">CreditCardProcessor</span><span class="pln"> processor</span><span class="pun">,</span><span class="pln">
      </span><span class="typ">TransactionLog</span><span class="pln"> transactionLog</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
    </span><span class="pun">...</span><span class="pln">
  </span><span class="pun">}
</span></pre>
</blockquote>
<h1>Refactoring-proof values</h1>
<p>Prefer values that are robust to refactorings rather than String litterals. <em>MyClass.class</em> is better than &#8220;com.acme.MyClass&#8221;, and enums are also encouraged.</p>
<p>Example in <a href="http://docs.jboss.org/hibernate/stable/annotations/reference/en/html_single/" target="_blank">Hibernate annotations</a> documentation:</p>
<blockquote>
<pre class="JAVA"><a id="d0e1508"><span class="java_plain">@</span><span class="java_type">ManyToOne</span><span class="java_separator">(</span><span class="java_plain"> cascade </span><span class="java_operator">=</span><span class="java_plain"> </span><span class="java_separator">{</span><span class="java_type">CascadeType</span><span class="java_separator">.</span><span class="java_plain">PERSIST</span><span class="java_separator">,</span><span class="java_plain"> </span><span class="java_type">CascadeType</span><span class="java_separator">.</span><span class="java_plain">MERGE</span><span class="java_separator">},</span><span class="java_plain"> targetEntity</span><span class="java_operator">=</span><span class="java_type">CompanyImpl</span><span class="java_separator">.</span><span class="java_keyword">class</span><span class="java_plain"> </span><span class="java_separator">)</span></a><a id="d0e1508"></a></pre>
</blockquote>
<p>And another example in the <a href="http://code.google.com/p/google-guice/wiki/UseNullable" target="_blank">Guice documentation</a>:</p>
<blockquote>
<pre class="prettyprint"><span class="lit">@ImplementedBy</span><span class="pun">(</span><span class="typ">PayPalCreditCardProcessor</span><span class="pun">.</span><span class="kwd">class</span><span class="pun">)</span><span class="pln">

</span></pre>
</blockquote>
<h1>Configuration Precedence rule</h1>
<p><strong>Convention over Configuration</strong> and <strong>Sensible Defaults</strong> are two existing patterns that make a lot of sense with respect to using annotations as part of a configuration strategy. Having no need to annotate is way better than having to annotate for little value.</p>
<p>Annotations are by nature embedded in the code, hence they are not well-suited for every case of configuration, in particular when it comes to deployment-specific configuration. The solution is of course to mix annotations with other mechanisms and use each of them where they are more appropriate.</p>
<p>The following approach, based on precedence rule, and where each mechanism overrides the previous one, appears to work well:</p>
<p style="text-align: center;"><strong>Default value &lt; Annotation &lt; XML &lt; programmatic configuration </strong></p>
<p>For example, the default values could be suited for unit testing, while the annotation define all the stable configuration, leaving the other options to  configure for deployments at the various stages, like production or QA environments.</p>
<p>This principle is common (Spring, Java 6 EE among others), for example in JPA:</p>
<blockquote><p><a id="entity-mapping-entity">The concept of configuration by exception  is central to the JPA         specification.</a></p></blockquote>
<h1>Conclusion</h1>
<p>This post is mostly a notepad of various patterns on how to use annotations, for instance when creating tools that process annotations, such as the Annotation Processing Tools in Java 5 and the Pluggable Annotations Processors in Java 6.</p>
<p>Don&#8217;t hesitate to contribute better patterns names, additional patterns and other examples of use.</p>
<p>EDIT: <a href="http://cyrille.martraire.com/2009/12/principles-for-using-annotations/">A related previous post</a>, with a focus on how annotations can lead to coupling hence dependencies.</p>
<address>Pictures Creative Commons from Flicker, by ninaksimon and Iwan Gabovitch.<br />
</address>
<p class="addtoany_share_save_container">
    <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?sitename=Cyrille%20Martraire&amp;siteurl=http%3A%2F%2Fcyrille.martraire.com%2F&amp;linkname=Patterns%20for%20using%20custom%20annotations&amp;linkurl=http%3A%2F%2Fcyrille.martraire.com%2F2010%2F07%2Fpatterns-for-using-annotations%2F"><img src="http://cyrille.martraire.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Save/Bookmark"/></a>

	</p>]]></content:encoded>
			<wfw:commentRss>http://cyrille.martraire.com/2010/07/patterns-for-using-annotations/feed/</wfw:commentRss>
		</item>
		<item>
		<title>What next language will you choose?</title>
		<link>http://cyrille.martraire.com/2010/06/what-next-language-will-you-choose/</link>
		<comments>http://cyrille.martraire.com/2010/06/what-next-language-will-you-choose/#comments</comments>
		<pubDate>Mon, 28 Jun 2010 13:53:24 +0000</pubDate>
		<dc:creator>cyrille</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<category><![CDATA[.net]]></category>

		<category><![CDATA[clojure]]></category>

		<category><![CDATA[F#]]></category>

		<category><![CDATA[functional]]></category>

		<category><![CDATA[groovy]]></category>

		<category><![CDATA[java]]></category>

		<category><![CDATA[language]]></category>

		<category><![CDATA[oo]]></category>

		<category><![CDATA[platform]]></category>

		<category><![CDATA[scala]]></category>

		<category><![CDATA[syntax]]></category>

		<category><![CDATA[trend]]></category>

		<guid isPermaLink="false">http://cyrille.martraire.com/?p=2599</guid>
		<description><![CDATA[Now that enterprises have chosen stable platforms (JVM and .Net), on top of which we can choose a syntax out of many available, which language will you pick up as your next favourite?
New languages to have a look at (my own selection)
Based on what I read everyday in various blogs, I arbitrarily reduced the list [...]]]></description>
			<content:encoded><![CDATA[<p>Now that enterprises have chosen stable platforms (JVM and .Net), on top of which we can choose a syntax out of many available, which language will you pick up as your next favourite?</p>
<h1>New languages to have a look at (my own selection)</h1>
<p>Based on what I read everyday in various blogs, I arbitrarily reduced the list of candidates to just a few language that I believe are rising and promising:</p>
<ul>
<li>Scala</li>
<li>F#</li>
<li>Clojure</li>
<li>Ruby</li>
<li>Groovy</li>
</ul>
<p>Of course each language has its own advantages, and we should definitely take a look at several of them, not just one. But the popularity of the languages is also important to have a chance of using them in your day work.</p>
<h1>Growth rates stats</h1>
<p>In order to get some facts about the trends of these new programming languages in the real world, Google trends is your friend. Here is the graph of rate of growth (NOT absolute numbers), worldwide:</p>
<p><script src="http://www.gmodules.com/ig/ifr?url=http%3A%2F%2Fwww.google.com%2Fig%2Fmodules%2Fgoogle_insightsforsearch_interestovertime_searchterms.xml&amp;up__property=empty&amp;up__search_terms=scala%7CF%23%7CClojure%7CRuby%7CGroovy&amp;up__location=empty&amp;up__category=31&amp;up__time_range=empty&amp;up__compare_to_category=true&amp;synd=open&amp;w=320&amp;h=350&amp;lang=en&amp;title=Google+Search Trends&amp;border=%23ffffff%7C3px%2C1px+solid+%23999999&amp;output=js" type="text/javascript"></script></p>
<p>I&#8217;m impressed at how Clojure is taking off so brutally&#8230; In absolute terms, Ruby comes first, Groovy second.</p>
<p>So that was for the search queries on Google. What about the job posts? Again these are growth rates, not absolute numbers, and with a focus on the US.</p>
<div style="width: 540px;"><a title="Scala, F#, clojure, Ruby, Groovy Job Trends" href="http://www.indeed.com/jobtrends?q=Scala%2C+F%23%2C+clojure%2C+Ruby%2C+Groovy&amp;relative=1&amp;relative=1"><br />
<img src="http://www.indeed.com/trendgraph/jobgraph.png?q=Scala%2C+F%23%2C+clojure%2C+Ruby%2C+Groovy&amp;relative=1" border="0" alt="Scala, F#, clojure, Ruby, Groovy Job Trends graph" width="540" height="300" /><br />
</a></p>
<table style="font-size:80%" border="0" cellspacing="0" cellpadding="6" width="100%">
<tbody>
<tr>
<td><a href="http://www.indeed.com/jobtrends?q=Scala%2C+F%23%2C+clojure%2C+Ruby%2C+Groovy&amp;relative=1&amp;relative=1">Scala, F#, clojure, Ruby, Groovy Job Trends</a></td>
<td align="right"><a href="http://www.indeed.com/q-Scala-jobs.html">Scala jobs</a> - <a href="http://www.indeed.com/jobs?q=F%23">F# jobs</a> - <a href="http://www.indeed.com/q-Clojure-jobs.html">Clojure jobs</a> - <a href="http://www.indeed.com/q-Ruby-jobs.html">Ruby jobs</a> - <a href="http://www.indeed.com/q-Groovy-jobs.html">Groovy jobs</a></td>
</tr>
</tbody>
</table>
</div>
<p>Again, the growth of Clojure is impressive, even though it remains very small in absolute terms, where Ruby comes first, followed by Groovy.</p>
<h1>Popularity index</h1>
<p>So far the charts only showed how new languages are progressing compared to each other.</p>
<p>To get an indication of the actual present popularity of each language, the usual place to go is at the <a href="http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html" target="_blank">TIOBE indices</a> (last published June 2010):</p>
<blockquote><p>The TIOBE Programming Community index gives an indication of the  popularity of programming  languages. The index is updated once a month. The ratings are based on  the number of  skilled engineers world-wide, courses and third party vendors. The  popular search engines Google, MSN, Yahoo!, Wikipedia and  YouTube are used to calculate the ratings.</p></blockquote>
<p>In short:</p>
<ul>
<li>Ruby is ranked 12th; Ruby is kinda mainstream already</li>
<li>LISP/Scheme/Clojure are ranked together 16th, almost the same rank than in 2005 when Clojure did not exist yet.</li>
<li>Scala, Groovy, F#/Caml are ranked 43, 44 and 45th respectively</li>
</ul>
<h1>Conclusion</h1>
<p>Except Ruby, the new languages Scala, Groovy, F# and Clojure are not yet well established, but they do progress quickly, especially Clojure then Scala.</p>
<p>In absolute terms, and within my selection of languages, Groovy is the more popular after Ruby, followed by Scala. Clojure and F# are still far behind.</p>
<p>I have a strong feeling that the time has come for developers to mix alternate syntax in addition to their legacy language (Java or C#), still on top of the same platform, something also called<a href="http://memeagora.blogspot.com/2006/12/polyglot-programming.html" target="_blank"> polyglot programming</a>. It&#8217;s also time for the ideas of functional programming to become more popular.</p>
<p>In practice, these new languages are more likely to be introduced initially for automated testing and build systems, before being used for production code, especially with high productivity web frameworks that leverage their distinct strengths.</p>
<p>So which one to choose? If you&#8217;re already on the JVM, why not choose Groovy or Scala first, then Clojure to get a grasp on something different. If you&#8217;re on .Net, why not choose Scala and then F#. Ad if you were to choose Ruby, I guess you would have done it already.</p>
<p class="addtoany_share_save_container">
    <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?sitename=Cyrille%20Martraire&amp;siteurl=http%3A%2F%2Fcyrille.martraire.com%2F&amp;linkname=What%20next%20language%20will%20you%20choose%3F&amp;linkurl=http%3A%2F%2Fcyrille.martraire.com%2F2010%2F06%2Fwhat-next-language-will-you-choose%2F"><img src="http://cyrille.martraire.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Save/Bookmark"/></a>

	</p>]]></content:encoded>
			<wfw:commentRss>http://cyrille.martraire.com/2010/06/what-next-language-will-you-choose/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Shanghai World Expo 2010</title>
		<link>http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/</link>
		<comments>http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/#comments</comments>
		<pubDate>Tue, 08 Jun 2010 00:10:21 +0000</pubDate>
		<dc:creator>cyrille</dc:creator>
		
		<category><![CDATA[Leisure]]></category>

		<category><![CDATA[architecture]]></category>

		<category><![CDATA[china]]></category>

		<category><![CDATA[expo2010]]></category>

		<category><![CDATA[shanghai]]></category>

		<category><![CDATA[travel]]></category>

		<guid isPermaLink="false">http://cyrille.martraire.com/?p=2465</guid>
		<description><![CDATA[In late May we’ve been to the Shanghai World Expo 2010 for two days. Here are pictures and feedback on this huge event.]]></description>
			<content:encoded><![CDATA[<p>In late May we&#8217;ve been to the Shanghai World Expo 2010 for two days. Here are pictures and feedback on this huge event.</p>
<p>As for our overall impression: if you happen to go to Shanghai, you may go see the Expo 2010, but don&#8217;t plan to go there just for that. Just as Adam Minter noted in <a href="http://shanghaiscrap.com/?p=5076" target="_blank">his blog</a> (quite useful to prepare how to visit the expo):</p>
<blockquote><p>if you’ve traveled internationally, there’s absolutely nothing <em>inside  of</em> any of the pavilions that you haven’t seen before</p></blockquote>
<p>This sums up our visit quite well, I was almost disappointed in fact.</p>
<h1>Huge spaces, huge queues</h1>
<p>For the two days we&#8217;ve been there, the queues were absolutely terrific, up to 3h30 for the Japan pavilion and the Oil 4D movie for example, and just a bit less for the most demanded pavilions. This also means we did not visit them, waiting that long is not our cup of tea.</p>
<p>The 3 days tickets were no longer available, we could only buy tickets for the day, not even for the next day, meaning you have to buy them each morning. Many shops that advertise they sell tickets no longer have any (we are talking 20 days after the official opening).</p>
<p>We also had the feeling that the Expo definitely targets only Chinese citizens, not foreigners, for example the movies have no subtitles.</p>
<p>Big big thanks to all the volunteers in the Expo!  These young girls and boys that speak English are all really nice and helpful, they are the real -and only- face of the Expo, and they make the huge and rather unfriendly outdoor spaces easier to deal with. And you know what? They are not paid, but they don&#8217;t even have the right to visit themselves, apart from buying their own ticket&#8230; (at least they told me that when I asked)</p>
<h1>Our favourite pavilions</h1>
<p>The <strong>Dutch pavilion</strong> is my favourite, with its crazy little town in the air.</p>
<div id="attachment_2512" class="wp-caption alignright" style="width: 235px"><a href="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-016.jpg"><img class="size-medium wp-image-2512" title="expo2010-016" src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-016-225x300.jpg" alt="The Dutch pavilion" width="225" height="300" /></a><p class="wp-caption-text">The Dutch pavilion</p></div>
<p>Each house in this weird village features interesting works by artists and designers, and the ground level is free and offers a place to rest on the fake grass. The principle of the &#8220;<em>main street</em>&#8221; with a continuous flow of visitors just means you don&#8217;t have to wait in a queue, and the view all around is beautiful, especially at the top.</p>
<p>The <strong>Australian pavilion</strong> is also great, for the humour of the static presentation, and also for the show which is both technically fascinating and is one of the few to address the theme of the Expo: &#8220;better city, better life&#8221;.</p>
<p>In this pavilion again, the continuous flow of visitors plus a smart way to enter and exit the theater makes the queue not much of a problem.</p>
<p>The <strong>General Motors</strong> <strong>pavilion</strong> offers a nice anticipation of what the future of the car might be, at least in countries like China, where everything is possible. Queue time was between 1h down to 20mn when we eventually visited it. I did appreciate how a brand like GM had the courage to present such a technical dream, although it reminds similar ideas from Toyota. The queue time remains reasonable thanks to no less than 4 theaters operating at the same time around a shared stage.</p>
<p>The <strong>pavilion of Denmark</strong> (also continuous flow, hence no queue) is nice, with its little mermaid and the funny presentation of &#8220;<em>how we live in Denmark</em>&#8221; (rather weird to be honest), and its crazy and convoluted bench, and again a great view at the top.</p>
<p>Other pavilions with not much queuing that we enjoyed: <strong>Vietnam</strong> (skinned with bamboo), <strong>New Zealand</strong> (again a continuous flow, also addresses the theme with the question: &#8220;what is better life&#8221;), <strong>Nepal</strong> (smart design in two phases, where not many people actually go to the second phase, another good idea to reduce the queue), <strong>Cuba</strong> (smart small pavilion, with just a good bar where you can buy a good drink), <strong>State Grid</strong> (with its immersive video cube), <strong>Japan Business</strong> (promotional but not too bad), <strong>CSSC</strong> (exhibition about sea ships now and in the future), and the <strong>Czech pavilion</strong> where everything is presented on the ceiling.</p>
<p>And a special mention for the <strong>North Korea pavilion</strong>, self-entitled &#8220;<em>Paradise for People</em>&#8220;, which is a summum of kitsch with its fountain and a &#8220;back to the 80&#8217;s&#8221; institutional video. Hard to explain that feeling&#8230;</p>
<h1>And now some pictures in random order.</h1>

<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-068/' title='expo2010-068'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-068-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-319/' title='expo2010-319'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-319-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-066/' title='expo2010-066'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-066-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-267/' title='expo2010-267'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-267-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-440/' title='expo2010-440'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-440-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-011/' title='expo2010-011'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-011-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-326/' title='expo2010-326'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-326-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-266/' title='expo2010-266'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-266-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-067/' title='expo2010-067'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-067-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-012/' title='expo2010-012'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-012-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-443/' title='expo2010-443'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-443-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-058/' title='expo2010-058'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-058-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-332/' title='expo2010-332'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-332-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-065/' title='expo2010-065'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-065-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-386/' title='expo2010-386'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-386-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-412/' title='expo2010-412'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-412-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-071/' title='expo2010-071'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-071-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-070/' title='expo2010-070'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-070-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-188/' title='expo2010-188'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-188-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-187/' title='expo2010-187'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-187-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-482/' title='expo2010-482'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-482-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-523/' title='expo2010-523'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-523-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-494/' title='expo2010-494'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-494-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-217/' title='expo2010-217'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-217-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-517/' title='expo2010-517'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-517-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-490/' title='expo2010-490'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-490-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-510/' title='expo2010-510'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-510-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-016/' title='expo2010-016'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-016-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-019/' title='expo2010-019'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-019-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-029/' title='expo2010-029'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-029-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-100/' title='expo2010-100'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-100-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-018/' title='expo2010-018'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-018-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-004/' title='expo2010-004'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-004-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-064/' title='expo2010-064'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-064-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-098/' title='expo2010-098'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-098-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-003/' title='expo2010-003'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-003-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-082/' title='expo2010-082'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-082-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-020/' title='expo2010-020'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-020-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/nkorea_video/' title='nkorea_video'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/nkorea_video-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-279/' title='expo2010-279'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-279-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-088/' title='expo2010-088'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-088-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-026/' title='expo2010-026'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-026-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-055/' title='expo2010-055'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-055-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-010/' title='expo2010-010'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-010-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-021/' title='expo2010-021'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-021-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-089/' title='expo2010-089'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-089-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-025/' title='expo2010-025'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-025-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-408/' title='expo2010-408'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-408-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-109/' title='expo2010-109'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-109-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-180/' title='expo2010-180'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-180-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-159/' title='expo2010-159'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-159-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-152/' title='expo2010-152'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-152-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-043/' title='expo2010-043'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-043-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-478/' title='expo2010-478'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-478-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-272/' title='expo2010-272'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-272-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-028/' title='expo2010-028'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-028-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-102/' title='expo2010-102'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-102-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-097/' title='expo2010-097'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-097-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-056/' title='expo2010-056'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-056-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-081/' title='expo2010-081'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-081-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-057/' title='expo2010-057'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-057-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-528/' title='expo2010-528'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-528-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/expo2010-481/' title='expo2010-481'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/06/expo2010-481-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>

<h1>Architectural madness</h1>
<p>If you like architecture, and we do, then on the outside the Expo  offers a real-size gallery of architects dreams. Each pavilion is usually  built to last 6 months and must be impressive enough yet <em>green</em> enough at the  same time. The most common strategy used to that end makes use of a  thin skin of something (anything lightweight indeed) to wrap a more  conventional or temporary construction.</p>
<p>Pavilions that I find  especially beautiful  from the outside are the pavilions of <strong>Spain </strong>(with  large petals made of small wood branches), <strong>Emirates</strong> (all golden  metal), <strong>South Korea </strong>(geometric volumes in laser-cut aluminium), <strong>Australia</strong>,  <strong>Germany</strong>, <strong>UK</strong> (always looks like 3D rendering, even for  real), <strong>Vietnam </strong>(bamboo), <strong>Denmark</strong>, <strong>Canada </strong>(all  skinned in wood), <strong>Russia</strong>, <strong>Estonia</strong> (colourful), <strong>Mexico </strong>(with  the wings), <strong>Portugal</strong> (a nice mix of natural cork and red neon) and <strong>Luxembourg</strong> (looks like a monster house).</p>
<h1>Movies and LED screens everywhere</h1>
<p>World Expo are supposed to demonstrate stuff never seen before, or at least impressive and novel techniques and ideas; we must be very bored then, or there is nothing novel left today (which I don&#8217;t believe so), or novel things are too complex to explain or too abstract to demonstrate, or perhaps we already know everything thanks to the Internet, but every major pavilion is more or less entered around a show in a theater using immersive techniques such as 3D and every possible kind of screen madness.</p>
<p>LED technology is also the grand winner of the Expo 2010, with giant LED  screen everywhere outside and inside each pavilion. Video-projection  resists, with some video-mapping techniques, but has already lost the  battle.</p>
<p>Cheers,</p>
<address><em>Pictures taken with a small Canon compact camera, in the usual Shanghai fog.</em><br />
</address>
<p class="addtoany_share_save_container">
    <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?sitename=Cyrille%20Martraire&amp;siteurl=http%3A%2F%2Fcyrille.martraire.com%2F&amp;linkname=Shanghai%20World%20Expo%202010&amp;linkurl=http%3A%2F%2Fcyrille.martraire.com%2F2010%2F06%2Fshanghai-world-expo-2010%2F"><img src="http://cyrille.martraire.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Save/Bookmark"/></a>

	</p>]]></content:encoded>
			<wfw:commentRss>http://cyrille.martraire.com/2010/06/shanghai-world-expo-2010/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Huang Shan Mountain - China 2010</title>
		<link>http://cyrille.martraire.com/2010/05/huang-shan-mountain-china-2010/</link>
		<comments>http://cyrille.martraire.com/2010/05/huang-shan-mountain-china-2010/#comments</comments>
		<pubDate>Mon, 10 May 2010 14:35:36 +0000</pubDate>
		<dc:creator>cyrille</dc:creator>
		
		<category><![CDATA[Leisure]]></category>

		<guid isPermaLink="false">http://cyrille.martraire.com/?p=2414</guid>
		<description><![CDATA[La chaine de montagnes Huang Shan (Montagne Jaune) est un site avec des paysages absolument fabuleux. Cette beaute se merite avec ses pieds, au prix d&#8217;une ascension de pres d&#8217;une journee. Nous avons passe la nuit en haut pour pouvoir assister au fameux lever de soleil qui apparait au dessus de la mer de nuages, [...]]]></description>
			<content:encoded><![CDATA[
<a href='http://cyrille.martraire.com/2010/05/huang-shan-mountain-china-2010/img_3509/' title='img_3509'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/05/img_3509-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/05/huang-shan-mountain-china-2010/img_3520/' title='img_3520'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/05/img_3520-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/05/huang-shan-mountain-china-2010/img_3574/' title='img_3574'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/05/img_3574-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/05/huang-shan-mountain-china-2010/img_3585/' title='img_3585'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/05/img_3585-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/05/huang-shan-mountain-china-2010/img_3590/' title='img_3590'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/05/img_3590-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/05/huang-shan-mountain-china-2010/img_3597/' title='img_3597'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/05/img_3597-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/05/huang-shan-mountain-china-2010/img_3605/' title='img_3605'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/05/img_3605-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/05/huang-shan-mountain-china-2010/img_3617/' title='img_3617'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/05/img_3617-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/05/huang-shan-mountain-china-2010/img_3618/' title='img_3618'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/05/img_3618-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/05/huang-shan-mountain-china-2010/img_3620/' title='img_3620'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/05/img_3620-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/05/huang-shan-mountain-china-2010/img_3635/' title='img_3635'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/05/img_3635-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/05/huang-shan-mountain-china-2010/img_3636/' title='img_3636'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/05/img_3636-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/05/huang-shan-mountain-china-2010/img_3655/' title='img_3655'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/05/img_3655-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/05/huang-shan-mountain-china-2010/img_3663/' title='img_3663'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/05/img_3663-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/05/huang-shan-mountain-china-2010/img_3670/' title='img_3670'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/05/img_3670-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/05/huang-shan-mountain-china-2010/img_3692/' title='img_3692'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/05/img_3692-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/05/huang-shan-mountain-china-2010/img_3696/' title='img_3696'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/05/img_3696-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/05/huang-shan-mountain-china-2010/img_3700/' title='img_3700'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/05/img_3700-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/05/huang-shan-mountain-china-2010/img_3703/' title='img_3703'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/05/img_3703-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/05/huang-shan-mountain-china-2010/img_3708/' title='img_3708'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/05/img_3708-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/05/huang-shan-mountain-china-2010/img_3710/' title='img_3710'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/05/img_3710-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/05/huang-shan-mountain-china-2010/img_3711/' title='img_3711'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/05/img_3711-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/05/huang-shan-mountain-china-2010/img_3714/' title='img_3714'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/05/img_3714-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/05/huang-shan-mountain-china-2010/img_3716/' title='img_3716'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/05/img_3716-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/05/huang-shan-mountain-china-2010/img_3727/' title='img_3727'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/05/img_3727-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/05/huang-shan-mountain-china-2010/img_3731/' title='img_3731'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/05/img_3731-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/05/huang-shan-mountain-china-2010/img_3753/' title='img_3753'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/05/img_3753-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/05/huang-shan-mountain-china-2010/img_3755/' title='img_3755'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/05/img_3755-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/05/huang-shan-mountain-china-2010/img_3801/' title='img_3801'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/05/img_3801-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/05/huang-shan-mountain-china-2010/img_3811/' title='img_3811'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/05/img_3811-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/05/huang-shan-mountain-china-2010/img_3815/' title='img_3815'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/05/img_3815-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/05/huang-shan-mountain-china-2010/img_3823/' title='img_3823'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/05/img_3823-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/05/huang-shan-mountain-china-2010/img_3830/' title='img_3830'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/05/img_3830-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/05/huang-shan-mountain-china-2010/img_3853/' title='img_3853'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/05/img_3853-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/05/huang-shan-mountain-china-2010/img_3856/' title='img_3856'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/05/img_3856-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/05/huang-shan-mountain-china-2010/img_3859/' title='img_3859'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/05/img_3859-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/05/huang-shan-mountain-china-2010/img_3860/' title='img_3860'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/05/img_3860-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/05/huang-shan-mountain-china-2010/img_3865/' title='img_3865'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/05/img_3865-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/05/huang-shan-mountain-china-2010/img_3877/' title='img_3877'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/05/img_3877-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/05/huang-shan-mountain-china-2010/img_3879/' title='img_3879'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/05/img_3879-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/05/huang-shan-mountain-china-2010/img_3903/' title='img_3903'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/05/img_3903-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://cyrille.martraire.com/2010/05/huang-shan-mountain-china-2010/img_4112/' title='img_4112'><img src="http://cyrille.martraire.com/wp-content/uploads/2010/05/img_4112-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>

<p>La chaine de montagnes Huang Shan (Montagne Jaune) est un site avec des paysages absolument fabuleux. Cette beaute se merite avec ses pieds, au prix d&#8217;une ascension de pres d&#8217;une journee. Nous avons passe la nuit en haut pour pouvoir assister au fameux lever de soleil qui apparait au dessus de la mer de nuages, un spectacle vraiment magnifique. Et au retour nous avons fait escale dans le petit et charmant village de Hongcun.</p>
<p class="addtoany_share_save_container">
    <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?sitename=Cyrille%20Martraire&amp;siteurl=http%3A%2F%2Fcyrille.martraire.com%2F&amp;linkname=Huang%20Shan%20Mountain%20-%20China%202010&amp;linkurl=http%3A%2F%2Fcyrille.martraire.com%2F2010%2F05%2Fhuang-shan-mountain-china-2010%2F"><img src="http://cyrille.martraire.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Save/Bookmark"/></a>

	</p>]]></content:encoded>
			<wfw:commentRss>http://cyrille.martraire.com/2010/05/huang-shan-mountain-china-2010/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Domain-Driven Design: where to find inspiration for Supple Design? [part2]</title>
		<link>http://cyrille.martraire.com/2010/03/domain-driven-design-and-supple-desig-where-to-find-inspiration-part2/</link>
		<comments>http://cyrille.martraire.com/2010/03/domain-driven-design-and-supple-desig-where-to-find-inspiration-part2/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 23:18:16 +0000</pubDate>
		<dc:creator>cyrille</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<category><![CDATA[ddd]]></category>

		<guid isPermaLink="false">http://cyrille.martraire.com/?p=2291</guid>
		<description><![CDATA[Domain-Driven Design encourages to analyse the domain deeply in a process called Supple Design. In his book (the blue book) and in his talks Eric Evans gives some examples of this process, and in this blog in several parts I will suggest some sources of inspirations and some recommendations drawn from my practice in order to help about this process. [part 2]]]></description>
			<content:encoded><![CDATA[<p><em>This is the second part of this topic, you can find the first part <a href="http://cyrille.martraire.com/2010/03/domain-driven-design-where-to-find-inspiration-1/">here</a>.</em></p>
<h1>Maths (cont&#8217;ed)</h1>
<h2>Abstract algebra</h2>
<p>Another classical example of mathematical concept that I find insightful for modeling is the concept of <a href="http://en.wikipedia.org/wiki/Group_%28mathematics%29" target="_blank">Group</a> in the field of <a href="http://en.wikipedia.org/wiki/Abstract_algebra" target="_blank">Abstract Algebra</a>. To be honest, I&#8217;d guess this is what Eric Evans had in mind when he talks about <em>Closure of Operations</em> (where it fits, define an operation whose return type is the same as the type of its arguments) or when he mentions arithmetic as a known formalism:</p>
<blockquote><p>Draw on Established Formalisms, When You Can [...] There are many such formalized conceptual frameworks, but my personal favorite is math. [...] It is surprising how useful it can be to pull out some twist on basic arithmetic.</p></blockquote>
<p>The usual integer numbers and their addition operation is an example of Groups that everybody knows (although integers are also examples of other kind of algebraic structures).</p>
<h2>Limits as Special Cases</h2>
<p>Going further, the concept of <em>zero </em>and of limits such as <em>infinity </em>can be inspirations for your domain. Consider for example the domain element Currency, with values EUR, USD, JPY etc. Traders can typically request to monitor prices for one currency, but they can also request to see all currencies or none.</p>
<p>Just like mathematicians do when they invent limit concept such as infinity or zero (a special value that does not really exist in the world but that is convenient), we can expand Currency with the <em>Special Case</em> values ALL and NONE, each with their own special behavior, i.e. behave like any currency or none at all (typically this means their methods return true or false respectively all the time). Trust me, it is very convenient.</p>
<p>You&#8217;ll recognize that the <em>Null Object</em> pattern generalizes the very concept of zero for arbitrary concepts.</p>
<h1>Principles</h1>
<h2>Dimensions in the domain</h2>
<p>Something I clearly learnt from maths classes at school is thinking in separate dimensions, and how looking for orthogonal dimensions helps tremendously.</p>
<p>Given a cloud of concepts spread over the whiteboard, if you can sort them out onto 1, 2 or 3 separate dimensions (the less the better), and if these dimensions are orthogonal (independent to each other), then your design gets greatly enhanced, provided of course it still makes sense in the domain.</p>
<p>For example we may have a dimension that groups the concepts of user, user group and company, that is probably orthogonal to another dimension that groups the concepts of financial instrument, product segment and market. Once the two dimensions are identified, we&#8217;ll seldom discuss concepts from both dimensions at the same time, because we know that they are independent.</p>
<p>Yet simple, the formalism of <a href="http://en.wikipedia.org/wiki/Dimension" target="_blank">dimension</a> is valuable as an inspiration for supple design. Also once you think of explicit dimensions you may consider extrapolating known concepts such as ordering or interval, if they make sense for your domain. In other words your domain gets more formal, which at the end of the day, once coded, will means less code and less bugs.</p>
<h2>Symmetries in the domain</h2>
<div id="attachment_2339" class="wp-caption alignright" style="width: 233px"><a href="http://cyrille.martraire.com/wp-content/uploads/2010/03/symmetry1.jpg"><img class="size-medium wp-image-2339" title="symmetry1" src="http://cyrille.martraire.com/wp-content/uploads/2010/03/symmetry1-223x300.jpg" alt="symmetry1" width="223" height="300" /></a><p class="wp-caption-text">This chair has 4 identical legs: lots of symmetries</p></div>
<p>One of the biggest possible inspiration for Supple Design is the idea of symmetry, as Paul Rayner quotes from Eric Evans in the 5th part of his series: <a href="http://www.virtual-genius.com/blog/post/Domain-Driven-Design-Immersion-Course-e28093-Part-5.aspx" target="_blank">Domain-Driven Design (DDD) Immersion Course – Part #5</a></p>
<blockquote><p>Use symmetry as principle of Supple Design</p></blockquote>
<p>I love this idea! Indeed, great physicists like Murray Gell-Mann have discovered a lot guided by symmetry.</p>
<p>When you look at elements of the domain, you can choose to focus on how we deal with them, rather than looking at what they are. Considering each perspective in turn helps to find out what properties the domain elements may have in common (for more see <a href="http://cyrille.martraire.com/2005/04/analysis-dont-make-things-artificially-different/" target="_self">don&#8217;t make things artificially different</a>).</p>
<p>Sometimes concepts looks fundamentally different just because some of them are singular whereas other are plural. The Composite pattern offers a solution for that. You can unveil symmetry just by looking from the right viewpoint.</p>
<h1>Deeper insight than the domain experts?</h1>
<p>Domain-Driven Design advises that the domain shall not deviate from concepts and ideas that the users really know and really talk of. However it may happen that by analysing the domain you uncover structures than the people in the business are not even aware of. In fact they may well manipulate the structure in practice without being conscious of them.</p>
<p>I&#8217;ve come across such a case in interest rates derivatives trading, where swap traders think of spreads and butterfly as products by themselves, and intuitively know how to combine them for their purpose. However when you want a machine to manipulate these products, you&#8217;d better formalize a bit the concepts, that are otherwise intuitive. In our case, simple <a href="http://en.wikipedia.org/wiki/Linear_combination" target="_blank">linear combinations</a> proved to be a good formal framework for spreads and butterflies, even though hardly any traders speaks of the topic like that.</p>
<h2>Influences everywhere</h2>
<p>I recommend browsing various fields for behaviours or structures that look similar to the domain being modelled. This yields benefits even if you don&#8217;t find a corresponding structure, since when you compare your problem to another one you must ask good questions that will help get insights anyway.</p>
<p>With some practice you may even anticipate, and whatever concept you encounter gets automatically &#8220;indexed&#8221; in your brain just in case you would need it later. No need to remember the concept, just that it exists.</p>
<p>What&#8217;s important is not that you know everything, there are books and Wikipedia for that. What&#8217;s important is to be ready to dedicate some time looking for a formalism that is well-suited for your domain.</p>
<p>The more demanding you are when making the Design Supple, the more reward you&#8217;ll get over time, and by this I mean less ad hoc adjustments, error corrections and tricky handling of special cases.</p>
<p class="addtoany_share_save_container">
    <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?sitename=Cyrille%20Martraire&amp;siteurl=http%3A%2F%2Fcyrille.martraire.com%2F&amp;linkname=Domain-Driven%20Design%3A%20where%20to%20find%20inspiration%20for%20Supple%20Design%3F%20%5Bpart2%5D&amp;linkurl=http%3A%2F%2Fcyrille.martraire.com%2F2010%2F03%2Fdomain-driven-design-and-supple-desig-where-to-find-inspiration-part2%2F"><img src="http://cyrille.martraire.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Save/Bookmark"/></a>

	</p>]]></content:encoded>
			<wfw:commentRss>http://cyrille.martraire.com/2010/03/domain-driven-design-and-supple-desig-where-to-find-inspiration-part2/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Domain-Driven Design: where to find inspiration for Supple Design? [part1]</title>
		<link>http://cyrille.martraire.com/2010/03/domain-driven-design-where-to-find-inspiration-1/</link>
		<comments>http://cyrille.martraire.com/2010/03/domain-driven-design-where-to-find-inspiration-1/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 00:04:14 +0000</pubDate>
		<dc:creator>cyrille</dc:creator>
		
		<category><![CDATA[Patterns]]></category>

		<category><![CDATA[Programming]]></category>

		<category><![CDATA[ddd]]></category>

		<category><![CDATA[analysis]]></category>

		<category><![CDATA[design]]></category>

		<category><![CDATA[domain]]></category>

		<category><![CDATA[intent]]></category>

		<category><![CDATA[maths]]></category>

		<category><![CDATA[pattern]]></category>

		<category><![CDATA[theory]]></category>

		<category><![CDATA[tree]]></category>

		<guid isPermaLink="false">http://cyrille.martraire.com/?p=2272</guid>
		<description><![CDATA[Domain-Driven Design encourages to analyse the domain deeply in a process called Supple Design. In his book (the blue book) and in his talks Eric Evans gives some examples of this process, and in this blog in several parts I will suggest some sources of inspirations and some recommendations drawn from my practice in order to help about this process.]]></description>
			<content:encoded><![CDATA[<p><a href="http://dddstepbystep.com/" target="_blank">Domain-Driven Design</a> encourages to analyse the domain deeply in a process called Supple Design. In his book (the blue book) and in his talks Eric Evans gives some examples of this process, and in this blog I suggest some sources of inspirations and some recommendations drawn from my practice in order to help about this process.</p>
<blockquote><p>When a common formalism fits the domain well, you can factor it out and adapt its rules to the domain.</p></blockquote>
<p>A known formalism can be reused as a ready-made, well understood model.</p>
<h1>Obvious sources of inspiration</h1>
<h2>Analysis patterns</h2>
<p>It is quite obvious in the book, DDD builds clearly on top of Martin Fowler analysis patterns. The patterns <em>Knowledge Level</em> (aka <em>Meta-Model</em>), and <em>Specification</em> (a <em>Strategy</em> used as a predicate) are from Fowler, and Eric Evans mentions using and drawing insight from analysis patterns many times in the book.<a href="http://www.amazon.com/dp/0201895420"><img class="alignright" style="border: 0pt none;" src="http://ecx.images-amazon.com/images/I/51BSMJWXV2L._SL110_PIsitb-sticker-arrow-sm,TopRight,10,-13_OU01_.jpg" border="0" alt="Analysis Patterns: Reusable Object Models (Addison-Wesley Object Technology Series)" width="95" height="121" align="center" /></a></p>
<p>Reading analysis patterns helps to appreciate good design; when you&#8217;ve read enough analysis patterns, you don&#8217;t even have to remember them to be able to improve your modelling skills. In my own experience, I have learnt to look for specific design qualities such as explicitness and traceability in my design as a result of getting used to analysis patterns such as <em>Phenomenon</em> or <em>Observation</em>.</p>
<h2>Design patterns</h2>
<p>Design patterns are another source of inspiration, but usually less relevant to domain modelling. Evans mentions the <em>Strategy</em> pattern, also named <em>Policy</em> (I rather like using an alternative name to make it clear that we are talking about the domain, not about a technical concerns), and the pattern <em>Composite</em>. Evans suggests considering other patterns, not just the GoF patterns, and to see whether they make sense at the domain level.</p>
<h2>Programming paradigms</h2>
<p>Eric Evans also mentions that sometimes the domain is naturally well-suited for particular approaches (or paradigms) such as <em><a href="http://en.wikipedia.org/wiki/State_machines" target="_blank">state machines</a></em>, <em>predicate logic</em> and <em>rules engines</em>. Now the DDD community has already expanded to include <em>event-driven</em> as a favourite paradigm, with the  <a href="http://codebetter.com/blogs/gregyoung/archive/2010/02/20/why-use-event-sourcing.aspx" target="_blank">Event-Sourcing</a> and <a href="http://www.udidahan.com/2009/12/09/clarified-cqrs/" target="_blank">CQRS</a> approaches in particular.</p>
<p>On paradigms, my design style has also been strongly influenced by elements of <em>functional programming,</em> that I originally learnt from using Apache Commons Collections, together with a increasingly pronounced taste for <em>immutability</em>.</p>
<h1>Maths</h1>
<p>It is in fact the core job of mathematicians to factor out formal models of everything we experience in the world. As a result it is no surprise we can draw on their work to build deeper models.</p>
<h2>Graph theory</h2>
<p>The great benefit of any mathematical model is that it is highly formal, ready with plenty of useful theorems that depend on the set of axioms you can assume. In short, all the body of maths is just work already done for you, ready for you to reuse. To start with a well-known example, used extensively by Eric Evans, let&#8217;s consider a bit of <a href="http://en.wikipedia.org/wiki/Graph_theory" target="_blank">graph theory</a>.</p>
<p>If you recognize that your problem is similar (mathematicians would say isomorphic or something like that) to a graph, then you can jump in graph theory and reuse plenty of exciting results, such as how to compute a shortest-path using a Dijkstra or A* algorithm. Going further, the more you know or read about your theory, the more you can reuse: in other words the more lazy you can be!</p>
<p>In his classical example of modelling cargo shipping using Legs or using Stops, Eric Evans, could also refer to the concept of <a href="http://en.wikipedia.org/wiki/Line_graph" target="_blank">Line Graph</a>, (aka edge-to-vertex dual) which comes with interesting results such as how to convert a graph into its edge-to-vertex dual.</p>
<h2>Trees and nested sets</h2>
<p>Other maths concepts common enough include trees and <a href="http://en.wikipedia.org/wiki/Directed_acyclic_graph" target="_blank">DAG</a>, which come with useful concepts such as the topological sort. <a href="http://en.wikipedia.org/wiki/Hierarchy#Containment_hierarchy" target="_blank">Hierarchy containment</a> is another useful concept that appear for instance in every e-commerce catalog. Again, if you recognize the mathematical concept hidden behind your domain, then you can then search for prior knowledge and techniques already devised to manipulate the concept in an easy and correct way, such as <a href="http://dev.mysql.com/tech-resources/articles/hierarchical-data.html" target="_blank">how to store that kind of hierarchy into a SQL database</a>.</p>
<p><em>Don&#8217;t miss the next part: <a href="http://cyrille.martraire.com/2010/03/domain-driven-design-and-supple-desig-where-to-find-inspiration-part2/">part 2</a><br />
</em></p>
<ul>
<li>Maths continued</li>
<li>General principles</li>
</ul>
<p class="addtoany_share_save_container">
    <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?sitename=Cyrille%20Martraire&amp;siteurl=http%3A%2F%2Fcyrille.martraire.com%2F&amp;linkname=Domain-Driven%20Design%3A%20where%20to%20find%20inspiration%20for%20Supple%20Design%3F%20%5Bpart1%5D&amp;linkurl=http%3A%2F%2Fcyrille.martraire.com%2F2010%2F03%2Fdomain-driven-design-where-to-find-inspiration-1%2F"><img src="http://cyrille.martraire.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Save/Bookmark"/></a>

	</p>]]></content:encoded>
			<wfw:commentRss>http://cyrille.martraire.com/2010/03/domain-driven-design-where-to-find-inspiration-1/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Reuse is not only code reuse</title>
		<link>http://cyrille.martraire.com/2010/01/reuse-is-not-only-code-reuse/</link>
		<comments>http://cyrille.martraire.com/2010/01/reuse-is-not-only-code-reuse/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 01:01:10 +0000</pubDate>
		<dc:creator>cyrille</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://cyrille.martraire.com/?p=2092</guid>
		<description><![CDATA[Reuse is often assumed to mean code reuse, but there are many other kinds of reuse. You can also reuse ideas, and even reuse the process of applying ideas.
Why reuse?
We want to reuse prior work or knowledge for several reasons:

It is easier to reuse than to redo the effort that would lead to the same [...]]]></description>
			<content:encoded><![CDATA[<p>Reuse is often assumed to mean code reuse, but there are many other kinds of reuse. You can also reuse ideas, and even reuse the process of applying ideas.</p>
<h1>Why reuse?</h1>
<p>We want to reuse prior work or knowledge for several reasons:</p>
<ol>
<li>It is <strong>easier</strong> to reuse than to redo the effort that would lead to the same result.</li>
<li>We want the <strong>best </strong>result, and the simplest way to ensure that is to reuse the solution considered to be the best in its field.</li>
<li>We want to keep something in only one place, following the <a href="http://en.wikipedia.org/wiki/Don%27t_repeat_yourself" target="_blank">DRY</a> principle.</li>
</ol>
<h1>Ready-made reuse</h1>
<div id="attachment_2105" class="wp-caption alignright" style="width: 310px"><a href="http://cyrille.martraire.com/wp-content/uploads/2009/12/reuse.jpg"><img class="size-medium wp-image-2105" title="reuse" src="http://cyrille.martraire.com/wp-content/uploads/2009/12/reuse-300x224.jpg" alt="reuse" width="300" height="224" /></a><p class="wp-caption-text">Circuit-bending is about reusing old toys to create weird musical instruments</p></div>
<p>Reuse is often assumed to mean code reuse, or at least reuse of something already written:</p>
<ul>
<li><strong>API, library or framework</strong>: code is packaged to be easy to (re)-use, and perhaps easy to customize.</li>
<li><strong>Code snippet</strong>: example code is provided for copy-and-paste inclusion into the code under construction. Code snippets can also be tweaked.</li>
<li><strong>Declaration files templates</strong>: many frameworks or build tools supply declarations files that can be either reused and tweaked, or imported and modified through some inheritance mechanism, such as Ant build files.</li>
<li><strong>Aspects</strong>: <a href="http://en.wikipedia.org/wiki/Aspect-oriented_programming" target="_blank">Aspects</a> isolate how to address cross-cutting concerns, and can be reused as coded aspects in AspectJ for example. However applying the aspect must be done by the developer.</li>
</ul>
<p>Ready-made reuse is the simpler kind of reuse: take it and use it, as it is. It is a no-brainer. The drawback is that this cookie-cutter approach lacks flexibility to adapt to each particular case, unless you leave the road and start to customize at your own risk.</p>
<p>Ready-made API&#8217;s often try to workaround this lack of flexibility through extensive options of configuration.</p>
<h1>Reuse of ideas</h1>
<p>However there is another kind of reuse, in the form of ideas to apply each time into the project under construction. This knowledge prepared and canned in advance can take various forms:</p>
<ul>
<li><strong>Algorithms</strong>: an algorithm is often reused without code reuse, by applying the algorithm on the particular data structure at hand<strong>.<br />
</strong></li>
<li><strong>Pattern</strong>s: <a href="http://cyrille.martraire.com/2009/10/patterns-in-general-not-just-design-patterns/" target="_blank">patterns</a> are an obvious mean of reuse, and most of the time they must be <em>applied</em> into the code in progress, rather than <em>imported</em> through an API or through libraries.</li>
<li> <strong>Specifications</strong>: knowing the &#8220;what to do&#8221; can also be reused, we can reuse specifications. This is especially true when re-building from scratch an existing legacy application: the legacy application can be reused as a working piece of specification, rather than reusing its actual code (which we usually do not want to reuse).</li>
<li><strong>Issues History</strong>: the history of issues already encountered and stored in a bug tracker has value for reuse too, because it can be considered a check list of possible traps when refactoring or when starting another similar project.</li>
</ul>
<p>When reusing ideas, you have to think deeper, which is good for your brain. But because you have to take decisions to apply each idea you reuse, it takes more time and more effort, and the end result will also depend more closely on your design and coding skills.</p>
<p>But on the other hand, you get the maximal flexibility, or how to build the solution that perfectly matches the needs of each particular situation. This is invaluable, and this is why ready-made reuse is not always desirable.</p>
<h1>Automated reuse of ideas</h1>
<p>When ready-made reuse is not desirable, it may remain desirable to automate the process of applying codified ideas to a project under construction. The twist here is to reuse the <em>process</em> of applying ideas, rather than the ideas themselves.</p>
<p>Several examples of this approach already exist:</p>
<ul>
<li><strong>Code generation, method and field injection</strong>: generation and injection of code is a process to enable reuse of prior knowledge and effort, concentrated into a generator. For example in the tool <a href="http://jibx.sourceforge.net/" target="_blank">JiBX</a>, the knowledge of how to serialize beans into XML is canned into a bytecode generator.</li>
<li><strong>Macros and C++ templates</strong>: just like code generation, macros and templates are processes that apply codified ideas to program elements in an automated fashion. Note that this is not the case with Java or .Net generics, which are just plain (generic, really) code reuse.</li>
<li><strong>Middleware magic</strong>: interception, dynamic proxies and other decorators created behind the scene by most JEE application servers are a form of reusing ideas by applying them to each specific entity or service.</li>
<li><strong>Compiler or VM optimization</strong>: automatic compiler optimizations have removed the need to manually optimize code for most cases, thanks to automatic application of many optimization techniques.</li>
</ul>
<p>If we want to automate further the application of ideas onto code, we need better ways to guide the tools. For a tool to apply an idea onto existing code, you need to describe what you want to the tool. If the required amount of user input is excessive or if it is impossible to tell a tool your intent, you&#8217;d better of doing the work manually. This is the limiting factor toward more powerful tools.</p>
<h1>More explicit, more reuse</h1>
<p>By making intents and concepts more explicit in the code, tools can increasingly automate tasks that otherwise would remain manual tasks:</p>
<ul>
<li><strong>Maven POM</strong>: Maven makes project information explicit in its project object model (POM), and as a result each plugin can configure itself. A plugin that needs to know where to find the source code files can access the information by itself, and this can be seen as a reuse of a predefined configuration. In contrast, with Ant you must configure the information repeatedly for each task.</li>
</ul>
<p>Imagine now a cross-cutting concern &#8220;Auditability&#8221; which requires to &#8220;record every action that changes the state of an entity&#8221;.</p>
<p>In other words we need to record every action that is not <em>safe</em>, as defined in <a href="http://www.packetizer.com/ws/rest.html" target="_blank">REST</a>. If we can explicitly declare on each operation and service whether it is safe or not (e.g. using <a href="http://cyrille.martraire.com/2009/12/principles-for-using-annotations/" target="_blank">annotations</a>), then a tool can automatically weave a predefined Aspect for Auditability, without any specific configuration.</p>
<p>This example illustrates how we can reuse both the <em>aspect</em> (ready-made reuse) and the configuration of its <em>pointcuts</em> (i.e. reuse of the process of applying the aspect), thanks to a new concept (<em>Safe</em>) made explicit in the code.</p>
<p>I believe there are still many other forms of knowledge that could be reused automatically, and this looks like an exciting area of investigation.</p>
<p class="addtoany_share_save_container">
    <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?sitename=Cyrille%20Martraire&amp;siteurl=http%3A%2F%2Fcyrille.martraire.com%2F&amp;linkname=Reuse%20is%20not%20only%20code%20reuse&amp;linkurl=http%3A%2F%2Fcyrille.martraire.com%2F2010%2F01%2Freuse-is-not-only-code-reuse%2F"><img src="http://cyrille.martraire.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Save/Bookmark"/></a>

	</p>]]></content:encoded>
			<wfw:commentRss>http://cyrille.martraire.com/2010/01/reuse-is-not-only-code-reuse/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The String Obsession anti-pattern</title>
		<link>http://cyrille.martraire.com/2010/01/the-string-obsession-anti-pattern/</link>
		<comments>http://cyrille.martraire.com/2010/01/the-string-obsession-anti-pattern/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 21:35:32 +0000</pubDate>
		<dc:creator>cyrille</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<category><![CDATA[antipattern]]></category>

		<category><![CDATA[java]]></category>

		<category><![CDATA[oo]]></category>

		<category><![CDATA[valueobject]]></category>

		<guid isPermaLink="false">http://cyrille.martraire.com/?p=2041</guid>
		<description><![CDATA[This anti-pattern is about Using String instances all the time instead of more powerful objects. This is a special case of primitive obsession.
Examples
Here are some flavours of this anti-pattern:

 String as keys in a Map: I have seen calls to toString() on objects just to use their String representation as a key in a Map: [...]]]></description>
			<content:encoded><![CDATA[<p>This anti-pattern is about Using String instances all the time instead of more powerful objects. This is a special case of <a href="https://www.google.com/reader/view/#search/primitive%20obsession/0" target="_blank">primitive obsession</a>.</p>
<h1>Examples</h1>
<p>Here are some flavours of this anti-pattern:</p>
<ul>
<li> String as keys in a Map: I have seen calls to toString() on objects just to use their String representation as a key in a Map: <em>map.put(myPerson.toString(), &#8220;someValue&#8221;).</em></li>
<li>String as enum (<em>&#8220;In Progress&#8221;</em> , <em>&#8220;Done&#8221;</em>, <em>&#8220;Error&#8221;</em>), with tests using <em>equal()</em> to trigger the corresponding logic.</li>
<li>Array or Collection of String to mimic a data structure, in which case the ordering matters: <em>{&#8221;firstname&#8221;, &#8220;lastname&#8221;}.</em></li>
<li>String with a special format that makes it parsable: <em>&#8220;value1_value2&#8243;</em>, but used all over the place as is, with parsing code all over the place.</li>
<li>String in XML format used everywhere as is, rather than a corresponding tree of objects (a DOM); again there is a lot of parsing everywhere.</li>
</ul>
<h1>The problem</h1>
<p><a href="http://cyrille.martraire.com/wp-content/uploads/2009/12/string_obsession.jpg"><img class="alignright size-medium wp-image-2046" title="string_obsession" src="http://cyrille.martraire.com/wp-content/uploads/2009/12/string_obsession-300x212.jpg" alt="string_obsession" width="300" height="212" /></a>Why not use &#8220;real&#8221; Java objects instead of Strings? <a href="http://cyrille.martraire.com/2009/11/design-your-value-objects-carefully-and-your-life-will-get-better/" target="_blank">Value Objects</a> would be much easier to use, and would be more efficient in many cases, whereas String obsession comes with serious troubles:</p>
<ul>
<li>Repeated parsing is CPU-intensive and allocates a lot of new objects each time</li>
<li>The code to parse and interpret a String must be spread all over the code base, leading to clutter and plenty of quasi-duplication</li>
<li>When used to represent meaningful domain concepts, Strings have no method dedicated to the business. The domain operations must be managed elsewhere and selected with conditionals; on the contrary, using value objects <a href="http://cyrille.martraire.com/2009/12/big-battles-are-won-on-small-details/" target="_blank">makes your life easier everytime you use them</a>.</li>
<li>String values also need to be parsed to be validated. String values do not catch potential issues early, they will only be discovered when really used; on the other hand, value objects can be validated and can catch issues as soon as they are constructed</li>
</ul>
<h1>Solution</h1>
<p>Use <a href="http://cyrille.martraire.com/2009/11/design-your-value-objects-carefully-and-your-life-will-get-better/" target="_blank">Value Objects</a>, that are immutable, with efficient and safe equals() and hashcode(), the convenient toString() and every useful member method that can make them easy to use and. On inputs, convert the incoming format (e.g. String) into the corresponding full-featured object as soon as possible, and use the object as much as possible. In practice the objects can be used everywhere, everytime, as long as they remain within the same VM.</p>
<h1>Why the String obsession?</h1>
<p>Sure, there are some reasons why some people favour Strings rather than creating additional objects:</p>
<ul>
<li>String are already available in i/o, hence you may consider it is memory efficient to just keep them</li>
<li>String are immutable, behave well as keys, and are easy to inspect in debug</li>
<li>You may assume that i/o represent the majority of cases in the application</li>
<li>You may consider that creating additional value objects mean more code therefore more effort and more maintenance</li>
</ul>
<p>I strongly believe all these reasons are short-sighted, if not wrong. The burden of having to interpret the business meaning of a String each time is definitely a loss compared to creating a object with a meaning as soon as possible in i/o and use the object and its methods thereafter. Even for persistence and on-screen display, having an object with methods and accessors make our life easier than just using Strings!</p>
<p class="addtoany_share_save_container">
    <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?sitename=Cyrille%20Martraire&amp;siteurl=http%3A%2F%2Fcyrille.martraire.com%2F&amp;linkname=The%20String%20Obsession%20anti-pattern&amp;linkurl=http%3A%2F%2Fcyrille.martraire.com%2F2010%2F01%2Fthe-string-obsession-anti-pattern%2F"><img src="http://cyrille.martraire.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Save/Bookmark"/></a>

	</p>]]></content:encoded>
			<wfw:commentRss>http://cyrille.martraire.com/2010/01/the-string-obsession-anti-pattern/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Your cross-cutting concerns are someone else core domain</title>
		<link>http://cyrille.martraire.com/2009/12/your-crosscuttingconcerns-are-someone-else-core-domai/</link>
		<comments>http://cyrille.martraire.com/2009/12/your-crosscuttingconcerns-are-someone-else-core-domai/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 17:58:09 +0000</pubDate>
		<dc:creator>cyrille</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<category><![CDATA[ddd]]></category>

		<category><![CDATA[crosscuttingconcern]]></category>

		<category><![CDATA[design]]></category>

		<category><![CDATA[domain]]></category>

		<guid isPermaLink="false">http://cyrille.martraire.com/?p=1992</guid>
		<description><![CDATA[Consider a domain, for example an online bookshop project that we call BuyCheapBooks. The Ubiquitous Language for this domain would talk about Book, Category, Popularity, ShoppingCart etc.
Business Domains
From scratch, coding this domain can be quite fast, and we can play with the fully unit-tested domain layer quickly. However if we want to ship, we will [...]]]></description>
			<content:encoded><![CDATA[<p>Consider a domain, for example an online bookshop project that we call BuyCheapBooks. The <a href="http://domaindrivendesign.org/node/132" target="_blank">Ubiquitous Language</a> for this domain would talk about Book, Category, Popularity, ShoppingCart etc.</p>
<h1>Business Domains</h1>
<p>From scratch, coding this domain can be quite fast, and we can play with the fully unit-tested domain layer quickly. However if we want to ship, we will have to spend several times more effort because of all the extra cross-cutting concerns we must deal with: persistence, user preferences, transactions, concurrency and logging (see <a href="http://en.wikipedia.org/wiki/Non-functional_requirement" target="_blank">non-functional requirements</a>). They are not part of the domain, but developers often spend a large amount of their time on them, and by the way, middleware and Java EE almost exclusively focus on these concerns through JPA, JTA, JMX and many others.</p>
<p>On first approximation, our application is made of a domain and of several cross-cutting concerns. However, when it is time to implement the cross-cutting concerns, they each become the core domain -a technical one- of another dedicated project in its own right. These technical projects are managed by someone else, somewhere not in your team, and you would usually use these specific technical projects to address your cross-cutting concerns, rather than doing it yourself from scratch with code.</p>
<h1>Technical Domains</h1>
<p>For example, persistence is precisely the core domain of an ORM like <a href="https://www.hibernate.org/" target="_blank">Hibernate</a>. The Ubiquitous Language for such project would talk about <a href="http://martinfowler.com/eaaCatalog/dataMapper.html">Data Mapper</a>, Caching, Fetching Strategy <a href="http://martinfowler.com/eaaCatalog/lazyLoad.html">(Lazy Load</a> etc.), Inheritance Mapping (<a href="http://martinfowler.com/eaaCatalog/singleTableInheritance.html">Single Table Inheritance</a>, <a href="http://martinfowler.com/eaaCatalog/classTableInheritance.html">Class Table   Inheritance</a>, <a href="http://martinfowler.com/eaaCatalog/concreteTableInheritance.html">Concrete Table Inheritance</a>) etc. These kinds of projects also deal with their own cross-cutting concerns such as logging and administration, among others.</p>
<p>Logging is the core domain of <a href="http://logging.apache.org/log4j/1.2/index.html" target="_blank">Log4j</a>, and it must itself deal with cross-cutting concerns such as configuration.</p>
<p style="text-align: center;"><a href="http://cyrille.martraire.com/wp-content/uploads/2009/12/domain_ccc1.png"><img class="aligncenter size-medium wp-image-2018" title="domain_ccc1" src="http://cyrille.martraire.com/wp-content/uploads/2009/12/domain_ccc1-300x172.png" alt="domain_ccc1" width="300" height="172" /></a></p>
<p>In this perspective, the cross-cutting concerns of a project are the core domains of other satellite projects, which focus on technical domains.</p>
<p>Hence we see that the very idea of core domain Vs. cross-cutting concerns is essentially <em>relative</em> to the project considered.</p>
<p>Note, for the sake of it, that there may even be cycles between the core domains and the required cross-cutting concerns of several projects. For example there is a cycle between a (hypothetical) project Conf4J that focuses on configuration (its core domain)  and that requires logging (as a cross-cutting concern), and another project Log4J that focuses on logging (its core domain) and that requires configuration (as a cross-cutting concern).</p>
<h1>Conclusion</h1>
<p>There is no clear and definite answer as to whether a concept is part of the domain or whether it is just a cross-cutting concern: it depends on the purpose of the project. There is almost always a project which domain addresses the cross-cutting concern of another.</p>
<p>For projects that target end-users, we usually tend to reuse the code that deals with cross-cutting concerns through middleware and APIs, in order to focus on the usually business-oriented domain, the one that our users care about. But when our end-users are developers, the domain may well be technical.</p>
<p class="addtoany_share_save_container">
    <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?sitename=Cyrille%20Martraire&amp;siteurl=http%3A%2F%2Fcyrille.martraire.com%2F&amp;linkname=Your%20cross-cutting%20concerns%20are%20someone%20else%20core%20domain&amp;linkurl=http%3A%2F%2Fcyrille.martraire.com%2F2009%2F12%2Fyour-crosscuttingconcerns-are-someone-else-core-domai%2F"><img src="http://cyrille.martraire.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Save/Bookmark"/></a>

	</p>]]></content:encoded>
			<wfw:commentRss>http://cyrille.martraire.com/2009/12/your-crosscuttingconcerns-are-someone-else-core-domai/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Big battles are won on small details</title>
		<link>http://cyrille.martraire.com/2009/12/big-battles-are-won-on-small-details/</link>
		<comments>http://cyrille.martraire.com/2009/12/big-battles-are-won-on-small-details/#comments</comments>
		<pubDate>Thu, 17 Dec 2009 21:50:52 +0000</pubDate>
		<dc:creator>cyrille</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<category><![CDATA[craftsman]]></category>

		<category><![CDATA[ddd]]></category>

		<category><![CDATA[design]]></category>

		<category><![CDATA[domain]]></category>

		<category><![CDATA[human]]></category>

		<category><![CDATA[methodology]]></category>

		<category><![CDATA[trick]]></category>

		<guid isPermaLink="false">http://cyrille.martraire.com/?p=1971</guid>
		<description><![CDATA[Small details matter because you deal with them often. Any enhancement you make thus yields a benefit often, hence a bigger overall benefit. In other words: invest small care, get big return. This is an irresistible proposal!
Examples of small design-level details that I care about because I have experienced great payback from them:

Using Value Objects [...]]]></description>
			<content:encoded><![CDATA[<p>Small details matter because you deal with them <em>often</em>. Any enhancement you make thus yields a benefit <em>often</em>, hence a bigger overall benefit. In other words: invest small care, get big return. This is an irresistible proposal!</p>
<div id="attachment_1977" class="wp-caption alignright" style="width: 235px"><a href="http://cyrille.martraire.com/wp-content/uploads/2009/12/balance.jpg"><img class="size-medium wp-image-1977" title="balance" src="http://cyrille.martraire.com/wp-content/uploads/2009/12/balance-225x300.jpg" alt="balance" width="225" height="300" /></a><p class="wp-caption-text">Every single step matters</p></div>
<p>Examples of small design-level details that I care about because I have experienced great payback from them:</p>
<ol>
<li>Using <a href="http://cyrille.martraire.com/2009/11/design-your-value-objects-carefully-and-your-life-will-get-better/" target="_blank">Value Objects rather than naked primitives</a></li>
<li> One argument instead of two in a method,</li>
<li><a href="http://cyrille.martraire.com/2006/04/choosing-good-names-for-your-java-classes/" target="_blank">Well-thought names for every programming element</a></li>
<li>Favour side-effect free methods and immutability as much as possible</li>
<li>Keeping the behaviour close to the related data</li>
<li>Investing enough time to deeply distillate each concept of the domain, even the most simple ones</li>
</ol>
<p>Ivan Moore has an excellent series of blog entries on this approach: <a href="http://ivan.truemesh.com/archives/cat_programming_in_the_small.html" target="_blank">programming in the small</a>.</p>
<p>All these details emphasize that code is written once then used many times. The extra care at time of writing pays back at time of using, each time, again and again. Each enhancement that minimises brain effort at time of use is welcome, because software design <a href="http://cyrille.martraire.com/2009/01/software-design-as-a-matter-of-economy/" target="_blank">is a matter of economy</a>.</p>
<p>Other kinds of &#8220;details&#8221; that I care about involve the human aspects of <a href="http://manifesto.softwarecraftsmanship.org/" target="_blank">crafting</a> software: being on site, face-to-face communication rather than electronic media, respect and consideration at all times, always celebrate achievements, etc. Because ultimately, it also boils down to people that feel like building something together.</p>
<p class="addtoany_share_save_container">
    <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?sitename=Cyrille%20Martraire&amp;siteurl=http%3A%2F%2Fcyrille.martraire.com%2F&amp;linkname=Big%20battles%20are%20won%20on%20small%20details&amp;linkurl=http%3A%2F%2Fcyrille.martraire.com%2F2009%2F12%2Fbig-battles-are-won-on-small-details%2F"><img src="http://cyrille.martraire.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Save/Bookmark"/></a>

	</p>]]></content:encoded>
			<wfw:commentRss>http://cyrille.martraire.com/2009/12/big-battles-are-won-on-small-details/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
