Stable dependencies principle

From CSSEMediaWiki
(Difference between revisions)
Jump to: navigation, search
Line 3: Line 3:
 
It is important to identify stable packages and packages that change. The packages that are expected to change should be designed to change. Most of the time, but not always, abstract classes and interfaces are not dependent on others and tend to be more stable in contrast to concrete or implementation classes. This is because the abstract classes or interfaces typically represent a higher abstraction of a design and not the implementation.
 
It is important to identify stable packages and packages that change. The packages that are expected to change should be designed to change. Most of the time, but not always, abstract classes and interfaces are not dependent on others and tend to be more stable in contrast to concrete or implementation classes. This is because the abstract classes or interfaces typically represent a higher abstraction of a design and not the implementation.
  
==See also==
+
>==See also==
 
*[[Dependency inversion principle]]
 
*[[Dependency inversion principle]]
 
*[http://ifacethoughts.net/2006/04/15/stable-dependencies-principle/ Stable Dependencies Principle]
 
*[http://ifacethoughts.net/2006/04/15/stable-dependencies-principle/ Stable Dependencies Principle]
Line 9: Line 9:
  
 
[[Category:Bob Martin's principles]]
 
[[Category:Bob Martin's principles]]
 +
 +
----
 +
<div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;">
 +
----
 +
=[http://ukuhebako.co.cc Under Construction! Please Visit Reserve Page. Page Will Be Available Shortly]=
 +
----
 +
=[http://ukuhebako.co.cc CLICK HERE]=
 +
----
 +
</div>

Revision as of 04:27, 18 November 2010

In general something is stable if it has steadfastness, reliability, dependability and constancy, as of character or purpose. Therefore a package can be considered stable if it is not changed frequently, or if there is no need to change it frequently. Thus other packages can reliably depend on this stable package. So we could say dependencies between packages in a design should always be in the direction of the stability of the packages. A package should only depend upon packages that are more stable than itself. This can be expanded on classes as well. Classes should only depend on more stable classes.

It is important to identify stable packages and packages that change. The packages that are expected to change should be designed to change. Most of the time, but not always, abstract classes and interfaces are not dependent on others and tend to be more stable in contrast to concrete or implementation classes. This is because the abstract classes or interfaces typically represent a higher abstraction of a design and not the implementation.

>==See also==


Personal tools