<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://luminoussheep.net/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Object_Oriented_Design</id>
	<title>Object Oriented Design - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://luminoussheep.net/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Object_Oriented_Design"/>
	<link rel="alternate" type="text/html" href="https://luminoussheep.net/mediawiki/index.php?title=Object_Oriented_Design&amp;action=history"/>
	<updated>2026-04-16T19:03:45Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://luminoussheep.net/mediawiki/index.php?title=Object_Oriented_Design&amp;diff=36&amp;oldid=prev</id>
		<title>Martin: /* Package Dependency */</title>
		<link rel="alternate" type="text/html" href="https://luminoussheep.net/mediawiki/index.php?title=Object_Oriented_Design&amp;diff=36&amp;oldid=prev"/>
		<updated>2021-09-14T21:13:52Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Package Dependency&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 21:13, 14 September 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 68:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 68:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Package Dependency ==&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Package Dependency ==&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Image:&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a&lt;/del&gt;-depends-b.png]]&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Image:&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;A&lt;/ins&gt;-depends-b.png]]&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;A depends on B.&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;A depends on B.&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;!-- diff cache key wikidb:diff:1.41:old-34:rev-36:wikidiff2=table:1.14.1:bc2a06be --&gt;
&lt;/table&gt;</summary>
		<author><name>Martin</name></author>
	</entry>
	<entry>
		<id>https://luminoussheep.net/mediawiki/index.php?title=Object_Oriented_Design&amp;diff=34&amp;oldid=prev</id>
		<title>Martin: /* Principle of least knowledge */</title>
		<link rel="alternate" type="text/html" href="https://luminoussheep.net/mediawiki/index.php?title=Object_Oriented_Design&amp;diff=34&amp;oldid=prev"/>
		<updated>2021-09-14T21:12:46Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Principle of least knowledge&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 21:12, 14 September 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 65:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 65:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Alternative solution is a get method returning interface not concrete class (of aggregate/composite class) - common in Java API&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Alternative solution is a get method returning interface not concrete class (of aggregate/composite class) - common in Java API&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Image:&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;least&lt;/del&gt;-knowledge1.png|Facade Pattern]] [[Image:Least-knowledge2.png|get interface]]&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Image:&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Least&lt;/ins&gt;-knowledge1.png|Facade Pattern]] [[Image:Least-knowledge2.png|get interface]]&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Package Dependency ==&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Package Dependency ==&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;!-- diff cache key wikidb:diff:1.41:old-32:rev-34:wikidiff2=table:1.14.1:bc2a06be --&gt;
&lt;/table&gt;</summary>
		<author><name>Martin</name></author>
	</entry>
	<entry>
		<id>https://luminoussheep.net/mediawiki/index.php?title=Object_Oriented_Design&amp;diff=32&amp;oldid=prev</id>
		<title>Martin: /* Principle of least knowledge */</title>
		<link rel="alternate" type="text/html" href="https://luminoussheep.net/mediawiki/index.php?title=Object_Oriented_Design&amp;diff=32&amp;oldid=prev"/>
		<updated>2021-09-14T21:11:43Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Principle of least knowledge&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 21:11, 14 September 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 65:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 65:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Alternative solution is a get method returning interface not concrete class (of aggregate/composite class) - common in Java API&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Alternative solution is a get method returning interface not concrete class (of aggregate/composite class) - common in Java API&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Image:least-knowledge1.png|Facade Pattern]] [[Image:&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;least&lt;/del&gt;-knowledge2.png|get interface]]&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Image:least-knowledge1.png|Facade Pattern]] [[Image:&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Least&lt;/ins&gt;-knowledge2.png|get interface]]&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Package Dependency ==&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Package Dependency ==&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;!-- diff cache key wikidb:diff:1.41:old-30:rev-32:wikidiff2=table:1.14.1:bc2a06be --&gt;
