Reusability

From Wikipedia, the free encyclopedia

In computer science and software engineering, reusability is the likelihood a segment of source code can be used again to add new functionalities with slight or no modification. Reusable modules and classes reduce implementation time, increase the likelihood that prior testing and use has eliminated bugs and localizes code modifications when a change in implementation is required.

Subroutines or functions are the simplest form of reuse. A chunk of code is regularly organized using modules or namespaces into layers. Proponents claim that objects and software components offer a more advanced form of reusability, although it has been tough to objectively measure and define levels or scores of reusability.

The ability to reuse relies in an essential way on the ability to build larger things from smaller parts, and being able to identify commonalities among those parts. Reusability is often a required characteristic of platform software. Reusability brings several aspects to software development that do not need to be considered when reusability is not required.

Reusability implies some explicit management of build, packaging, distribution, installation, configuration, deployment, maintenance and upgrade issues. If these issues are not considered, software may appear to be reusable from design point of view, but will not be reused in practice.

Software reusability more specifically refers to design features of a software element (or collection of software elements) that enhance its suitability for reuse.

Candidate design features for software reuse include:

  • Adaptable
  • Brief: small size
  • Flexible
  • Parameterization
  • Generic
  • Fast
  • Simple: low complexity
  • Localization of volatile (changeable) design assumptions (David Parnas)
  • Modularity
  • Stability under changing requirements
  • Extensibility
  • Consistency
  • Correctness
  • Orthogonality

Consensus has not yet been reached on this list on the relative importance of the entries nor on the issues which make each one important for a particular class of applications.