<?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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>erik dörnenburg &#187; Architecture</title>
	<atom:link href="http://erik.doernenburg.com/topics/architecture/feed/" rel="self" type="application/rss+xml" />
	<link>http://erik.doernenburg.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Tue, 24 Aug 2010 02:54:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Dependency Structure Matrix</title>
		<link>http://erik.doernenburg.com/2010/04/dependency-structure-matrix/</link>
		<comments>http://erik.doernenburg.com/2010/04/dependency-structure-matrix/#comments</comments>
		<pubDate>Fri, 09 Apr 2010 07:43:27 +0000</pubDate>
		<dc:creator>Erik Doernenburg</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Visualisation]]></category>

		<guid isPermaLink="false">http://erik.doernenburg.com/?p=373</guid>
		<description><![CDATA[This is just a quick post to raise awareness for a technique that has been around for a while. In software architecture a Dependency Structure Matrix (DSM) can be used to understand dependencies between groupings of classes, that is packages in Java and namespaces in C#. There are obviously other uses, and this Wikipedia article [...]]]></description>
			<content:encoded><![CDATA[<p>This is just a quick post to raise awareness for a technique that has been around for a while. In software architecture a Dependency Structure Matrix (DSM) can be used to understand dependencies between groupings of classes, that is packages in Java and namespaces in C#. There are obviously other uses, and this <a href="http://en.wikipedia.org/wiki/Design_Structure_Matrix">Wikipedia article</a> has more background information.</p>
<p>Returning to classes and packages, the following matrix shows a view of some of the core  classes of the Spring framework:</p>
<p><a href="http://erik.doernenburg.com/wp-content/uploads/2010/04/DSM1.png"><img src="http://erik.doernenburg.com/wp-content/uploads/2010/04/DSM1.png" alt="" title="DSM1" width="444" height="444" class="aligncenter size-full wp-image-376" /></a></p>
<p>In this typical package DSM the packages are listed on both axes. If a package has dependencies on another package, the number of dependencies is listed at the intersection. The package that has the dependency is on the top, the package that it depends on is on the left. In the example above the matrix shows that there are seven dependencies from the <em>beans.propertyeditors</em> package to the <em>core.io</em> package.</p>
<p><span id="more-373"></span></p>
<p>The first, and most obvious, issue that can be spotted in a DSM is a cyclical dependency. Most tools (more on those at the end of the post) try to arrange the matrix such that all dependencies are shown in the lower left triangle. A cyclical dependency makes this impossible and one &#8220;half&#8221; of the dependency will be shown in the upper right triangle. </p>
<p>In the following matrix, which shows a package view of the Jetty server, we can see that <em>jetty.webapp</em> has six dependencies on <em>jetty.handler</em> but the latter also has a single dependency on the former.</p>
<p><a href="http://erik.doernenburg.com/wp-content/uploads/2010/04/DSM2.png"><img src="http://erik.doernenburg.com/wp-content/uploads/2010/04/DSM2.png" alt="" title="DSM2" width="344" height="344" class="aligncenter size-full wp-image-377" /></a></p>
<p>Another design concern is that of cohesion and coupling, very well explained <a href="http://www.codeodor.com/index.cfm/2009/6/17/Strive-for-low-coupling-and-high-cohesion-What-does-that-even-mean/2902">here</a>. Applying this to a package level and DSM it is good to see dependency numbers arranged in squares, showing cohesion between related packages, but rows or columns filled with numbers are often a concern. A row filled with numbers signifies a package that many other packages depend on. This can be acceptable, as in the <em>util</em> package in the Spring matrix above, but often it is a sign of a lack of cohesion. Conversely, a column filled with numbers represents a package that depends on many other packages, which is usually a sign of bad coupling and the possible presence of <a href="http://c2.com/cgi/wiki?GodClass">god classes</a> and <a href="http://c2.com/cgi/wiki.htm?FeatureEnvySmell">feature envy</a>. </p>
<p>These patterns become even more apparent when looking at larger systems. The following matrix is a zoomed out version showing most of the Spring framework.</p>
<p><a href="http://erik.doernenburg.com/wp-content/uploads/2010/04/DSM3b.png"><img src="http://erik.doernenburg.com/wp-content/uploads/2010/04/DSM3b.png" alt="" title="DSM3b" width="561" height="561" class="aligncenter size-full wp-image-387" /></a></p>
<p>There is a good cohesion, shown in pink, in many of the subpackages, but there are also some classes that invite a large number of dependencies, shown in blue, as well as a couple of classes that have unfocussed dependencies, shown in green.</p>
<p>At this point I should probably mention that I think that the Spring framework is fairly well designed, and that I&#8217;ve seen quite different matrices in the wild.</p>
<p>I hope I have convinced you that DSMs are worth a look, and luckily there is now widespread support for DSMs, in IDEs, e.g. <a href="http://www.jetbrains.com/idea/features/dependency_analysis.html">IntelliJ</a>, and in tools, e.g. <a href="http://www.headwaysoftware.com/products/structure101/client/dependency-matrix.php">Structure&nbsp;101</a>, <a href="http://www.lattix.com/technology">Lattix</a>, <a href="http://tcdev.free.fr/">.NET Reflector</a>. The screenshots in this post were created with Structure&nbsp;101 for Java.</p>
]]></content:encoded>
			<wfw:commentRss>http://erik.doernenburg.com/2010/04/dependency-structure-matrix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The language of SOA</title>
		<link>http://erik.doernenburg.com/2009/10/the-language-of-soa/</link>
		<comments>http://erik.doernenburg.com/2009/10/the-language-of-soa/#comments</comments>
		<pubDate>Fri, 23 Oct 2009 06:17:52 +0000</pubDate>
		<dc:creator>Erik Doernenburg</dc:creator>
				<category><![CDATA[Architecture]]></category>

		<guid isPermaLink="false">http://erik.doernenburg.com/?p=323</guid>
		<description><![CDATA[To begin with an antipodean image, using a service-oriented architecture, when it works out, can be as elegant and exhilarating as surfing on a 10 meter wave, exploiting huge uncontrollable forces to move forward at great speed. However, unfortunately, and maybe much like in the surfing world, the SOA wave often mercilessly rolls over a [...]]]></description>
			<content:encoded><![CDATA[<p>To begin with an antipodean image, using a service-oriented architecture, when it works out, can be as elegant and exhilarating as surfing on a 10 meter wave, exploiting huge uncontrollable forces to move forward at great speed. However, unfortunately, and maybe much like in the surfing world, the SOA wave often mercilessly rolls over a hapless development team, leaving them confused and wondering whether to give up on the idea or to paddle out again.</p>
<p>Despite its complexity a service-oriented architecture is high on almost every project&#8217;s wish list. I have been involved in eight projects over the last year, sometimes directly delivering working software, sometimes reviewing or advising, and out of these eight projects six were, according to the respective architects, building a system with a service-oriented architecture. On these projects I have come across two recurring uses of language around SOA that I found noteworthy.</p>
<p>Firstly, SOA used to, and still should, stand for an architecture that is service-oriented, with &#8220;architecture&#8221; being the noun. What I have found, though, is that more and more often people use &#8220;SOA&#8221; as an adjective and then add it to a more or less random noun, such as &#8220;approach&#8221; or &#8220;model&#8221; or even &#8220;architecture&#8221; again. Yes, I have heard people talk about an SOA Architecuture more than once.</p>
<p>This use of language highlights a problem. Sticking the three letters &#8220;SOA&#8221; onto a random noun, without pronouncing what the letters stand for, makes it easy to forget what this was all about in the first place. In fact, it seems that &#8220;SOA&#8221; is now put in front of words such as &#8220;approach&#8221; simply to make something sound contemporary; as in: &#8220;How&#8217;s your project?&#8221; &#8212; &#8220;Oh, we follow an SOA approach.&#8221; Given my experience, chances are that the project&#8217;s architecture is not service-oriented. It might use WS-* standards, though.</p>
<p>Secondly, there are people who are referred to as SOA professionals or similar. It usually sounds like it&#8217;s their job to build SOAs. But what does that really mean? Shouldn&#8217;t developers built software according to a service-oriented architecture? Are the SOA professionals merely advising teams on how to build service-oriented architectures correctly?</p>
<p>In my experience the SOA professionals have a different agenda, and that is to sell SOA. Unfortunately, in the words of my colleague <a href="http://jim.webber.name/">Jim Webber</a>, there are two things money can&#8217;t buy: love and an SOA. Again, using the three letters one might think &#8220;why not?&#8221; but spelled out, would anybody argue you can buy a service-oriented architecture? Or any architecture for that matter? So, what is really being sold is usually a set of products, software and/or hardware, that may or may not help a team implement a service-oriented architecture. </p>
<p>The key problem in this case is that when you &#8220;buy SOA&#8221; the success criteria shift. It seems that success is defined based on whether something that can be labelled &#8220;SOA&#8221; is in place, and not whether actual business value is delivered. What is often completely forgotten is an evaluation of the suitability of the architecture, but that&#8217;s a topic for another post.</p>
]]></content:encoded>
			<wfw:commentRss>http://erik.doernenburg.com/2009/10/the-language-of-soa/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making ESB pain visible</title>
		<link>http://erik.doernenburg.com/2009/07/making-esb-pain-visible/</link>
		<comments>http://erik.doernenburg.com/2009/07/making-esb-pain-visible/#comments</comments>
		<pubDate>Wed, 01 Jul 2009 05:40:39 +0000</pubDate>
		<dc:creator>Erik Doernenburg</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Visualisation]]></category>

		<guid isPermaLink="false">http://erik.doernenburg.com/?p=236</guid>
		<description><![CDATA[At some point last year I was asked to review the architecture of the software behind a large and popular website. The resident architect explained how he had followed a modern approach, decoupling the web front-end from back-end services that provide  content. To gain further flexibility he had put the front-end and the services [...]]]></description>
			<content:encoded><![CDATA[<p>At some point last year I was asked to review the architecture of the software behind a large and popular website. The resident architect explained how he had followed a modern approach, decoupling the web front-end from back-end services that provide  content. To gain further flexibility he had put the front-end and the services on an ESB, mostly to cater for the possibility to make the content available to other consumers. In short, the architecture diagram looked a lot like many others: nothing to see here, move on.</p>
<p><img src="http://erik.doernenburg.com/wp-content/uploads/2009/06/high-level-esb.png" alt="Website Architecture" title="Website Architecture" width="320" height="212" class="alignnone size-full wp-image-237" /></p>
<p>The diagram above only shows one of the content services, which for the sake of this article is a service that provides contact details for a person.</p>
<p>Based on conversations with the project sponsors I began to suspect that at least the introduction of the ESB was a case of RDD, ie. Resume-Driven Development, development in which key choices are made with only one question in mind: how good does it look on my CV? Talking to the developers I learned that the ESB had introduced &#8220;nothing but pain.&#8221; But how could something as simple as the architecture in the above diagram cause such pain to the developers? Was this really another case of architect&#8217;s dream, developer&#8217;s nightmare?  </p>
<p><span id="more-236"></span></p>
<p>Often a picture says more than a thousand words, but at the same time traditional architecture diagrams simply do not provide enough information. (I&#8217;ve argued this before, <a href="http://softarch.97things.oreilly.com/wiki/index.php/Get_the_1000ft_view">here</a> and <a href="http://www.infoq.com/interviews/erik-doernenburg-software-visualization">here</a> for example.) The answer to my questions, and the anxious project sponsors&#8217; question whether the project would deliver on time, lay in a different picture.</p>
<p>The picture should not only show the layering of the system in more detail than the architecture diagram but it should also visualise the complexity introduced by the ESB. It&#8217;s often possible to produce more detailed diagrams automatically from source code, configuration, or runtime inspection but in this case I couldn&#8217;t find a way to do that, which is which I drew the following:</p>
<p><a href="http://erik.doernenburg.com/wp-content/uploads/2009/06/low-level-esb.png"><img src="http://erik.doernenburg.com/wp-content/uploads/2009/06/low-level-esb-600x533.png" alt="" title="Detailed ESB diagram" width="600" height="533" class="alignnone size-medium wp-image-237" /></a></p>
<p>In the centre column this diagram shows the layers involved, from the Struts action that needs to look up details by an ID down to the back-end that provides a &#8220;RESTful&#8221; service to retrieve the details. The top box contains the front-end layers while the box in the middle represents the ESB. The layers labelled in italics are frameworks or infrastructure software, the rest is project-specific code.</p>
<p>Key to this diagram are obviously the coloured representations of data travelling up and down the stack. Primitive types are grey, Java objects are purple circles, XML documents are shown as turquoise hexagons, and HTTP messages as green blobs. Mule messages, which are Java objects, are shown in dark purple. If one representation is wrapped in another it&#8217;s displayed inside the wrapper. </p>
<p>The diagram highlights that it&#8217;s a simple piece of data that travels all the way down the stack (actually further until it hits a relational database at some point) and, equally, that the data needed by the action is available in the right form from the service. All that the intermediate layers are doing is wrapping and unwrapping the data in various ways. In fact, out of the four layers of project-specific code three layers do nothing but wrapping. No wonder the developers felt some pain.</p>
<p>As a side note: the diagram also makes it obvious that the wrapping is asymmetric between the WsToRestHandler and the RestServiceWrapperImpl, which makes the point of this layer boundary even more questionable.</p>
<p>This diagram made people more interested in the cost of what had just been a simple, innocuous line in the architecture diagram; which was the point of the exercise. So, what would <em>this</em> diagram look like without the ESB? Easy:</p>
<p><a href="http://erik.doernenburg.com/wp-content/uploads/2009/06/Low-Level-ESB2.png"><img src="http://erik.doernenburg.com/wp-content/uploads/2009/06/Low-Level-ESB2-600x305.png" alt="" title="Without ESB" width="600" height="305" class="alignnone size-medium wp-image-237" /></a></p>
<p>Apart for the obvious simplicity the diagram highlights that every layer has a purpose and there is only one wrapping, which is not undone either. Would it surprise you if I told you that the project went live without the ESB?</p>
<h3>Footnotes</h3>
<p>1) This article is by no means implying that any of the mentioned technologies are useless or harmful. Their use was harmful in this case.</p>
<p>2) The pattern of wrapping and unwrapping the same data through multiple layers is not new, it was also quite common in early 3-tier architectures. (In fact, some people called their architectures n-tier; I guess to show that the number of tiers was somewhat arbitrary but large.) We had a term to describe this pattern: the wormhole pattern.</p>
<p>3) This project is not an isolated incident of a Wormhole ESB. I have personally seen several in the past years.</p>
]]></content:encoded>
			<wfw:commentRss>http://erik.doernenburg.com/2009/07/making-esb-pain-visible/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>97 Things Every Software Architect Should Know</title>
		<link>http://erik.doernenburg.com/2009/03/97-things/</link>
		<comments>http://erik.doernenburg.com/2009/03/97-things/#comments</comments>
		<pubDate>Thu, 05 Mar 2009 15:48:41 +0000</pubDate>
		<dc:creator>Erik Doernenburg</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Clippings]]></category>

		<guid isPermaLink="false">http://erik.doernenburg.com/?p=211</guid>
		<description><![CDATA[ Admittedly, I&#8217;ve been struggling with the &#8220;Architect&#8221; title in the IT world. It is not that I think there&#8217;s no role for architecture, far from it, but too often I&#8217;ve encountered architects who focus too narrowly on architecture, losing track of the realities of actual software development and the context in which the software [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://erik.doernenburg.com/wp-content/uploads/2009/03/97thingscover-100x150.jpg" alt="97 Things..." title="97 Things..." width="100" height="150" class="alignleft size-thumbnail wp-image-220" /> Admittedly, I&#8217;ve been struggling with the &#8220;Architect&#8221; title in the IT world. It is not that I think there&#8217;s no role for architecture, far from it, but too often I&#8217;ve encountered architects who focus too narrowly on architecture, losing track of the realities of actual software development and the context in which the software will be used. I wonder, if there was no &#8220;Architect&#8221; title and people who are responsible for architecture would be called guide or coach or tech lead, or just <em>the senior developer</em>, whether things would be better.</p>
<p>About a year ago, in a discussion about architects, rather than trying to define what an architect is or does, we looked at what he or she should know. We expressed our ideas as mini-essays, strictly limiting ourselves to one per essay, and it turned out that, at least to my surprise, there was a lot of agreement; maybe because we hadn&#8217;t come up with hard and fast rules but with ideas and guidelines.</p>
<p>Luckily Richard Monson-Haefel was part of that discussion and he had the resolve and means to make our thoughts more widely available. Our list of the 97 things every architect should know was collected and refined on <a href="http://softarch.97things.oreilly.com/wiki/index.php/97_Things_Every_Software_Architect_Should_Know_-_The_Book">this wiki</a>, and is available under a creative commons license. For a more convenient read it has now also been published as a <a href="http://oreilly.com/catalog/9780596522698/preview.html">book by O&#8217;Reilly</a>. As expected, <a href="http://www.theserverside.com/news/thread.tss?thread_id=53819">the discussions have begun</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://erik.doernenburg.com/2009/03/97-things/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Guardian podcast</title>
		<link>http://erik.doernenburg.com/2008/05/guardian-podcast/</link>
		<comments>http://erik.doernenburg.com/2008/05/guardian-podcast/#comments</comments>
		<pubDate>Sat, 03 May 2008 23:28:12 +0000</pubDate>
		<dc:creator>Erik Doernenburg</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Clippings]]></category>

		<guid isPermaLink="false">http://erik.doernenburg.com/?p=43</guid>
		<description><![CDATA[Of the many projects I have worked on the rewrite of the Guardian website is certainly a highlight. And in this case I can even speak about it in detail. In fact, Mat Wall from the Guardian and I presented some of our experiences at several conferences, and now the Software Engineering Radio has published [...]]]></description>
			<content:encoded><![CDATA[<p>Of the many projects I have worked on the rewrite of the <a href="http://guardian.co.uk">Guardian website</a> is certainly a highlight. And in this case I can even speak about it in detail. In fact, Mat Wall from the Guardian and I presented some of our experiences at <a href="http://erik.doernenburg.com/talks/#gu">several conferences</a>, and now the Software Engineering Radio has published a <a href="http://www.se-radio.net/podcast/2008-05/episode-95-new-guardiancouk-website-matt-wall-and-erik-doernenburg"> podcast</a> in which we talk about this project.</p>
]]></content:encoded>
			<wfw:commentRss>http://erik.doernenburg.com/2008/05/guardian-podcast/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SOA found</title>
		<link>http://erik.doernenburg.com/2007/04/soa-found/</link>
		<comments>http://erik.doernenburg.com/2007/04/soa-found/#comments</comments>
		<pubDate>Sun, 29 Apr 2007 04:14:52 +0000</pubDate>
		<dc:creator>Erik Doernenburg</dc:creator>
				<category><![CDATA[Architecture]]></category>

		<guid isPermaLink="false">http://erik.doernenburg.com/2007/04/29/soa-found/</guid>
		<description><![CDATA[Travelling&#8217;s good for you, and on a recent trip through Patagonia I unexpectedly found the answer to a question that had tormented me for a while: What does SOA really mean?  Well, have a look: The meaning of SOA.
]]></description>
			<content:encoded><![CDATA[<p>Travelling&#8217;s good for you, and on a recent trip through Patagonia I unexpectedly found the answer to a question that had tormented me for a while: What does SOA <em>really</em> mean?  Well, have a look: <a href='http://erik.doernenburg.com/?attachment_id=24' rel='attachment wp-att-24' title='The meaning of SOA'>The meaning of SOA</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://erik.doernenburg.com/2007/04/soa-found/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