&lt;/table&gt;</summary>
		<author><name>Martin</name></author>
	</entry>
	<entry>
		<id>https://luminoussheep.net/mediawiki/index.php?title=Object_Oriented_Design&amp;diff=30&amp;oldid=prev</id>
		<title>Martin: Created page with &quot;== Reference == http://ifacethoughts.net/2006/03/24/design-principles/  == Encapsulation == * hides implementation * enforces modularity  == Polymorphism == * many forms * Jav...&quot;</title>
		<link rel="alternate" type="text/html" href="https://luminoussheep.net/mediawiki/index.php?title=Object_Oriented_Design&amp;diff=30&amp;oldid=prev"/>
		<updated>2021-09-14T21:04:50Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;== Reference == http://ifacethoughts.net/2006/03/24/design-principles/  == Encapsulation == * hides implementation * enforces modularity  == Polymorphism == * many forms * Jav...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Reference ==&lt;br /&gt;
http://ifacethoughts.net/2006/03/24/design-principles/&lt;br /&gt;
&lt;br /&gt;
== Encapsulation ==&lt;br /&gt;
* hides implementation&lt;br /&gt;
* enforces modularity&lt;br /&gt;
&lt;br /&gt;
== Polymorphism ==&lt;br /&gt;
* many forms&lt;br /&gt;
* Java - overridden methods&lt;br /&gt;
&lt;br /&gt;
== Open Closed Principle (OCP) ==&lt;br /&gt;
* Open for extension - closed for modification&lt;br /&gt;
Ability to add new features without modifying existing classes &amp;lt;- e.g. define new subclass&lt;br /&gt;
Principle: reduce coupling to abstract level&lt;br /&gt;
&lt;br /&gt;
=== Polymorphic open closed principle ===&lt;br /&gt;
* interface stays the same - implementation may change&lt;br /&gt;
* abstract interface&lt;br /&gt;
* any implementation may be substituted&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;equivalent to LSP&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== Liskov Substitution Principle (LSP) ==&lt;br /&gt;
  Let q(x) be a property about object x of type T&lt;br /&gt;
      q(y) should be true for objects y of type S where S is a subtype of T&lt;br /&gt;
