<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="http://commons.oreilly.com/wiki/skins/common/feed.css?97"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://commons.oreilly.com/wiki/index.php?title=Contribution_50&amp;action=history&amp;feed=atom</id>
		<title>Contribution 50 - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://commons.oreilly.com/wiki/index.php?title=Contribution_50&amp;action=history&amp;feed=atom"/>
		<link rel="alternate" type="text/html" href="http://commons.oreilly.com/wiki/index.php?title=Contribution_50&amp;action=history"/>
		<updated>2013-05-20T07:17:49Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.11.0</generator>

	<entry>
		<id>http://commons.oreilly.com/wiki/index.php?title=Contribution_50&amp;diff=11175&amp;oldid=prev</id>
		<title>Elandre: /* Never ever break the encapsulation */</title>
		<link rel="alternate" type="text/html" href="http://commons.oreilly.com/wiki/index.php?title=Contribution_50&amp;diff=11175&amp;oldid=prev"/>
				<updated>2008-06-12T13:14:36Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Never ever break the encapsulation&lt;/span&gt;&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 13:14, 12 June 2008&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;==Never ever break the encapsulation==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;==Never ever break the encapsulation==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;In systems theory containment is one of the most useful constructs when dealing with large and complex system structures. In the software industry the value of containment or encapsulation is well understood, and its supported by programming language constructs such as subroutine, function, module, package, object (class) &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;and agent&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;In systems theory containment is one of the most useful constructs when dealing with large and complex system structures. In the software industry the value of containment or encapsulation is well understood, and its supported by programming language constructs such as subroutine, function, module, package, object (class).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Agents, modules &lt;/del&gt;and &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;packages &lt;/del&gt;addresses the larger scale needs for encapsulation, while object, subroutine and function addresses the more fine granular aspects of the matter. Over the years I have discovered that objects seams to be one of the hardest encapsulation constructs for developers to get right. It's not seldom you find a class with one single 3000 line main method, or a class with only set and get methods for its primitive attributes. These examples illustrates basically that the developers involved has never understood object oriented thinking, and the power of objects as modeling constructs. &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Module &lt;/ins&gt;and &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;package &lt;/ins&gt;addresses the larger scale needs for encapsulation, while object, subroutine and function addresses the more fine granular aspects of the matter. Over the years I have discovered that objects seams to be one of the hardest encapsulation constructs for developers to get right. It's not seldom you find a class with one single 3000 line main method, or a class with only set and get methods for its primitive attributes. These examples illustrates basically that the developers involved has never understood object oriented thinking, and the power of objects as modeling constructs. &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;An object encapsulates state and behavior &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;related to its &lt;/del&gt;state, and &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;designing with objects &lt;/del&gt;boils down to two simple tasks: '''allocation''' and '''delegation''' of responsibility to the different objects&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;. This is best illustrated by an example. Lets say we have three objects, ''customer'', ''order'' and ''item''. The ''customer'' object is &lt;/del&gt;the &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;natural placeholder of the credit limit and credit validation rules. The ''order'' &lt;/del&gt;object &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;knows about its associated customer, and its ''addItem(item)'' operation delegates the actual credit check by calling ''customer.validateCredit(item.price())''. If the post condition for the method fails, an exception is thrown and the purchase is aborted. This approach of organizing your code is in line with the principles of the Domain Model pattern described by Martin Fowler in his book Patterns of Enterprise Application Architecture [PEAA]&lt;/del&gt;. &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;An object encapsulates &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;both &lt;/ins&gt;state and behavior&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;, where the behavior is defined by the actual &lt;/ins&gt;state&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;. Think of the object door, it has four states: closed, open&lt;/ins&gt;, &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;closing, opening. It provide two operations: open &lt;/ins&gt;and &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;close. Dependent of state the open and close operations will behave differently. This inherent property of an object makes the design process conceptual simple. It &lt;/ins&gt;boils down to two simple tasks: '''allocation''' and '''delegation''' of responsibility to the different objects &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;including &lt;/ins&gt;the &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;inter-&lt;/ins&gt;object &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;interaction protocols&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;A less experienced object oriented developer might decide to wrap all the business rules into an object very often referred to as order-manager or order-service. In these designs ''order'', ''customer'' and ''item'' are treated as records and all logic is factored out of the objects and tied together in one single method. These designs are in line with the Transactional script pattern [PEAA], a pattern I found more an anti-pattern than a pattern for developers working in object oriented programming languages. The reason: It breaks the encapsulation and results in non maintainable code. To illustrate the problem lets extend our small system with more functionality. Customers are classified as gold, silver and basic members, and different discounts are given on that basis. Extend the discount rules to include family size, hair color, car make. Think then about what happens with the maintainability of your code. What initially started out as a 50 line script method has become 2000 lines inter tangled unmaintainable code.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;How this works in practice is best illustrated by an example. Lets say we have three objects, ''customer'', ''order'' and ''item''. The ''customer'' object is the natural placeholder of the credit limit and credit validation rules. The ''order'' object knows about its associated customer, and its ''addItem(item)'' operation delegates the actual credit check by calling ''customer.validateCredit(item.price())''. If the post condition for the method fails, an exception is thrown and the purchase is aborted. This approach of organizing your code is in line with the principles of the Domain Model pattern described by Martin Fowler in his book Patterns of Enterprise Application Architecture [PEAA]. &lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;A less experienced object oriented developer might decide to wrap all the business rules into an object very often referred to as order-manager or order-service. In these designs ''order'', ''customer'' and ''item'' are treated as records and all logic is factored out of the objects and tied together in one single method. These designs are in line with the Transactional script pattern [PEAA], a pattern I found more &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;as &lt;/ins&gt;an anti-pattern than a pattern for developers working in object oriented programming languages. The reason: It breaks the encapsulation and results in non maintainable code. To illustrate the problem lets extend our small system with more functionality. Customers are classified as gold, silver and basic members, and different discounts are given on that basis. Extend the discount rules to include family size, hair color, car make. Think then about what happens with the maintainability of your code. What initially started out as a 50 line script method has become 2000 lines inter tangled unmaintainable code.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Following the Domain Model approach, extending the ''customer'' object with a ''discount()'' method while maintaining a consistent allocation of responsibility would have made things simple. With the new method in place the ''order'' objects ''close()'' method could have obtained the correct discount without knowing anything about membership levels and other discount rules encapsulated by the ''customer'' object.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Following the Domain Model approach, extending the ''customer'' object with a ''discount()'' method while maintaining a consistent allocation of responsibility would have made things simple. With the new method in place the ''order'' objects ''close()'' method could have obtained the correct discount without knowing anything about membership levels and other discount rules encapsulated by the ''customer'' object.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key wikicontent:diff:version:1.11a:oldid:11164:newid:11175 --&gt;
