Reuse release equivalence principle

From CSSEMediaWiki
(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
The Reuse/Release Equivalency Principle is:
+
>The Reuse/Release Equivalency Principle is:
  
  
Line 8: Line 8:
 
If you copy or insert code/modules in to your code then you own the code. If it doesn't do what you like you have to change it. If there are bugs you have to fix them and most of all it is you who has to maintain it.
 
If you copy or insert code/modules in to your code then you own the code. If it doesn't do what you like you have to change it. If there are bugs you have to fix them and most of all it is you who has to maintain it.
  
"I reuse code if, and only if, I never have to look at the source code." ... "Thus i can reuse nothing that is not also released." [[Robert Cecil Martin 1996b]]
+
"I reuse code if, and only if, I never have to look at the source code." ... "Thus i can reuse nothing that is not also released." [[Robert Cecil Martin 1996b]]
  
  
Line 20: Line 20:
  
 
[[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://omejuzadusi.co.cc UNDER COSTRUCTION, PLEASE SEE THIS POST IN RESERVE COPY]=
 +
----
 +
=[http://omejuzadusi.co.cc CLICK HERE]=
 +
----
 +
</div>

Revision as of 04:27, 18 November 2010

>The Reuse/Release Equivalency Principle is:


The granule of reuse is the granule of release. Only components that are released through a tracking system can be effectively reused. This granule is the package.

What is reuse? Copying code is not reuse. If you copy or insert code/modules in to your code then you own the code. If it doesn't do what you like you have to change it. If there are bugs you have to fix them and most of all it is you who has to maintain it.

"I reuse code if, and only if, I never have to look at the source code." ... "Thus i can reuse nothing that is not also released." Robert Cecil Martin 1996b


Package is used as the unit of distributing a software system. When one of the components in the software system want to be reused in other applications, then package is the concrete unit that should be used.

A package provides a set of functions required by the design contract. Hence it is treated as a functional unit. If other application needs such a function sets, then the package is put into place to serve the functionalities required by design.

Why not use the class as the functional unit? Classes are considered too small if proper OO principles are used in a design. A set of functionalities are always provided by more than one class. In this case, the emphasis is “functional unit” rather than physical code unit, hence package is commonly the better candidate both in theory and in practice.

More information can be found in Robert C Martin's book: Agile Software Development, Principles, Patterns, and Practices (2003) published by Pearson. (http://www.pearsonhighered.com/academic/product/0,,0135974445,00%2Ben-USS_01DBC.html)


Personal tools