&lt;br /&gt;
i.e. objects of type T may be replaced by objects of type S for all S where S is a subtype of T&lt;br /&gt;
&lt;br /&gt;
closely related to design by contract&lt;br /&gt;
* preconditions can not be strengthened&lt;br /&gt;
* post conditions can not be weakened&lt;br /&gt;
&lt;br /&gt;
The above conditions have meaning out side of the Java language and can be hard to track/enforce&lt;br /&gt;
&lt;br /&gt;
== Design by contract ==&lt;br /&gt;
* mutual obligations and benefits&lt;br /&gt;
# Obligations on entry - preconditions&lt;br /&gt;
# Guarentee of property on exit - postconditions&lt;br /&gt;
# Maintain property ( assumed on entry, guarantee on exit) &amp;#039;&amp;#039;&amp;#039; [http://en.wikipedia.org/wiki/Class_invariant class invariant] &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Violations of LSP =&amp;gt; Violation of OCP&lt;br /&gt;
Violation of OCP does not imply LSP violation&lt;br /&gt;
&lt;br /&gt;
== Dependency Inversion Principle ==&lt;br /&gt;
Coupling should be at the abstract (interface or abstract class) level not at the concrete class level&lt;br /&gt;
DIP is the means to achieve OCP&lt;br /&gt;
&lt;br /&gt;
== Interface segregation Principle ==&lt;br /&gt;
* Specific interfaces are better than general interfaces&lt;br /&gt;
* Avoid multiple roles&lt;br /&gt;
* Single role is more cohesive&lt;br /&gt;
&lt;br /&gt;
== Composite Reuse Principle ==&lt;br /&gt;
* Favour polymorphic composition over inheritance&lt;br /&gt;
* Avoid overriding default behaviour - behaviour should be the same for all ISAs&lt;br /&gt;
&lt;br /&gt;
== Principle of least knowledge ==&lt;br /&gt;
Only talk to your immediate friends&lt;br /&gt;
&lt;br /&gt;
Any object should know as little as possible about software or properties of anything else - sub components included&lt;br /&gt;
&lt;br /&gt;
i.e. object A may call methods on object B but should not call methods on objects contained within B&lt;br /&gt;
* Advantage: easier to maintain - more adaptable&lt;br /&gt;
* Disadvantage: class may become bloated with wrapper methods ([[http://en.wikipedia.org/wiki/Facade_pattern Facade Pattern]])&lt;br /&gt;
* Alternative solution is a get method returning interface not concrete class (of aggregate/composite class) - common in Java API&lt;br /&gt;
&lt;br /&gt;
[[Image:least-knowledge1.png|Facade Pattern]] [[Image:least-knowledge2.png|get interface]]&lt;br /&gt;
&lt;br /&gt;
== Package Dependency ==&lt;br /&gt;
[[Image:a-depends-b.png]]&lt;br /&gt;
A depends on B.&lt;br /&gt;
&lt;br /&gt;
If the contents of B change then this may impact package A&lt;br /&gt;
&lt;br /&gt;
== Release Reuse Equivalence Principle ==&lt;br /&gt;
Use of the class in the package =&amp;gt; must deploy package&lt;br /&gt;
Unit of reuse is unit of release&lt;br /&gt;
* Don&amp;#039;t copy code from one class to another - fixes to original will be reused&lt;br /&gt;
* You  should not need access to source code just deploy library&lt;br /&gt;
* The package granularity helps reduce burdensome effort of tracking every class dependency&lt;br /&gt;
&lt;br /&gt;
== Common Closure Principle ==&lt;br /&gt;
Classes that change together belong together&lt;br /&gt;
* Functional cohesion - grouping parts of a module together that perform well defined task - e.g. XML&lt;br /&gt;
* Class cohesion - Functionally sound &amp;amp; don&amp;#039;t cross responsibilities boundries&lt;br /&gt;
&lt;br /&gt;
== Common Reuse Principle == &lt;br /&gt;
* Classes that aren&amp;#039;t reused together shouldn&amp;#039;t be grouped together&lt;br /&gt;
* Consider likelihood of classes changing together when choosing packaging&lt;br /&gt;
* Avoid unwanted dependencies&lt;br /&gt;
&lt;br /&gt;
== Acyclic Dependency Principle == &lt;br /&gt;
* Dependencies between packages should not form a cycle&lt;br /&gt;
* Dependencies should only form a DAG [http://en.wikipedia.org/wiki/Directed_acyclic_graph Directed Acyclic Graph]&lt;br /&gt;
* Factor out the cyclic forming part into a new Class =&amp;gt; positive re-use&lt;br /&gt;
&lt;br /&gt;
[[Image:cyclic-dependency.png|cyclic dependency]]&lt;br /&gt;
&lt;br /&gt;
Important for a deployment perspective&lt;br /&gt;
&lt;br /&gt;
== Stable Dependencies Principles ==&lt;br /&gt;
Packages likely to experience frequent change (less stable) should have fewer incoming dependencies &lt;br /&gt;
- Can have many outgoing dependencies&lt;br /&gt;
&lt;br /&gt;
Packages less likely to change may have more incoming dependencies&lt;br /&gt;
- Fewer outgoing dependencies&lt;br /&gt;
&lt;br /&gt;
== Stable Abstraction Principle ==&lt;br /&gt;
Stable packages should be more abstract packages&lt;br /&gt;
&lt;br /&gt;
More stable packages should contain a higher number of abstract classes or interfaces&lt;br /&gt;
* should heavily depend on them&lt;br /&gt;
&lt;br /&gt;
Less stable packages contain high number of concrete classes&lt;br /&gt;
* should not depend on such packages&lt;/div&gt;</summary>
		<author><name>Martin</name></author>
	</entry>
</feed>