&lt;/table&gt;</summary>
		<author><name>Elandre</name></author>	</entry>

	<entry>
		<id>http://commons.oreilly.com/wiki/index.php?title=Contribution_50&amp;diff=11164&amp;oldid=prev</id>
		<title>Elandre: /* Never ever break the encapsulation */</title>
		<link rel="alternate" type="text/html" href="http://commons.oreilly.com/wiki/index.php?title=Contribution_50&amp;diff=11164&amp;oldid=prev"/>
				<updated>2008-06-11T14:09:26Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Never ever break the encapsulation&lt;/span&gt;&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 14:09, 11 June 2008&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;==Never ever break the encapsulation==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;==Never ever break the encapsulation==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;In &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;the &lt;/del&gt;systems theory containment &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;a.k.a. the &amp;quot;poached egg&amp;quot; model &lt;/del&gt;is one of the most useful constructs dealing with large and complex system structures. In the software industry the value of containment or encapsulation is well understood, and its supported by programming language constructs such as &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;subroutines&lt;/del&gt;, &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;functions&lt;/del&gt;, &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;modules&lt;/del&gt;, &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;packages&lt;/del&gt;, &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;objects &lt;/del&gt;(class) and &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;even agents&lt;/del&gt;. &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;In systems theory containment is one of the most useful constructs &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;when &lt;/ins&gt;dealing with large and complex system structures. In the software industry the value of containment or encapsulation is well understood, and its supported by programming language constructs such as &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;subroutine&lt;/ins&gt;, &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;function&lt;/ins&gt;, &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;module&lt;/ins&gt;, &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;package&lt;/ins&gt;, &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;object &lt;/ins&gt;(class) and &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;agent&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Agents, modules and packages addresses &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;most often &lt;/del&gt;the larger scale needs for encapsulation, while &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;objects&lt;/del&gt;, &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;subroutines &lt;/del&gt;and &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;functions are most often associated with &lt;/del&gt;the more fine granular aspects of the matter. Over the years I have discovered that objects seams to be one of the hardest encapsulation constructs for developers to get right. It's not seldom you find a class with one single 3000 line main method, or a class with only set and get methods for its primitive attributes. These examples illustrates basically that the developers has never understood object oriented thinking, and the power of objects as modeling constructs. &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Agents, modules and packages addresses the larger scale needs for encapsulation, while &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;object&lt;/ins&gt;, &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;subroutine &lt;/ins&gt;and &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;function addresses &lt;/ins&gt;the more fine granular aspects of the matter. Over the years I have discovered that objects seams to be one of the hardest encapsulation constructs for developers to get right. It's not seldom you find a class with one single 3000 line main method, or a class with only set and get methods for its primitive attributes. These examples illustrates basically that the developers &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;involved &lt;/ins&gt;has never understood object oriented thinking, and the power of objects as modeling constructs. &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;An object encapsulates state and behavior related to its state, and designing with objects boils down to two simple tasks: allocation and delegation of responsibility to the different objects. Lets say we have three objects, customer, order and item. The customer object is the natural placeholder of the credit limit and credit validation rules. The order object knows about its associated customer, and its addItem(item) operation delegates the actual credit check by calling customer.validateCredit(item.price()). If the post condition for the method fails, an exception is thrown and the purchase &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;operation &lt;/del&gt;is aborted. This approach of organizing your code is in line with the principles of the Domain Model pattern described &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;in &lt;/del&gt;Martin Fowler&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'s &lt;/del&gt;book&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;, &lt;/del&gt;Patterns of Enterprise Application Architecture. &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;An object encapsulates state and behavior related to its state, and designing with objects boils down to two simple tasks: &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'''&lt;/ins&gt;allocation&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''' &lt;/ins&gt;and &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'''&lt;/ins&gt;delegation&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''' &lt;/ins&gt;of responsibility to the different objects&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;. This is best illustrated by an example&lt;/ins&gt;. Lets say we have three objects, &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;customer&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;, &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;order&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'' &lt;/ins&gt;and &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;item&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;. The &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;customer&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'' &lt;/ins&gt;object is the natural placeholder of the credit limit and credit validation rules. The &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;order&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'' &lt;/ins&gt;object knows about its associated customer, and its &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;addItem(item)&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'' &lt;/ins&gt;operation delegates the actual credit check by calling &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;customer.validateCredit(item.price())&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;. If the post condition for the method fails, an exception is thrown and the purchase is aborted. This approach of organizing your code is in line with the principles of the Domain Model pattern described &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;by &lt;/ins&gt;Martin Fowler &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;in his &lt;/ins&gt;book Patterns of Enterprise Application Architecture &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;[PEAA]&lt;/ins&gt;. &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;A less experienced object oriented developer might decide to wrap all the business rules into an object very often referred to as order-manager or order-service. In these designs order, customer and item are treated as records and all logic is factored out of the objects and tied together in one single method. &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;This design is &lt;/del&gt;in line with the Transactional script pattern, a pattern &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;this is &lt;/del&gt;more an anti-pattern than a pattern. It breaks the encapsulation and results in non maintainable code. To illustrate the problem lets extend our small system with more functionality. &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;The customers &lt;/del&gt;are classified as gold, silver and basic members, and different discounts are given on that basis. Extend &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;functionality further and add &lt;/del&gt;discount rules &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;that not only is derived from member status&lt;/del&gt;, &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;but from how many children the customer got and so on&lt;/del&gt;. Think about what happens with the maintainability of your code. What initially started out as a 50 line script method has become 2000 lines inter tangled unmaintainable code.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;A less experienced object oriented developer might decide to wrap all the business rules into an object very often referred to as order-manager or order-service. In these designs &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;order&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;, &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;customer&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'' &lt;/ins&gt;and &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;item&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'' &lt;/ins&gt;are treated as records and all logic is factored out of the objects and tied together in one single method. &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;These designs are &lt;/ins&gt;in line with the Transactional script pattern &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;[PEAA]&lt;/ins&gt;, a pattern &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;I found &lt;/ins&gt;more an anti-pattern than a pattern &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;for developers working in object oriented programming languages&lt;/ins&gt;. &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;The reason: &lt;/ins&gt;It breaks the encapsulation and results in non maintainable code. To illustrate the problem lets extend our small system with more functionality. &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Customers &lt;/ins&gt;are classified as gold, silver and basic members, and different discounts are given on that basis. Extend &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;the &lt;/ins&gt;discount rules &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;to include family size&lt;/ins&gt;, &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;hair color, car make&lt;/ins&gt;. Think &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;then &lt;/ins&gt;about what happens with the maintainability of your code. What initially started out as a 50 line script method has become 2000 lines inter tangled unmaintainable code.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Refactoring your objects&lt;/del&gt;, extending &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;them &lt;/del&gt;with &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;new methods and &lt;/del&gt;maintaining a consistent allocation of responsibility would have made things simple. &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;The customer object could have been extended with a discount &lt;/del&gt;method&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;, and the &lt;/del&gt;the order objects close() &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;operation would &lt;/del&gt;have obtained the correct discount without knowing anything about membership levels &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;or any &lt;/del&gt;other discount rules &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;associated with &lt;/del&gt;the customer object.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Following the Domain Model approach&lt;/ins&gt;, extending &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;the ''customer'' object &lt;/ins&gt;with &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;a ''discount()'' method while &lt;/ins&gt;maintaining a consistent allocation of responsibility would have made things simple. &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;With the new &lt;/ins&gt;method &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;in place &lt;/ins&gt;the &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;order&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'' &lt;/ins&gt;objects &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;close()&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'' method could &lt;/ins&gt;have obtained the correct discount without knowing anything about membership levels &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;and &lt;/ins&gt;other discount rules &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;encapsulated by &lt;/ins&gt;the &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;customer&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'' &lt;/ins&gt;object.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;So in the end, never break the encapsulation.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;So in the end, never break the encapsulation&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;, and use the power of your favorite object oriented language to maintain it&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key wikicontent:diff:version:1.11a:oldid:11159:newid:11164 --&gt;
&lt;/table&gt;</summary>
		<author><name>Elandre</name></author>	</entry>

	<entry>
		<id>http://commons.oreilly.com/wiki/index.php?title=Contribution_50&amp;diff=11159&amp;oldid=prev</id>
		<title>Elandre: /* Never ever break the encapsulation */</title>
		<link rel="alternate" type="text/html" href="http://commons.oreilly.com/wiki/index.php?title=Contribution_50&amp;diff=11159&amp;oldid=prev"/>
				<updated>2008-06-10T23:10:06Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Never ever break the encapsulation&lt;/span&gt;&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 23:10, 10 June 2008&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;==Never ever break the encapsulation==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;==Never ever break the encapsulation==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Placeholder for thoughts&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;In the systems theory containment a.k.a. the &amp;quot;poached egg&amp;quot; model is one of the most useful constructs dealing with large and complex system structures. In the software industry the value of containment or encapsulation is well understood, and its supported by programming language constructs such as subroutines, functions, modules, packages, objects (class) and even agents. &lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Agents, modules and packages addresses most often the larger scale needs for encapsulation, while objects, subroutines and functions are most often associated with the more fine granular aspects of the matter. Over the years I have discovered that objects seams to be one of the hardest encapsulation constructs for developers to get right. It's not seldom you find a class with one single 3000 line main method, or a class with only set and get methods for its primitive attributes. These examples illustrates basically that the developers has never understood object oriented thinking, and the power of objects as modeling constructs. &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;An object encapsulates state and behavior related to its state, and designing with objects boils down to two simple tasks: allocation and delegation of responsibility to the different objects. Lets say we have three objects, customer, order and item. The customer object is the natural placeholder of the credit limit and credit validation rules. The order object knows about its associated customer, and its addItem(item) operation delegates the actual credit check by calling customer.validateCredit(item.price()). If the post condition for the method fails, an exception is thrown and the purchase operation is aborted. This approach of organizing your code is in line with the principles of the Domain Model pattern described in Martin Fowler's book, Patterns of Enterprise Application Architecture. &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;A less experienced object oriented developer might decide to wrap all the business rules into an object very often referred to as order-manager or order-service. In these designs order, customer and item are treated as records and all logic is factored out of the objects and tied together in one single method. This design is in line with the Transactional script pattern, a pattern this is more an anti-pattern than a pattern. It breaks the encapsulation and results in non maintainable code. To illustrate the problem lets extend our small system with more functionality. The customers are classified as gold, silver and basic members, and different discounts are given on that basis. Extend functionality further and add discount rules that not only is derived from member status, but from how many children the customer got and so on. Think about what happens with the maintainability of your code. What initially started out as a 50 line script method has become 2000 lines inter tangled unmaintainable code.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Refactoring your objects, extending them with new methods and maintaining a consistent allocation of responsibility would have made things simple. The customer object could have been extended with a discount method, and the the order objects close() operation would have obtained the correct discount without knowing anything about membership levels or any other discount rules associated with the customer object.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;So in the end, never break the encapsulation.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key wikicontent:diff:version:1.11a:oldid:11151:newid:11159 --&gt;
&lt;/table&gt;</summary>
		<author><name>Elandre</name></author>	</entry>

	<entry>
		<id>http://commons.oreilly.com/wiki/index.php?title=Contribution_50&amp;diff=11151&amp;oldid=prev</id>
		<title>Elandre at 09:02, 10 June 2008</title>
		<link rel="alternate" type="text/html" href="http://commons.oreilly.com/wiki/index.php?title=Contribution_50&amp;diff=11151&amp;oldid=prev"/>
				<updated>2008-06-10T09:02:31Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 09:02, 10 June 2008&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;==Never ever break the encapsulation==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;==Never ever break the encapsulation==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Placeholder for thoughts&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Placeholder for thoughts&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;By [[Einar Landre]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;This work is licensed under a&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[http://creativecommons.org/licenses/by/3.0/us/ Creative Commons Attribution 3] &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Back to [[97 Things Every Software Architect Should Know]] home page&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key wikicontent:diff:version:1.11a:oldid:11150:newid:11151 --&gt;
&lt;/table&gt;</summary>
		<author><name>Elandre</name></author>	</entry>

	<entry>
		<id>http://commons.oreilly.com/wiki/index.php?title=Contribution_50&amp;diff=11150&amp;oldid=prev</id>
		<title>Elandre: New page: ==Never ever break the encapsulation== Placeholder for thoughts</title>
		<link rel="alternate" type="text/html" href="http://commons.oreilly.com/wiki/index.php?title=Contribution_50&amp;diff=11150&amp;oldid=prev"/>
				<updated>2008-06-10T09:01:20Z</updated>
		
		<summary type="html">&lt;p&gt;New page: ==Never ever break the encapsulation== Placeholder for thoughts&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Never ever break the encapsulation==&lt;br /&gt;
Placeholder for thoughts&lt;/div&gt;</summary>
		<author><name>Elandre</name></author>	</entry>

	</feed>