<?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>Java Application Architecture &#187; Part 2</title>
	<atom:link href="http://www.kirkk.com/modularity/category/part-2/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kirkk.com/modularity</link>
	<description>Modularity Patterns with Examples Using OSGi</description>
	<lastBuildDate>Wed, 28 Dec 2011 17:29:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>External Configuration</title>
		<link>http://www.kirkk.com/modularity/2009/12/external-configuration/</link>
		<comments>http://www.kirkk.com/modularity/2009/12/external-configuration/#comments</comments>
		<pubDate>Mon, 28 Dec 2009 20:22:54 +0000</pubDate>
		<dc:creator>kirk knoernschild</dc:creator>
				<category><![CDATA[Part 2]]></category>
		<category><![CDATA[Usability Pattern]]></category>

		<guid isPermaLink="false">http://www.kirkk.com/modularity/?p=378</guid>
		<description><![CDATA[For the full description, implementation variations, consequences, and detailed sample, see Page 150 in Java Application Architecture.
Statement
Modules should be externally configurable.
Description
The ability to configure a module to it&#8217;s usage context increases our ability to reuse the module across contexts, whereas tightly coupling configuration to the module prohibits reuse. External configuration allows a module to be [...]]]></description>
			<content:encoded><![CDATA[<p><em>For the full description, implementation variations, consequences, and detailed sample, see Page 150 in Java Application Architecture.</em></p>
<h2>Statement</h2>
<p>Modules should be externally configurable.</p>
<h2>Description</h2>
<p>The ability to configure a module to it&#8217;s usage context increases our ability to reuse the module across contexts, whereas tightly coupling configuration to the module prohibits reuse. External configuration allows a module to be reconfigured across environments, and even within it&#8217;s existing environment, without demanding redeploying the module.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-381" style="border: 0pt none;" title="ExternalConfiguration" src="http://www.kirkk.com/modularity/wp-content/uploads/2009/12/ExternalConfiguration.jpg" alt="ExternalConfiguration" width="557" height="99" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kirkk.com/modularity/2009/12/external-configuration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Module Facade</title>
		<link>http://www.kirkk.com/modularity/2009/12/module-facade/</link>
		<comments>http://www.kirkk.com/modularity/2009/12/module-facade/#comments</comments>
		<pubDate>Mon, 28 Dec 2009 20:08:52 +0000</pubDate>
		<dc:creator>kirk knoernschild</dc:creator>
				<category><![CDATA[Part 2]]></category>
		<category><![CDATA[Usability Pattern]]></category>

		<guid isPermaLink="false">http://www.kirkk.com/modularity/?p=373</guid>
		<description><![CDATA[For the full description, implementation variations, consequences, and detailed sample, see Page 150 in Java Application Architecture.
Statement
Create a facade serving as a coarse-grained entry point to the modules underlying implementation.
Description
We create fine-grained and lightweight modules to increase module reuse. Unfortunately, fine-grained modules can also be difficult to use because the user must understand the API [...]]]></description>
			<content:encoded><![CDATA[<p><em>For the full description, implementation variations, consequences, and detailed sample, see Page 150 in Java Application Architecture.</em></p>
<h2>Statement</h2>
<p>Create a facade serving as a coarse-grained entry point to the modules underlying implementation.</p>
<h2>Description</h2>
<p>We create fine-grained and lightweight modules to increase module reuse. Unfortunately, fine-grained modules can also be difficult to use because the user must understand the API of several different modules and use them in conjunction with each other to accomplish a particular task. Additionally, lightweight modules must also be configured to an environmental context. Because of this, fine-grained and lightweight modules are generally more difficult to use. A Module Facade is useful to provide a higher level API that coordinates the work of a set of fine-grained modules.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-374" style="border: 0pt none;" title="ModuleFacade" src="http://www.kirkk.com/modularity/wp-content/uploads/2009/12/ModuleFacade.jpg" alt="ModuleFacade" width="699" height="572" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kirkk.com/modularity/2009/12/module-facade/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Colocate Exceptions</title>
		<link>http://www.kirkk.com/modularity/2009/12/colocate-exceptions/</link>
		<comments>http://www.kirkk.com/modularity/2009/12/colocate-exceptions/#comments</comments>
		<pubDate>Mon, 28 Dec 2009 19:51:32 +0000</pubDate>
		<dc:creator>kirk knoernschild</dc:creator>
				<category><![CDATA[Dependency Pattern]]></category>
		<category><![CDATA[Extensibility Pattern]]></category>
		<category><![CDATA[Part 2]]></category>

		<guid isPermaLink="false">http://www.kirkk.com/modularity/?p=367</guid>
		<description><![CDATA[For the full description, implementation variations, consequences, and detailed sample, see Page 150 in Java Application Architecture.
Statement
Exceptions should be close to the class or interface that throw them.
Description
Sadly, dealing with exceptions in enterprise software systems is often an afterthought. But allocation of exceptions to modules has significant implications on the modularity, and more specifically the [...]]]></description>
			<content:encoded><![CDATA[<p><em>For the full description, implementation variations, consequences, and detailed sample, see Page 150 in Java Application Architecture.</em></p>
<h2>Statement</h2>
<p>Exceptions should be close to the class or interface that throw them.</p>
<h2>Description</h2>
<p>Sadly, dealing with exceptions in enterprise software systems is often an afterthought. But allocation of exceptions to modules has significant implications on the modularity, and more specifically the dependencies between modules, within our software system. Placing the exception close to a class that catches it will often cause a cyclic dependency between the module containing the class that throws the exception and the module containing the class that catches the exception. Exceptions should always be placed in a module closer to the class that throws the exception than a module closer to the class that catches the exception.</p>
<p style="text-align: center;"><img class="size-full wp-image-773 aligncenter" style="border: 0pt none;" title="ColocateExceptions" src="http://www.kirkk.com/modularity/wp-content/uploads/2009/12/ColocateExceptions.jpg" alt="ColocateExceptions" width="585" height="365" /></p>
<p style="text-align: center;">
]]></content:encoded>
			<wfw:commentRss>http://www.kirkk.com/modularity/2009/12/colocate-exceptions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Container Independence</title>
		<link>http://www.kirkk.com/modularity/2009/12/container-independence/</link>
		<comments>http://www.kirkk.com/modularity/2009/12/container-independence/#comments</comments>
		<pubDate>Mon, 28 Dec 2009 19:28:50 +0000</pubDate>
		<dc:creator>kirk knoernschild</dc:creator>
				<category><![CDATA[Dependency Pattern]]></category>
		<category><![CDATA[Part 2]]></category>

		<guid isPermaLink="false">http://www.kirkk.com/modularity/?p=355</guid>
		<description><![CDATA[For the full description, implementation variations, consequences, and detailed sample, see Page 150 in Java Application Architecture.
Statement
Modules should be independent of the runtime container.
Description
Modules with excessive runtime container dependencies are heavyweight modules that cannot execute outside the confines of the runtime container. Lightweight modules with no container dependencies have significant advantages.

]]></description>
			<content:encoded><![CDATA[<p><em>For the full description, implementation variations, consequences, and detailed sample, see Page 150 in Java Application Architecture.</em></p>
<h2>Statement</h2>
<p>Modules should be independent of the runtime container.</p>
<h2>Description</h2>
<p>Modules with excessive runtime container dependencies are heavyweight modules that cannot execute outside the confines of the runtime container. Lightweight modules with no container dependencies have significant advantages.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-383" style="border: 0pt none;" title="ContainerIndependence" src="http://www.kirkk.com/modularity/wp-content/uploads/2009/12/ContainerIndependence.jpg" alt="ContainerIndependence" width="557" height="225" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kirkk.com/modularity/2009/12/container-independence/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Levelize Modules</title>
		<link>http://www.kirkk.com/modularity/2009/12/levelize-modules/</link>
		<comments>http://www.kirkk.com/modularity/2009/12/levelize-modules/#comments</comments>
		<pubDate>Sun, 27 Dec 2009 18:10:25 +0000</pubDate>
		<dc:creator>kirk knoernschild</dc:creator>
				<category><![CDATA[Dependency Pattern]]></category>
		<category><![CDATA[Part 2]]></category>

		<guid isPermaLink="false">http://www.kirkk.com/modularity/?p=218</guid>
		<description><![CDATA[For the full description, implementation variations, consequences, and detailed sample, see Page 150 in Java Application Architecture.
Statement
Module relationships should be levelized.
Description
Levelized modules demand that module relationships be acyclic. Any cycles in module relationships therefore prevents levelization. To levelize modules relationships, there are several steps.

]]></description>
			<content:encoded><![CDATA[<p><em>For the full description, implementation variations, consequences, and detailed sample, see Page 150 in Java Application Architecture.</em></p>
<h2>Statement</h2>
<p>Module relationships should be levelized.</p>
<h2>Description</h2>
<p>Levelized modules demand that module relationships be acyclic. Any cycles in module relationships therefore prevents levelization. To levelize modules relationships, there are several steps.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-343" style="border: 0pt none;" title="LevelizedModules" src="http://www.kirkk.com/modularity/wp-content/uploads/2009/12/LevelizedModules.jpg" alt="LevelizedModules" width="468" height="468" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kirkk.com/modularity/2009/12/levelize-modules/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cohesive Modules</title>
		<link>http://www.kirkk.com/modularity/2009/12/cohesive-modules/</link>
		<comments>http://www.kirkk.com/modularity/2009/12/cohesive-modules/#comments</comments>
		<pubDate>Wed, 23 Dec 2009 02:11:24 +0000</pubDate>
		<dc:creator>kirk knoernschild</dc:creator>
				<category><![CDATA[Base Pattern]]></category>
		<category><![CDATA[Part 2]]></category>

		<guid isPermaLink="false">http://www.kirkk.com/modularity/?p=310</guid>
		<description><![CDATA[For the full description, implementation variations, consequences, and detailed sample, see Page 150 in Java Application Architecture.
Statement
Module behavior should serve a singular purpose.
Description
There are two key elements that affect module cohesion. These follow:

The rate at which the software entities within a module change.
The likelihood that the software entities within a module are reused together.

Based on [...]]]></description>
			<content:encoded><![CDATA[<p><i>For the full description, implementation variations, consequences, and detailed sample, see Page 150 in Java Application Architecture.</i></p>
<h2>Statement</h2>
<p>Module behavior should serve a singular purpose.</p>
<h2>Description</h2>
<p>There are two key elements that affect module cohesion. These follow:</p>
<ul>
<li>The rate at which the software entities within a module change.</li>
<li>The likelihood that the software entities within a module are reused together.</li>
</ul>
<p>Based on these statements, it&#8217;s easy to draw the following conclusion:</p>
<ul>
<li>Classes which change at different rates belong in separate modules.</li>
<li>Classes that change at the same rate belong in the same module.</li>
<li>Classes not reused together belong in separate modules.</li>
<li>Classes reused together belong in the same module.</li>
</ul>
<p>Unforunately, while logical, these general statements do not always apply.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kirkk.com/modularity/2009/12/cohesive-modules/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Implementation Factory</title>
		<link>http://www.kirkk.com/modularity/2009/12/implementation-factory/</link>
		<comments>http://www.kirkk.com/modularity/2009/12/implementation-factory/#comments</comments>
		<pubDate>Wed, 23 Dec 2009 00:53:57 +0000</pubDate>
		<dc:creator>kirk knoernschild</dc:creator>
				<category><![CDATA[Extensibility Pattern]]></category>
		<category><![CDATA[Part 2]]></category>

		<guid isPermaLink="false">http://www.kirkk.com/modularity/?p=297</guid>
		<description><![CDATA[For the full description, implementation variations, consequences, and detailed sample, see Page 150 in Java Application Architecture.
Statement
Use factories to create a modules implementation classes.
Description
One of the challenges we face with Abstract Modules is how the object relationships are established at runtime. A class dependent on an abstraction should avoid referencing any of the implementing classes, [...]]]></description>
			<content:encoded><![CDATA[<p><em>For the full description, implementation variations, consequences, and detailed sample, see Page 150 in Java Application Architecture.</em></p>
<h2>Statement</h2>
<p>Use factories to create a modules implementation classes.</p>
<h2>Description</h2>
<p>One of the challenges we face with Abstract Modules is how the object relationships are established at runtime. A class dependent on an abstraction should avoid referencing any of the implementing classes, otherwise anytime a new implementation class is defined, the class dependent on the abstraction also needs to be changed.</p>
<blockquote><p><em>If a class depending on an abstraction must be changed when creating a new implementation of the abstraction, the design is flawed.</em></p></blockquote>
<p style="text-align: center;"><img class="aligncenter" style="border: 0pt none;" title="ImplementationFactory" src="http://www.kirkk.com/modularity/wp-content/uploads/2009/12/ImplementationFactory3.jpg" alt="ImplementationFactory" width="588" height="350" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kirkk.com/modularity/2009/12/implementation-factory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Separate Abstractions</title>
		<link>http://www.kirkk.com/modularity/2009/12/separate-abstractions/</link>
		<comments>http://www.kirkk.com/modularity/2009/12/separate-abstractions/#comments</comments>
		<pubDate>Wed, 23 Dec 2009 00:42:40 +0000</pubDate>
		<dc:creator>kirk knoernschild</dc:creator>
				<category><![CDATA[Extensibility Pattern]]></category>
		<category><![CDATA[Part 2]]></category>

		<guid isPermaLink="false">http://www.kirkk.com/modularity/?p=289</guid>
		<description><![CDATA[For the full description, implementation variations, consequences, and detailed sample, see Page 150 in Java Application Architecture.
Statement
Place abstractions and the classes that implement them in separate modules.
Description
You create an abstract class or interface to help reduce coupling between classes. This offers the ability to create new implementations of the abstraction without impacting clients dependent on [...]]]></description>
			<content:encoded><![CDATA[<p><em>For the full description, implementation variations, consequences, and detailed sample, see Page 150 in Java Application Architecture.</em></p>
<h2>Statement</h2>
<p>Place abstractions and the classes that implement them in separate modules.</p>
<h2>Description</h2>
<p>You create an abstract class or interface to help reduce coupling between classes. This offers the ability to create new implementations of the abstraction without impacting clients dependent on that abstraction. In this sense, abstract coupling allows you to add new classes to your system without modifying existing classes, and it does so by reducing the dependency relationship between classes.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-290" style="border: 0pt none;" title="SeparateAbstractionsPattern" src="http://www.kirkk.com/modularity/wp-content/uploads/2009/12/SeparateAbstractionsPattern.jpg" alt="SeparateAbstractionsPattern" width="557" height="336" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kirkk.com/modularity/2009/12/separate-abstractions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Abstract Modules</title>
		<link>http://www.kirkk.com/modularity/2009/12/abstract-modules/</link>
		<comments>http://www.kirkk.com/modularity/2009/12/abstract-modules/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 21:31:29 +0000</pubDate>
		<dc:creator>kirk knoernschild</dc:creator>
				<category><![CDATA[Extensibility Pattern]]></category>
		<category><![CDATA[Part 2]]></category>

		<guid isPermaLink="false">http://www.kirkk.com/modularity/?p=277</guid>
		<description><![CDATA[For the full description, implementation variations, consequences, and detailed sample, see Page 150 in Java Application Architecture.
Statement
Depend upon the abstract elements of a module.
Description
Modules heavily depended upon have many incoming dependencies. In other words, you may have many modules that all depend on a single module. On one hand, this is a good thing because [...]]]></description>
			<content:encoded><![CDATA[<p><em>For the full description, implementation variations, consequences, and detailed sample, see Page 150 in Java Application Architecture.</em></p>
<h2>Statement</h2>
<p>Depend upon the abstract elements of a module.</p>
<h2>Description</h2>
<p>Modules heavily depended upon have many incoming dependencies. In other words, you may have many modules that all depend on a single module. On one hand, this is a good thing because you&#8217;ve managed to maximize reuse. But reuse has it&#8217;s challenges. If the modules you&#8217;re reusing heavily require a change, the ramifications of that change can ripple throughout all dependent modules. Changing a heavily reused module can be quite a maintenance headache. Abstract Modules helps you deal with this dilemma.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-286" style="border: 0pt none;" title="AbstractModule" src="http://www.kirkk.com/modularity/wp-content/uploads/2009/12/AbstractModule.jpg" alt="AbstractModule" width="557" height="225" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kirkk.com/modularity/2009/12/abstract-modules/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Test Module</title>
		<link>http://www.kirkk.com/modularity/2009/12/test-module-2/</link>
		<comments>http://www.kirkk.com/modularity/2009/12/test-module-2/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 19:46:04 +0000</pubDate>
		<dc:creator>kirk knoernschild</dc:creator>
				<category><![CDATA[Part 2]]></category>
		<category><![CDATA[Utility Pattern]]></category>

		<guid isPermaLink="false">http://www.kirkk.com/modularity/?p=252</guid>
		<description><![CDATA[For the full description, implementation variations, consequences, and detailed sample, see Page 150 in Java Application Architecture.
Statement
Each module should have a corresponding test module.
Description
Writing tests is one of the most important activities you should perform as a developer. Create a robust suite of tests has significant advantages, both long and short term. Short term, tests [...]]]></description>
			<content:encoded><![CDATA[<p><em>For the full description, implementation variations, consequences, and detailed sample, see Page 150 in Java Application Architecture.</em></p>
<h2>Statement</h2>
<p>Each module should have a corresponding test module.</p>
<h2>Description</h2>
<p>Writing tests is one of the most important activities you should perform as a developer. Create a robust suite of tests has significant advantages, both long and short term. Short term, tests help you verify that the code you write does as you intend. Creating tests also helps you design your system. Since classes should be independently testable, a natural by-product of test driven development is that your classes will exhibit lower degrees of coupling. Testing classes independently  is valuable, but it&#8217;s also valuable to test the integration aspect of multiple classes or modules.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-579" style="border: 0pt none;" title="Test Module" src="http://www.kirkk.com/modularity/wp-content/uploads/2009/12/TestModule2-1024x415.jpg" alt="Test Module" width="655" height="266" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kirkk.com/modularity/2009/12/test-module-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

