Reuse/Release Equivalency Principle

This is first of the design principles which looks at the macro-designing part of software engineering. Macro, because it does not suggest technical solutions, but gives guidelines for practical granularity required for reusing software. Reuse/Release Equivalency Principle (REP) states:

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.

Package can be considered to be the unit of distribution of the software. When I want to reuse a component, package is the concrete unit I am reusing. Package is not necessarily the preferred nomenclature, it is also called library, domain, functionality, or for that matter anything used to bind a set of classes together. For example, when I am using a file operations library, it is the unit of distribution and usage, even if I am using only the class for reading the file.

Releasing a package means an implicit signed contract, that this package will serve as specified. This contract serves as a guarantee that the package will abide by its interface and functionality. Also that the onus of maintaining the source is that of the author and not the user. This enforcement will lead to direct obedience of the Design By Contract (DBC) methodology.

Why not Classes?

It can be argued that classes themselves can be used for distribution and usage. However, if we follow the basic design principles, we will always endup with more than one class, which communicate with each other. If individual classes are released, the version tracking and compatibility might be a nightmare. So, the unit of release has to be something bigger than the class – which we call package. Hence, packages are the granular units of release and hence reuse even if classes can be the units of design.

The tracking system is important because the author owns the responsibility of upgrading the package that is being reused. Changes or enhancements in the package can be triggered by many factors, like new standards, new requirements, bugs or sometimes new methodologies and technologies. The author has to track the changes in the package along with maintaining its source code.

Next we will look at principles that guide compositions of the package.

Back to Design Principles.

Technorati tags: , , , ,

Copyright Abhijit Nadgouda.

Posted in design. 1 Comment »

One Response to “Reuse/Release Equivalency Principle”

  1. Abhijit Nadgouda @ iface » Blog Archive » OO Design Principles Says:

    […] Reuse/Release Equivalency Principle (REP) […]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: